dokkabei97/hardened-claude-code/sync-claude-md
Claude Code and agent skill by dokkabei97/hardened-claude-code
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Analyzes code changes before commit/PR to determine whether CLAUDE.md needs to be updated. Detects architecture changes, new integrations, convention changes, environment/tool changes, etc., and proposes and executes CLAUDE.md updates when necessary.
Install
npx vskill@latest install dokkabei97/hardened-claude-code/sync-claude-mdSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as dokkabei97/hardened-claude-code/sync-claude-md.
Sync CLAUDE.md - Automatic CLAUDE.md Synchronization Based on Code Changes
Overview
Automatically analyzes whether work should be reflected in CLAUDE.md before commit/push or PR/MR, and performs updates when necessary. If the monorepo-init skill is responsible for creating CLAUDE.md, this skill is responsible for maintaining CLAUDE.md after work is completed.
1. Activation Rules
| Trigger Type | Condition | Behavior | |
|---|---|---|---|
| Manual | Explicit invocation such as "CLAUDE.md sync", "sync claude md" | Execute full Phase 1~5 | |
| Auto-suggest | Completion signal detected such as "commit", "push", "create PR" | Ask "Shall I check whether CLAUDE.md needs to be updated?" → Execute upon approval |
2. Behavioral Flow
Phase 1: CLAUDE.md Discovery and Loading
Phase 2: Collecting Change Scope
Auto-detect mode:
| Condition | Analysis Target | Description | |
|---|---|---|---|
| Staged changes exist | git diff --cached | Pre-commit scenario | |
| User mentions "PR", "MR" | git diff main...HEAD | Pre-PR scenario | |
| Fallback | git diff HEAD | All uncommitted changes |
Collected items:
Phase 3: Change Classification (Determining Update Necessity)
Analyzes the collected diff to determine whether CLAUDE.md update is necessary.
Update Required (Yes):
| Change Category | Detection Signals | |
|---|---|---|
| Architecture change | New directory structure created, module boundary changes, layer additions | |
| New integration/MCP | mcp/ file changes, new external service clients, API integration additions | |
| Convention/pattern change | Linter config changes, new coding standard files, new common utility/base classes | |
| Environment/tool change | Dockerfile, docker-compose, CI/CD config, Makefile changes | |
| Major dependency addition | New framework/library additions (excluding patch updates) | |
| Workflow change | New git hooks, new scripts, new CI stages | |
| Skill/command addition | New files in skills/, commands/, claude/commands/ |
No Update Required (No):
| Change Category | Description | |
|---|---|---|
| Simple bug fix | Minor changes to existing files, no new patterns | |
| Feature addition within existing patterns | New feature files following existing structure | |
| Test addition | Test files following existing test conventions | |
| Documentation changes | README, docs, comment changes | |
| Refactoring | Renames, moves within existing patterns |
Detection Pattern Details:
Phase 4: Decision and Proposal
When no update is required:
→ Stop here
When update is required:
Phase 5: Execute CLAUDE.md Update
3. Update Section Mapping
Provides guidance on which sections of CLAUDE.md should be updated for each change category.
| Change Category | Target CLAUDE.md Section | Update Content | |
|---|---|---|---|
| Architecture change | Architecture / Structure | Reflect new modules, directory structure | |
| New integration/MCP | Integrations / MCP | Add new MCP servers, external integrations | |
| Convention/pattern change | Conventions / Coding Standards | Document new rules, patterns | |
| Environment/tool change | Development Setup / Commands | Add new tools, commands | |
| Major dependency addition | Tech Stack / Dependencies | Record new libraries | |
| Workflow change | Workflow / CI/CD | Document new workflow stages | |
| Skill/command addition | Skills / Commands | Update skill, command listings |
4. Tool Coordination
| Tool | Purpose | |
|---|---|---|
| Glob | Search for **/CLAUDE.md file locations | |
| Read | Read current CLAUDE.md content, analyze config files | |
| Bash | Collect change scope with git diff, git diff --cached, git diff main...HEAD, etc. | |
| Grep | Detect patterns in diff content (new imports, config files, MCP configs, etc.) | |
| Edit | Modify existing CLAUDE.md sections | |
| Write | Add new sections to CLAUDE.md (when needed) |
5. Examples
Example 1: Sync after adding an MCP server
Example 2: Sync after adding a new skill
Example 3: Simple bug fix (no update required)
Example 4: Full change analysis before PR
6. Boundaries
Will:
- Automatically analyze changes and determine whether CLAUDE.md update is necessary
- Propose specific update content when update is needed
- Execute CLAUDE.md update after user confirmation
- Provide agents-md-copy skill integration guidance
Will Not:
- Modify CLAUDE.md without user confirmation
- Modify
~/.claude/CLAUDE.md(global config) — only project-level targets - Create CLAUDE.md from scratch when it does not exist (that is the monorepo-init role)
- Directly execute code modifications or git commit
- Modify project files other than CLAUDE.md
7. Related Skills
| Skill | Relationship | |
|---|---|---|
monorepo-init | Initial CLAUDE.md creation → This skill handles subsequent maintenance | |
agents-md-copy | AGENTS.md synchronization after CLAUDE.md update | |
issue-tracker | Workflow skill that can operate alongside at commit/PR time |
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sync-claude-md/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dokkabei97/hardened-claude-code/sync-claude-md)