claude-md-sync
CLAUDE.md にプロジェクトの現在の状態を反映する。簡潔さを保ち、詳細ドキュメントへの参照で重複を避ける。
When & Why to Use This Skill
This Claude skill automates the synchronization of project state into the CLAUDE.md file, ensuring the AI agent maintains an accurate and concise understanding of the codebase. It follows best practices by referencing detailed documentation instead of duplicating content, which optimizes the context window for better AI performance and more accurate code generation.
Use Cases
- Case 1: Automatically updating the project's command list in CLAUDE.md whenever new build, lint, or test scripts are added to the repository.
- Case 2: Maintaining a lean project manifest by replacing verbose setup instructions with direct links to detailed markdown files in the docs directory to save token space.
- Case 3: Syncing agent-specific configurations and roles to ensure the AI assistant understands the current team structure and specialized agent responsibilities.
- Case 4: Streamlining project context management during rapid architectural changes by providing a standardized template for state updates and documentation references.
| name | claude-md-sync |
|---|---|
| description | | |
CLAUDE.md Sync Skill
プロジェクトの変更を CLAUDE.md に反映する際のガイドライン。
基本原則
- 簡潔に保つ - 詳細は
docs/への参照で代替 - 重複を避ける - 他ドキュメントと同じ内容を書かない
- 参照を活用 -「詳細は
docs/xxx.ja.mdを参照」形式
CLAUDE.md の構成
# Claude Code プロジェクト指示
├── 基本方針 # 変更頻度: 低
├── Git 操作ルール # 変更頻度: 低
├── プロジェクト構造 # 変更頻度: 中(参照のみ)
├── 主要コマンド # 変更頻度: 中
├── コーディング規約 # 変更頻度: 低
├── Agent 構成 # 変更頻度: 中
├── 環境構成 # 変更頻度: 低
├── インフラ構成 # 変更頻度: 低(参照のみ)
├── CI/CD # 変更頻度: 低(参照のみ)
├── セキュリティ # 変更頻度: 低
└── 参考ドキュメント # 変更頻度: 中
更新パターン
Agent 追加時
## Agent 構成
- **NewAgent** 🔧: 一行で役割を説明
各 Agent の詳細は `.claude/agents/` 配下の設定ファイルを参照。
コマンド追加時
## 主要コマンド
- `just new-command`: 一行で説明
詳細は `docs/local-dev.ja.md` を参照。
新規ドキュメント追加時
## 参考ドキュメント
- 新規トピック: `docs/new-topic.ja.md`
禁止事項
- 詳細な手順の記載(docs に書く)
- コード例の大量記載(docs に書く)
- 環境変数の値の記載(セキュリティ)
- 他ドキュメントの内容のコピー
チェックリスト
CLAUDE.md 更新時:
- 追加した内容は一行で説明できているか
- 詳細は docs への参照になっているか
- 既存の docs と重複していないか
-
just lintが通るか
参照の書き方
# OK: 参照で詳細を省略
詳細は `docs/xxx.ja.md` を参照。
# NG: CLAUDE.md に詳細を書く
### 手順
1. まず xxx をインストール
2. 次に yyy を設定
3. ...