claude-md-updater

GitHub

扫描会话以识别持久化教训和工作流,智能定位并更新 AGENTS.md 或 CLAUDE.md,生成精确差异供用户审批后写入。

dev-toolkit/skills/claude-md-updater/SKILL.md jamditis/claude-skills-journalism

Trigger Scenarios

需要保存调试经验或新工作流到项目文档时 发现新的基础设施配置或环境变更需持久化时

Install

npx skills add jamditis/claude-skills-journalism --skill claude-md-updater -g -y
More Options

Non-standard path

npx skills add https://github.com/jamditis/claude-skills-journalism/tree/master/dev-toolkit/skills/claude-md-updater -g -y

Use without installing

npx skills use jamditis/claude-skills-journalism@claude-md-updater

指定 Agent (Claude Code)

npx skills add jamditis/claude-skills-journalism --skill claude-md-updater -a claude-code -g -y

安装 repo 全部 skill

npx skills add jamditis/claude-skills-journalism --all -g -y

预览 repo 内 skill

npx skills add jamditis/claude-skills-journalism --list

SKILL.md

Frontmatter
{
    "name": "claude-md-updater",
    "description": "Scans the session for durable lessons and workflows, then proposes scoped project instruction updates. Use for save this lesson or add to context."
}

Project instruction updater

Analyze the current conversation to identify information worth persisting in the project's instruction file, then propose the edits for approval before writing anything.

Resolve the target before drafting:

  1. If AGENTS.md exists, update it. In Claude Code, if there is no CLAUDE.md, also propose a one-line CLAUDE.md import of @AGENTS.md. Claude Code loads CLAUDE.md, not AGENTS.md.
  2. If only CLAUDE.md exists, update it.
  3. If both exist and either imports the other, update the imported canonical file.
  4. If neither exists, create AGENTS.md. In Claude Code, also propose the one-line CLAUDE.md import.

What to look for

1. Hard-won lessons

  • Debugging sessions that revealed non-obvious causes
  • Workarounds for platform or tool limitations
  • Anti-patterns discovered through failure
  • "The real problem was..." moments

2. New infrastructure

  • New services deployed
  • New endpoints or URLs
  • New file paths or directories
  • New credentials or tokens (reference only, never the values)

3. New workflows

  • Commands that solve recurring problems
  • Multi-step processes that work well
  • Integration patterns between systems

4. Updated information

  • Changed ports, IPs, or URLs
  • New capabilities added to existing systems
  • Deprecated or removed features

Analysis process

  1. Scan the conversation for keywords:

    • "fixed", "solved", "the issue was", "turns out"
    • "deployed", "set up", "configured", "installed"
    • "new endpoint", "new service", "new path"
    • "doesn't work", "limitation", "workaround"
  2. Categorize findings. Only durable facts belong in the project instruction file:

    • Hard-won lessons go to the "Hard-won lessons" section
    • Infrastructure changes update the relevant section
    • New workflows go to the appropriate section
    • Transient, session-specific notes do not go in the project instruction file (see "What not to persist")
  3. Build the exact diff. Produce a unified diff against the resolved instruction file showing the precise lines and sections to add or change. This diff is what the user approves, not a summary of it.

  4. Present the diff for approval and write nothing until the user approves.

Output format

Show the exact patch first, then a short summary grouped by category:

## Proposed project instruction updates

```diff
--- a/AGENTS.md
+++ b/AGENTS.md
@@ section being changed @@
 existing context line
+new durable lesson, infra fact, or workflow
```

Summary of the diff above:
- Hard-won lessons: [one line, if any]
- Infrastructure updates: [one line, if any]
- New workflows: [one line, if any]

Apply this diff? Nothing is written until you approve.

What not to persist

The project instruction file is team-shared, checked into git, and loaded into agent sessions. Use it for durable, infrequently changing facts, not a running log. Per the project-memory skill, keep these items out:

  • Transient "what we did today" session summaries
  • Anything that changes frequently
  • Things the client learns over time through corrections

Route those to the client's memory feature (in Claude Code, auto memory at ~/.claude/projects/<project>/memory/) or to a gitignored local notes file (in Claude Code, CLAUDE.local.md). Putting them in shared project instructions bloats context and loads stale session facts into future sessions.

