Back to Skills

sync-claude-md

verified

Synchronize project CLAUDE.md with recent codebase changes by analyzing git history, reviewing against official Anthropic best practices using parallel agents, and proposing comprehensive updates. Use when CLAUDE.md is outdated or doesn't exist.

View on GitHub

Marketplace

bengous-plugins

bengous/claude-code-plugins

Plugin

claude-meta-tools

Repository

bengous/claude-code-plugins
2stars

claude-meta-tools/skills/sync-claude-md/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/bengous/claude-code-plugins/blob/main/claude-meta-tools/skills/sync-claude-md/SKILL.md -a claude-code --skill sync-claude-md

Installation paths:

Claude
.claude/skills/sync-claude-md/
Powered by add-skill CLI

Instructions

# Sync CLAUDE.md

## Overview

This skill keeps project-level CLAUDE.md files synchronized with codebase evolution. It analyzes git history since the last CLAUDE.md update, spawns 3 parallel review agents to validate against official Anthropic documentation, and proposes comprehensive changes with user approval before applying.

**When to use:**
- CLAUDE.md hasn't been updated in many commits
- Major architectural changes occurred (new libraries, patterns, tools)
- CLAUDE.md doesn't exist and needs to be created
- User explicitly requests: `/sync-claude-md`

## Workflow Decision Tree

```
START: /sync-claude-md invoked
│
├─ CLAUDE.md exists? (check ./CLAUDE.md or ./.claude/CLAUDE.md)
│  │
│  ├─ YES → Go to "Update Existing CLAUDE.md" workflow
│  │
│  └─ NO → Go to "Create New CLAUDE.md" workflow
│
END
```

## Update Existing CLAUDE.md Workflow

### Phase 1: Discovery & Context Analysis

**Step 1.1: Locate CLAUDE.md**
- Check for `./CLAUDE.md` (preferred)
- Check for `./.claude/CLAUDE.md` (alternative)
- If both exist: warn user, prefer `./CLAUDE.md`

**Step 1.2: Find Last Update**
```bash
# Find when CLAUDE.md was last modified
git log --follow --format="%H" -1 -- CLAUDE.md

# Count commits since that update
git rev-list --count <last_commit>..HEAD
```

**Step 1.3: Determine Context Gathering Strategy**
- If commit count > 10: Use heavy analysis (subagents for context)
- If commit count ≤ 10: Direct analysis (read commits directly)

### Phase 2: Context Gathering

**When >10 commits since update:**
1. Read all commit messages between last update and HEAD:
   ```bash
   git log --oneline <last_commit>..HEAD
   ```
2. Identify major changes (library migrations, new tools, architecture shifts)
3. If changes are complex, spawn subagent(s) to analyze specific areas:
   ```
   Task: "Analyze the Effect.ts migration in commits X-Y and summarize
   what documentation changes are needed for CLAUDE.md"
   ```
4. Summarize findings concisely to preserve context window

**When 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10784 chars