Maintain lightweight reference files per branch so Claude reads one MD file instead of re-scanning hundreds of source files. Every git operation updates the relevant reference file.
When /ccs-branch creates a new branch:
- Record parent branch and merge-base commit
- Record purpose (from user input or auto-detected from task.md)
- Initialize empty changed files table
- File:
.ccs/branches/<name>.md
As /ccs-build, /ccs-fix, or other skills modify files on a branch:
- The skill updates
.ccs/task.md(existing behavior) - On next
/ccs-branchor/ccs-diffcall, branch ref is refreshed from git state - Changed files table updated via
git diff --stat <parent>..HEAD
When /ccs-pr or /ccs-merge runs:
- Branch ref is fully regenerated with latest state
- Dependency impact analysis run against
.ccs/file-index.md - Blast radius calculated (direct changes + downstream dependents)
After /ccs-merge completes:
- Branch ref status updated to
merged - Entry appended to
.ccs/merge-history.md - Stale branch refs for deleted branches are cleaned up
- Always: On
/ccs-branchcreate - Always: On
/ccs-pr(full regeneration) - Always: On
/ccs-merge(pre and post) - On request: On
/ccs-diffbetween any two branches - Never automatically during
/ccs-buildor/ccs-fix(too expensive — only task.md is updated)
Branch refs go stale when commits happen outside CCS skills (manual git commits, other tools). Detection strategy:
- Compare ref file mtime with
git log -1 --format=%ci <branch> - If branch has newer commits than ref, mark stale and regenerate on next access
/ccs-statusreports stale branch refs
When /ccs-merge or /ccs-sync encounters conflicts:
- Read both branch refs to understand what each branch changed and why
- Cross-reference with
.ccs/file-index.mdfor file importance - Check
.ccs/architecture.mdfor module boundaries - Provide conflict resolution recommendation:
- Which side to prefer based on recency and scope
- Whether manual review is needed (both branches touched core logic)
- Dependencies that may break after resolution
All operations use local git commands only:
git branch,git checkout,git switch— branch managementgit log,git shortlog— historygit diff,git diff --stat— change analysisgit merge-tree— conflict preview without merginggit merge-base— common ancestor detectiongit stash— work-in-progress managementgit status— working tree state
Never used: gh CLI, GitHub API, external webhooks, CI/CD APIs
| Skill | Model | Rationale |
|---|---|---|
/ccs-branch |
Sonnet | Standard git operations, context file generation |
/ccs-pr |
Opus | Deep analysis of changes, PR description writing |
/ccs-merge |
Opus | Dependency analysis, conflict resolution strategy |
/ccs-diff |
Opus | Impact analysis across dependency chains |
/ccs-sync |
Sonnet | Standard pull/rebase with conflict context |
/ccs-stash |
Haiku | Lightweight stash with context logging |
/ccs-log |
Haiku | Simple history summarization |
/ccs-initgenerates the base context (project-map, file-index, etc.) that git skills reference/ccs-buildand/ccs-fixlog to task.md — git skills cross-reference these entries/ccs-statusreports branch ref freshness alongside index freshness/ccs-plancan read branch refs to understand work-in-progress across branches
Built by 10x.in — 10x-Code v2.0.0