Rules

  1. Never add sensitive values. Reference where a credential is stored; never include the actual token.
  2. Keep it concise. The project instruction file should stay scannable; target under 200 lines.
  3. Avoid duplication. Check whether the information already exists before adding it.
  4. Match the existing style. Follow the tone and format of the current file.
  5. Durable facts only. Persist hard-won lessons, infrastructure facts, and workflows. Session-specific notes belong in client memory or a gitignored local notes file, never the committed project instruction file.

Version History

  • 4bade34 Current 2026-11-03 06:22

    从仅支持 CLAUDE.md 升级为优先处理 AGENTS.md,增加对双文件共存及导入关系的解析逻辑,提升客户端兼容性。

  • cdf2292 2026-08-20 05:10

    缩短技能描述以节省字符预算,并将全文中的破折号替换为逗号(保留特定用途的破折号)。

  • 2ba6c24 2026-07-25 10:49

Same Skill Collection

dev-toolkit/skills/accessibility-compliance/SKILL.md
dev-toolkit/skills/context-engineering-fundamentals/SKILL.md
dev-toolkit/skills/director/SKILL.md
dev-toolkit/skills/electron-dev/SKILL.md
dev-toolkit/skills/mobile-debugging/SKILL.md
dev-toolkit/skills/one-way-door/SKILL.md
dev-toolkit/skills/ponytail-dev/SKILL.md
dev-toolkit/skills/python-pipeline/SKILL.md
dev-toolkit/skills/surface-completeness/SKILL.md
dev-toolkit/skills/test-first-bugs/SKILL.md
dev-toolkit/skills/vibe-coding/SKILL.md
dev-toolkit/skills/web-scraping/SKILL.md
dev-toolkit/skills/web-ui-best-practices/SKILL.md
dev-toolkit/skills/zero-build-frontend/SKILL.md
journalism-core/skills/ai-writing-detox/SKILL.md
journalism-core/skills/brazil-records-requests/SKILL.md
journalism-core/skills/crisis-communications/SKILL.md
journalism-core/skills/data-journalism/SKILL.md
journalism-core/skills/editorial-workflow/SKILL.md
journalism-core/skills/fact-check-workflow/SKILL.md
journalism-core/skills/foia-requests/SKILL.md
journalism-core/skills/interview-prep/SKILL.md
journalism-core/skills/interview-transcription/SKILL.md
journalism-core/skills/meeting-transcript-actions/SKILL.md
journalism-core/skills/newsletter-publishing/SKILL.md
journalism-core/skills/newsroom-style/SKILL.md
journalism-core/skills/photo-metadata/SKILL.md
journalism-core/skills/social-media-intelligence/SKILL.md
journalism-core/skills/source-verification/SKILL.md
journalism-core/skills/story-pitch/SKILL.md
newsroom-agent-ops/skills/chat-mention-triage/SKILL.md
newsroom-agent-ops/skills/deadline-and-reply-tracking/SKILL.md
newsroom-agent-ops/skills/document-delivery/SKILL.md
newsroom-agent-ops/skills/email-request-intake/SKILL.md
newsroom-agent-ops/skills/issue-pool-progression/SKILL.md
newsroom-agent-ops/skills/multi-agent-coordinator/SKILL.md
newsroom-agent-ops/skills/record-reconciliation/SKILL.md
newsroom-agent-ops/skills/scheduled-briefing/SKILL.md
newsroom-agent-ops/skills/unattended-agent-runs/SKILL.md
okf-wiki/SKILL.md
pdf-design/SKILL.md
pdf-playground/skills/document-design/SKILL.md
project-templates-toolkit/skills/goal-progress-bar/SKILL.md
project-templates-toolkit/skills/project-memory/SKILL.md
project-templates-toolkit/skills/project-retrospective/SKILL.md
project-templates-toolkit/skills/template-selector/SKILL.md
research-toolkit/skills/academic-writing/SKILL.md
research-toolkit/skills/content-access/SKILL.md
research-toolkit/skills/digital-archive/SKILL.md

Metadata

Files
0
Version
4bade34
Hash
2e07a19e
Indexed
2026-07-25 10:49

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 22:55
浙ICP备14020137号-1