From d63ce56e3f71c55d04af94bf55fda70e92c93b74 Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Thu, 9 Apr 2026 10:31:29 +0800 Subject: [PATCH] update skills --- .claude/skills/update-mycv/SKILL.md | 2 +- .claude/skills/update-mykb-files/SKILL.md | 14 +++++++------- .claude/skills/update-mykb-memories/SKILL.md | 12 ++++++------ .claude/skills/update-mywebpage/SKILL.md | 2 +- CLAUDE.md | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.claude/skills/update-mycv/SKILL.md b/.claude/skills/update-mycv/SKILL.md index b4db1e3..c3e10b8 100644 --- a/.claude/skills/update-mycv/SKILL.md +++ b/.claude/skills/update-mycv/SKILL.md @@ -15,7 +15,7 @@ Updates CV publications by syncing from BibTeX files and regenerating PDFs. - When CV needs to be synchronized with publication records - Before applying for positions or grants - To generate updated PDF versions -- When recurring CV/bib conventions change, extend this skill or update-mymemories so the workflow stays aligned +- When recurring CV/bib conventions change, extend this skill or update-mykb-memories so the workflow stays aligned ## How It Works diff --git a/.claude/skills/update-mykb-files/SKILL.md b/.claude/skills/update-mykb-files/SKILL.md index 406aae4..a18345c 100644 --- a/.claude/skills/update-mykb-files/SKILL.md +++ b/.claude/skills/update-mykb-files/SKILL.md @@ -1,15 +1,15 @@ --- -name: update-myfiles +name: update-mykb-files description: | - Local filesystem RAG-style retrieval: user path, @ files, or workspace—no fixed KB root; prefer data_structure.md then grep/limited Read; PDF/Excel only after this skill's references. Save reusable clips to project .claude/files/; one-line pointers in memories via update-mymemories. Sandbox/permissions apply. - Triggers: update-myfiles; 检索/查资料/找文件/在某目录/摘录/存档; local search, find in folder, read my PDF, grep project, save excerpt, knowledge base on disk. + Local filesystem RAG-style retrieval: user path, @ files, or workspace—no fixed KB root; prefer data_structure.md then grep/limited Read; PDF/Excel only after this skill's references. Save reusable clips to project .claude/files/; one-line pointers in memories via update-mykb-memories. Sandbox/permissions apply. + Triggers: update-mykb-files; 检索/查资料/找文件/在某目录/摘录/存档; local search, find in folder, read my PDF, grep project, save excerpt, knowledge base on disk. --- -# 本地文件检索与摘录(update-myfiles) +# 本地文件检索与摘录(update-mykb-files) ## 检索范围与目录结构 -- **对象**:本机文件系统上、当前工具与环境**允许访问**的任意目录与文件(绝对路径、`~/…`、相对工作区路径等)。不因 skill 名称限制在某个子树;若沙盒或权限收窄,以实际能读到的路径为准。用户反复使用的资料根路径可记在 update-mymemories,减少每次重新确认。 +- **对象**:本机文件系统上、当前工具与环境**允许访问**的任意目录与文件(绝对路径、`~/…`、相对工作区路径等)。不因 skill 名称限制在某个子树;若沙盒或权限收窄,以实际能读到的路径为准。用户反复使用的资料根路径可记在 update-mykb-memories,减少每次重新确认。 - 资料往往放在一个**检索根目录**下,包含多种类型(如 `.md`/`.txt`、`.pdf`、`.xlsx` 等),可按业务拆多级子目录。 - 可选采用**分层目录索引文件**(有则用,无则靠路径/文件名与 grep 渐进查): - 某层目录可有 `data_structure.md`,说明子目录与文件的用途。 @@ -25,7 +25,7 @@ description: | ## 摘录池:`.claude/files/` - **用途**:在日常对话或阅览任意被检索文件时,若出现**以后还可能引用**的内容(定义、结论、命令、表格摘要、长引用片段),写入当前项目下的 `.claude/files/`,便于后续用 Grep/Read 复用;**不要**把整本 PDF/整表原样拷入,优先摘要 + 来源路径。 -- **与 update-mymemories 分工**:极短、稳定的事实与偏好写入 `.claude/memories/`(见 skill `update-mymemories`);**较长说明、摘录、结构化笔记**放 `.claude/files/`。 +- **与 update-mykb-memories 分工**:极短、稳定的事实与偏好写入 `.claude/memories/`(见 skill `update-mykb-memories`);**较长说明、摘录、结构化笔记**放 `.claude/files/`。 - **路径**:根目录为仓库内 `.claude/files/`(不存在则创建)。可选子目录:`clips/`(原文摘录)、`notes/`(整理笔记)、`exports/`(脚本导出的小文件)。 - **命名**:`YYYY-MM-DD_<主题简写>.md` 或 `_.md`;单文件控制体量,必要时拆篇。 - **内容建议**:每条摘录开头用简短元信息(来源文件/URL、日期、一两句用途),正文用 Markdown;避免敏感凭证。 @@ -151,7 +151,7 @@ description: | - 禁止用 Glob 的「有无匹配文件」代替目录存在性判断;目录是否存在应通过 shell(如 `test -d`)检查。 - 使用本 skill 做本地文件检索时,禁止使用网络搜索等其他工具替代磁盘上的资料 -- 若用户明确要求「记住」且是**短事实**,交给 **update-mymemories**;若需保存**可检索的长摘录**,写入 `.claude/files/`(见上文)。 +- 若用户明确要求「记住」且是**短事实**,交给 **update-mykb-memories**;若需保存**可检索的长摘录**,写入 `.claude/files/`(见上文)。 ## 针对不同文件类型的具体策略 diff --git a/.claude/skills/update-mykb-memories/SKILL.md b/.claude/skills/update-mykb-memories/SKILL.md index c1ed241..872cb22 100644 --- a/.claude/skills/update-mykb-memories/SKILL.md +++ b/.claude/skills/update-mykb-memories/SKILL.md @@ -1,17 +1,17 @@ --- -name: update-mymemories +name: update-mykb-memories description: | - Cross-session personal memory: write short, verifiable facts, preferences, and project conventions to .claude/memories (CLAUDE.md protocol); long excerpts go to .claude/files via update-myfiles. Tone: concise, deduped, no secrets/credentials—matches 简洁直接. Evolves with corrections ("纠正偏好", "以后别…"). - Triggers: update-mymemories; 记住/记下来/默认/偏好/沉淀/跨会话; remember this, save preference, persist this, update how you work with me. + Cross-session personal memory: write short, verifiable facts, preferences, and project conventions to .claude/memories (CLAUDE.md protocol); long excerpts go to .claude/files via update-mykb-files. Tone: concise, deduped, no secrets/credentials—matches 简洁直接. Evolves with corrections ("纠正偏好", "以后别…"). + Triggers: update-mykb-memories; 记住/记下来/默认/偏好/沉淀/跨会话; remember this, save preference, persist this, update how you work with me. --- -# 本地记忆沉淀(update-mymemories) +# 本地记忆沉淀(update-mykb-memories) ## 目标 - 让 Agent 在**不依赖超长上下文**的情况下,在后续会话中仍能利用已确认有用的信息。 - **短而稳**:一句话事实、用户偏好、命令别名、项目内约定 → `.claude/memories/`。 -- **长而可搜**:段落、摘录、整理稿 → `.claude/files/`(见 **update-myfiles**),不要用 `core.json` 塞长文。 +- **长而可搜**:段落、摘录、整理稿 → `.claude/files/`(见 **update-mykb-files**),不要用 `core.json` 塞长文。 - **随使用收敛**:用户纠正或补充时更新既有条目,避免堆叠矛盾记录,使行为逐渐贴近固定偏好与做事方式。 ## 写哪里 @@ -37,7 +37,7 @@ description: | 3. 写回前校验 JSON(引号、逗号、尾随逗号);写回后用 Read 抽查。 4. 若当前仓库将 `.claude/memories` 排除在版本控制外,仍按同样路径写入,便于本机 Agent 加载。 -## 与 update-myfiles 配合 +## 与 update-mykb-files 配合 - 从 PDF/Excel/长文档抽出的**大段原文或详细笔记**:写入 `.claude/files/` 并在 `core.json` 或 `notes` 里只保留**一行指针**(文件名 + 用途)。 - 检索时:先 Grep/Read `.claude/files`,短事实读 `core.json` / `notes/`。 diff --git a/.claude/skills/update-mywebpage/SKILL.md b/.claude/skills/update-mywebpage/SKILL.md index 2e5c797..c74eab9 100644 --- a/.claude/skills/update-mywebpage/SKILL.md +++ b/.claude/skills/update-mywebpage/SKILL.md @@ -33,7 +33,7 @@ Include: 科学问题, 研究背景, 核心内容, 代表论文 (DOI+PDF), 研 Exclude: 学术评价, 获奖鉴定, 申请中项目 ## Quick Checklist -- [ ] New recurring site rules? Add them here (or to update-mymemories) so later edits stay consistent +- [ ] New recurring site rules? Add them here (or to update-mykb-memories) so later edits stay consistent - [ ] CN/EN synced (checked both languages) - [ ] No pending projects - [ ] No subjective evaluations diff --git a/CLAUDE.md b/CLAUDE.md index 812940c..62f46c1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -41,7 +41,7 @@ 处理知识库查询时遵循以下模式: 1. **分层导航**: 先读索引文件(`data_structure.md`),再定位相关文件,最后局部读取 -2. **先学习后处理**: 遇到 PDF/Excel 前,先读取对应处理方法文档(`.claude/skills/update-myfiles/references/`) +2. **先学习后处理**: 遇到 PDF/Excel 前,先读取对应处理方法文档(`.claude/skills/update-mykb-files/references/`) 3. **渐进式检索**: 使用 `grep` 定位关键词,只读取匹配上下文,避免整文件加载 4. **多轮迭代**: 最多5轮检索,逐步缩小范围;找不到时明确告知而非臆造 @@ -102,8 +102,8 @@ - `.claude/memories/` - 持久化记忆(自动加载到上下文) - `.claude/memories/core.json` - 核心记忆文件 - `.claude/memories/current_mode.json` - 当前模式状态 -- `.claude/files/` - 较长摘录、笔记,供后续 Grep/Read(skill:`update-myfiles`) -- 沉淀操作指引:短事实/偏好用 skill `update-mymemories`,长材料用 `update-myfiles` 写入 `.claude/files/` +- `.claude/files/` - 较长摘录、笔记,供后续 Grep/Read(skill:`update-mykb-files`) +- 沉淀操作指引:短事实/偏好用 skill `update-mykb-memories`,长材料用 `update-mykb-files` 写入 `.claude/files/` ### 触发记录 - 用户说"记住..." / "记下来..."