跳到正文
Skillpedia
提示词与 LLM10k · #11905

review-claudemd

它能做什么

这个技能读取你最近的对话,检查你的全局和项目 CLAUDE.md 文件,并提出有助于智能体更好工作的修改建议。适合使用 Claude Code 并维护指令文件的人。

适用场景

  • ✓当你希望 CLAUDE.md 指令反映你在会话中实际做的事情的时候。
  • ✓当你的智能体总是犯同样的错误,你想更新指令的时候。
  • ✓当你想审阅并整理全局和项目指令文件的时候。

技能链接

https://github.com/ykdojo/claude-code-tips/blob/main/skills/review-claudemd/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ykdojo/claude-code-tips/blob/main/skills/review-claudemd/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请回顾我最近的对话,并就我的 CLAUDE.md 文件提出改进建议。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能会收集该项目最近的对话历史,并把阅读工作分配给多个助手智能体。它们会阅读两个指令文件和对话内容,然后提出改进建议。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Review CLAUDE.md from conversation history

Analyze recent conversations to improve both global (~/.claude/CLAUDE.md) and local (project) CLAUDE.md files.

Step 1: Find conversation history

The project's conversation history is in ~/.claude/projects/. The folder name is the project path with slashes replaced by dashes.

# Find the project folder (replace / with -)
PROJECT_PATH=$(pwd | sed 's|/|-|g' | sed 's|^-||')
CONVO_DIR=~/.claude/projects/-${PROJECT_PATH}
ls -lt "$CONVO_DIR"/*.jsonl | head -20

Step 2: Extract recent conversations

Extract the 15-20 most recent conversations (excluding the current one) to a temp directory:

SCRATCH=/tmp/claudemd-review-$(date +%s)
mkdir -p "$SCRATCH"

for f in $(ls -t "$CONVO_DIR"/*.jsonl | head -20); do
  basename=$(basename "$f" .jsonl)
  # Skip current conversation if known
  cat "$f" | jq -r '
    if .type == "user" then
      "USER: " + (.message.content // "")
    elif .type == "assistant" then
      "ASSISTANT: " + ((.message.content // []) | map(select(.type == "text") | .text) | join("\n"))
    else
      empty
    end
  ' 2>/dev/null | grep -v "^ASSISTANT: $" > "$SCRATCH/${basename}.txt"
done

ls -lhS "$SCRATCH"

Step 3: Spin up subagents

Launch parallel subagents to analyze conversations. Each agent should read:

  • Global CLAUDE.md: ~/.claude/CLAUDE.md
  • Local CLAUDE.md: ./CLAUDE.md (if exists)
  • Batch of conversation files

Give each agent this prompt template:

Read:
1. Global CLAUDE.md: ~/.claude/CLAUDE.md
2. Local CLAUDE.md: [project]/CLAUDE.md
3. Conversations: [list of files]

Analyze the conversations against BOTH CLAUDE.md files. Find:
1. Instructions that exist but were violated (need reinforcement or rewording)
2. Patterns that should be added to LOCAL CLAUDE.md (project-specific)
3. Patterns that should be added to GLOBAL CLAUDE.md (applies everywhere)
4. Anything in either file that seems outdated or unnecessary

Be specific. Output bullet points only.

Batch conversations by size:

  • Large (>100KB): 1-2 per agent
  • Medium (10-100KB): 3-5 per agent
  • Small (<10KB): 5-10 per agent

Step 4: Aggregate findings

Combine results from all agents into a summary with these sections:

  1. Instructions violated - existing rules that weren't followed (need stronger wording)
  2. Suggested additions - LOCAL - project-specific patterns
  3. Suggested additions - GLOBAL - patterns that apply everywhere
  4. Potentially outdated - items that may no longer be relevant

Present as tables or bullet points. Ask user if they want edits drafted.

常见问题

它会读取哪些对话?

它读取该项目最近的对话,不包括当前这一段。

它会不经询问就修改我的文件吗?

不会。该技能只提出改进建议,供你审阅。

它会检查哪些文件?

它检查 Claude 文件夹中的全局 CLAUDE.md,以及当前项目中的 CLAUDE.md。

详情

作者的原始描述

Review recent conversations to find improvements for CLAUDE.md files.

repo: ykdojo/claude-code-tips

热度

GitHub 星标
10k
排名
#11905
许可证
—
更新时间
2026/9/25

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能