sync-claude-md
커밋·푸시·PR/MR 직전에 이번 변경이 프로젝트 CLAUDE.md 를 낡게 만드는지 검토하고, 필요할 때만 갱신 diff 를 제안한다 — 아키텍처·디렉터리 구조, 새 통합/MCP, 컨벤션, 빌드·CI·도구, 주요 의존성 변화가 대상. 해당 없으면 한 줄로 끝낸다. Reviews whether pending changes make the project CLAUDE.md stale (architecture, integrations, conventions, build/CI/tooling, major dependencies) and proposes a minimal update diff only when needed. Use when: "CLAUDE.md 갱신 필요해?", "CLAUDE.md 동기화", 커밋/푸시/MR 전에 구조·도구가 바뀐 변경을 정리할 때, sync CLAUDE.md, check CLAUDE.md before commit or PR.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-29
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- sync-claude-md
- description
- 커밋·푸시·PR/MR 직전에 이번 변경이 프로젝트 CLAUDE.md 를 낡게 만드는지 검토하고, 필요할 때만 갱신 diff 를 제안한다 — 아키텍처·디렉터리 구조, 새 통합/MCP, 컨벤션, 빌드·CI·도구, 주요 의존성 변화가 대상. 해당 없으면 한 줄로 끝낸다. Reviews whether pending changes make the project CLAUDE.md stale (architecture, integrations, conventions, build/CI/tooling, major dependencies) and proposes a minimal update diff only when needed. Use when: "CLAUDE.md 갱신 필요해?", "CLAUDE.md 동기화", 커밋/푸시/MR 전에 구조·도구가 바뀐 변경을 정리할 때, sync CLAUDE.md, check CLAUDE.md before commit or PR.
03 SKILL.md 正文
Sync CLAUDE.md — 변경 기반 CLAUDE.md 유지보수
Overview
Before a commit/push or PR/MR, check whether the pending change makes the project CLAUDE.md
stale, and if so propose a minimal update. Creation and stack facts of a project's CLAUDE.md
belong to workflow:project-rules; this skill maintains it afterwards.
The workflow plugin ships a non-blocking PreToolUse(Bash) hook that adds a one-line reminder
to context on the session's first git commit/git push (kill switch CLAUDE_MD_SYNC_REMIND=0).
The reminder arrives with the command's result, so a needed update usually goes into a follow-up
commit (or --amend if the user prefers and the commit is not pushed).
1. When it helps
| Situation | Suggested depth |
|---|---|
| Explicit request ("CLAUDE.md sync", "CLAUDE.md 갱신 필요해?") | Phase 1~5, always report the verdict |
| About to commit/push/open an MR, and the change touched structure/tooling/conventions | Phase 1~3; if no update needed, one line at most |
| Reminder from the hook after the first commit/push | Phase 1~3 on the just-committed range (git diff HEAD~1) |
Skip it for changes that clearly stay within existing patterns (bug fix, feature in an existing layout, tests, docs) — the check should cost nothing when nothing changed.
2. Behavioral Flow
Phase 1: Locate CLAUDE.md
- Look for
CLAUDE.md>claude/CLAUDE.md>.claude/CLAUDE.mdat the project root. - If none exists: say so and point to
workflow:project-rules(creation is not this skill's job). - Read it and note the existing sections, plus any
<!-- project-rules:start -->…<!-- project-rules:end -->block — that block is owned byworkflow:project-rules; suggest/project-rules --checkinstead of editing it. git diff --cached -- '**/CLAUDE.md'— mention if CLAUDE.md is already staged.
Phase 2: Collect the change scope
| Condition | Target |
|---|---|
| Staged changes exist | git diff --cached |
| PR/MR context | git diff <default-branch>...HEAD (detect default branch, do not assume main) |
| Just committed (hook reminder) | git diff HEAD~1 |
| Fallback | git diff HEAD |
Use --name-only and --stat first; read the full diff only for files that look structural.
Phase 3: Classify
Update likely needed:
| Category | Signals |
|---|---|
| Architecture | new top-level/module directories, changed module boundaries, new layers |
| Integration/MCP | .mcp.json/mcp/ changes, new external service clients |
| Conventions | linter/formatter config, new shared base classes or utilities that others must use |
| Build/tooling/env | Dockerfile, compose, CI config (.gitlab-ci.yml, .github/workflows/), Makefile/justfile, new verify commands |
| Major dependency | new framework/library (not version bumps) in build.gradle(.kts), go.mod, pyproject.toml, package.json |
| Claude assets | new skills/, commands/, agents/, .claude/ config |
Usually not needed: bug fixes, features inside existing patterns, tests, docs, renames.
A version bump of the JDK/Kotlin/Go/Spring/Next toolchain is a stack fact — route it to
workflow:project-rules --check rather than editing the managed block here.
Phase 4: Propose
- No update needed → manual invocation: report briefly; reminder/commit context: one line or nothing.
- Update needed → show the target section(s) and a minimal diff (add/modify/remove lines).
Prefer removing stale lines over adding new ones; keep the file under ~200 lines
(official guidance: longer files consume more context and reduce adherence).
Content that matters only for part of the codebase belongs in a path-scoped
.claude/rules/file.
Phase 5: Apply (after the user agrees)
- Edit CLAUDE.md.
- Stage it with the change if a commit is about to happen; otherwise leave it for a follow-up commit.
- Summarize in 1–2 lines: "CLAUDE.md 갱신: {sections}".
3. Section mapping
| Category | CLAUDE.md section |
|---|---|
| Architecture | Architecture / Structure |
| Integration/MCP | Integrations / MCP |
| Conventions | Conventions / Coding Standards |
| Build/tooling/env | Commands / Development Setup |
| Major dependency | Tech Stack |
| Claude assets | Skills / Commands |
4. Examples
Commit with a structural change
User: "커밋 푸시 해줘"
[Phase 2] git diff --cached → docker-compose.yml added, .gitlab-ci.yml modified
[Phase 3] Build/tooling change → update likely needed
[Phase 4] Proposed diff: Commands section +2 lines (docker compose up, CI stage name)
User agrees → [Phase 5] CLAUDE.md staged with the commit
Commit within existing patterns
User: "커밋해줘"
[Phase 2] src/.../OrderService.kt 1 file, 3 lines
[Phase 3] Bug fix → no update; continue with the commit (no extra output)
Manual check
User: "CLAUDE.md 갱신 필요해?"
→ "필요 없음 — 변경 유형: 버그 수정, 1 file, 기존 구조 내"
5. Boundaries
Will:
- Review pending changes and propose minimal CLAUDE.md diffs; apply after agreement
- Stay quiet when nothing structural changed
Will Not:
- Modify
~/.claude/CLAUDE.md(global) — project-level only - Create CLAUDE.md from scratch or rewrite the
project-rulesmanaged block (→workflow:project-rules) - Run
git commit/git pushitself or modify files other than CLAUDE.md
6. Related
| Component | Relationship |
|---|---|
workflow:project-rules |
Creates CLAUDE.md stack facts and .claude/rules/; --check audits version drift |
workflow:retro (/retro) |
Routes convention-change lessons here |
hooks/remind-claude-md-sync.js |
Non-blocking first-commit reminder (CLAUDE_MD_SYNC_REMIND=0 to disable) |
04 同仓库更多 Skills
spec-driven-dev
새 기능·프로젝트·큰 변경을 코드보다 스펙 먼저로 진행하는 게이트 워크플로(SPECIFY → PLAN → TASKS → IMPLEMENT) — 가정 명시, 측정 가능한 성공 기준, Always/Ask/Never 경계, 단계별 사람 검토로 범위 이탈과 재작업을 줄인다. Spec-before-code gated workflow for new features or significant changes: explicit assumptions, measurable success criteria, boundaries, and a human review between stages. Use when: "스펙 먼저", "기능 명세", "요구사항 정리", starting a new feature or project, a significant change with vague requirements. 단순 버그 수정·1~2줄 변경엔 불필요.
shipping-guide
프로덕션 배포 전후 가이드 — 배포 전 체크리스트, 피처 플래그 수명주기, 단계적 롤아웃과 진행/보류/롤백 임계값, 롤백 계획 템플릿, 배포 후 모니터링. Production shipping guide: pre-launch checklist, feature-flag lifecycle, staged rollout with go/hold/rollback thresholds, rollback plan template, post-launch monitoring. Use when: "배포 준비", "릴리즈 전 점검", "롤아웃 계획", "롤백 계획", preparing a production deploy, staged rollout, feature flags.
retro
세션 회고·교훈 컴파운딩 — 이번 세션의 교정·실수·발견을 추출해 품질 기준(재현·일반화·판정 가능성)으로 거르고, 컨벤션 변화는 sync-claude-md 위임, 반복 실수는 tasks/lessons.md(#가드-훅-후보 태그), 스킬 지식 갱신은 수정 제안으로 나눈다. 모든 적용은 승인 후. Session retrospective that turns corrections, mistakes, and discoveries into vetted lessons routed to CLAUDE.md sync, tasks/lessons.md, or skill-edit proposals, with user approval before any write. Use when: "회고", "레트로", "교훈 정리", "같은 실수 반복", "재발 방지 규칙", retrospective, lessons learned, wrapping up a task, review, or loop. 여러 실행에 걸친 하네스 개선은 harness:evolve.
project-rules
현재 프로젝트의 스택(빌드 파일 버전, 마이그레이션 도구, ORM 유무, ES 사용, git 호스트)을 감지해 프로젝트 루트 AGENTS.md 의 마커 블록(스택 사실 + 항상 적용되는 스페셜리스트 핵심 ≤15줄 — Claude Code·Codex·Antigravity 공통)과 CLAUDE.md 의 `@AGENTS.md` 연결, Claude 전용 경로 한정 .claude/rules/<stack>-specialist.md(해당 버전에 실제로 맞는 상세 함정)를 diff 로 제안하고, 스택 플러그인을 런타임별로 프로젝트 범위에서 켜는 법을 안내한다. 이전 버전 출력(CLAUDE.md 블록·specialist-core.md)은 AGENTS.md 로 이전을 제안. --check 는 버전 불일치·사라진 ID·크기 한도·연결 누락을 점검. Detects the project's stack and proposes a cross-runtime AGENTS.md block (stack facts + always-on specialist core) linked from CLAUDE.md via @AGENTS.md, plus Claude-only path-scoped specialist rules; migrates the older CLAUDE.md-block layout; --check audits drift. Use when: "이 프로젝트 세팅", "프로젝트 규칙 생성", "AGENTS.md/CLAUDE.md 점검", project setup, generate project rules, audit AGENTS.md or CLAUDE.md drift.
post-merge
MR 머지 완료 후 Plane 이슈 종료와 Outline 문서 업데이트를 자동으로 처리하는 오케스트레이터 스킬입니다. issue-tracker와 document-latest 스킬을 연계 실행하여 머지 후 후속 작업을 일괄 처리합니다. Orchestrates post-merge follow-up after an MR is merged: chains the issue-tracker and document-latest skills to close the Plane issue and update Outline wiki docs in a single batch. Use when: an MR was just merged, closing tickets and syncing documentation after a merge, post-merge cleanup.
planning-guide
모호한 아이디어를 원페이저 계획과 실행 가능한 태스크로 바꾸는 가이드 — 문제 재진술, 가정 명시, 의존성 순서, 수직 슬라이싱, 태스크 크기(XS~XL)와 분해 기준, 태스크 템플릿. Turns vague ideas into a one-page plan and implementable tasks: problem restatement, explicit assumptions, dependency order, vertical slicing, task sizing. Use when: "계획 세워줘", "태스크로 쪼개줘", "작업 분해", "범위 정리", breaking down a feature, planning a vague request.