notes-skill

SQLite 笔记管理系统。由 AI agent(霜糖)代为管理和操作笔记。 触发场景: - 用户说"笔记..."、"记一下..."、"帮我记..."、"存一条笔记" - 用户说"找一下..."、"搜一下关于...的笔记" - 用户说"列出笔记"、"有哪些笔记" - 用户说"标记已整理"、"归档" - 用户说"备份笔记" **任何和笔记相关的场景,都应当检查该skill** 笔记数据存储在 ~/.openclaw/workspace/notes/notes.db

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "notes-skill" with this command: npx skills add cocoonovo/notes-skill

SQLite 笔记系统

数据库位置

~/.openclaw/workspace/notes/notes.db

初始化

首次使用时运行初始化脚本:

python3 ~/.agents/skills/notes-skill/scripts/init.py

该脚本会创建目录和表结构。

表结构

CREATE TABLE notes (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    content TEXT NOT NULL,
    archived INTEGER DEFAULT 0,
    created_at DATETIME DEFAULT (datetime('now', 'localtime'))
);
CREATE INDEX idx_notes_created ON notes(created_at DESC);
CREATE INDEX idx_notes_archived ON notes(archived);

写入笔记前的处理

收到笔记内容后,先优化再写入

  1. 结构优化:适当分段、补充标点、整理格式,使笔记更易读
  2. 错别字处理:修正明显的拼写错误,保持原意不变
  3. 不损失内容:不删减、不曲解原文,只优化表达方式

示例

  • 用户输入:今天学到了git clone 问题 报错 could not read Username
  • 优化后:今天学到了 GitHub clone 的问题:报错 "could not read Username"。原因是非 TTY 环境下 git 的凭证读取机制有问题...

SQL 示例

添加笔记

收到笔记内容后,先优化再写入(见上方处理规则)。优化完成后写入:

INSERT INTO notes (content) VALUES ('优化后的笔记内容');

搜索(LIKE 模糊搜索)

SELECT * FROM notes WHERE content LIKE '%关键词%';

列出全部(按时间倒序)

SELECT * FROM notes ORDER BY created_at DESC;

筛选未归档

SELECT * FROM notes WHERE archived = 0;

标记已归档

UPDATE notes SET archived = 1 WHERE id = 3;

查看单条

SELECT * FROM notes WHERE id = 1;

定时备份任务

每天凌晨 2 点自动备份(通过 OpenClaw cron 触发)。

Agent 收到 backup_notes 事件时,执行:

python3 ~/.agents/skills/notes-skill/scripts/backup.py 3

手动备份

运行备份脚本:

python3 ~/.agents/skills/notes-skill/scripts/backup.py [保留份数]
  • 不传参数:默认保留 7 份
  • 传参数:如 python3 backup.py 10 保留 10 份

备份文件保存在 ~/.openclaw/workspace/notes/backups/。

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Memory Daily

Automates daily memory file management. Use when creating, reading, or appending to daily memory notes (memory/YYYY-MM-DD.md). Helps the agent maintain conti...

Registry SourceRecently Updated
710Profile unavailable
General

price-check

搜索国内主流电商平台(淘宝/天猫、京东、拼多多、苏宁、唯品会、考拉、抖音、快手、1688)的实时价格,自动找到最合适的可信购买点并给出'值不值得买'建议 + 直接可点击的购买链接;本地积累历史价数据,能识别当前价是历史低位还是高位。Keywords: 比价, 值不值得买, 哪里买最便宜, 历史价, 价格监控, X...

Registry SourceRecently Updated
790Profile unavailable
Coding

StylePilot

StylePilot 个人衣橱助手。用户拍照存储衣服信息,或询问穿搭搭配(今天穿什么/出行带什么)时激活。不要主动触发,只在用户明确表示需要穿搭建议时使用。 StylePilot is a personal wardrobe assistant. Activate only when the user expli...

Registry SourceRecently Updated
1230Profile unavailable
Security

Session Token Ledger

Analyze local OpenClaw session token usage from a generated SQLite ledger and markdown summaries. Use when the user asks for a token audit, token体检报告, contex...

Registry Source
2280Profile unavailable