> Detect template version drift and guide migration to the latest template version. Compares current repo against the template, identifies what's outdated, and automates safe updates while protecting product-specific content. Triggers on requests to sync with template, update template version, check for template drift, or when user asks "sync template", "update to v3", "template drift", "check template version".
npx skills add https://github.com/mattgierhart/PRD-driven-context-engineering --skill ghm-template-sync
Detect template version drift and migrate to the latest template version.
.claude/VERSION (if it exists) to get current template versionCLAUDE.md frontmatter for template_versionCompare your repo structure against what the current template version expects:
Check for missing files:
.claude/VERSION.claude/domain-profile.yaml.claude/hooks/HOOK_CONTRACT.md.claude/hooks/context-validation.sh.claude/hooks/context-density-gate.sh.claude/hooks/sot-update-trigger.shCHANGELOG.mdMIGRATION.mdCheck for stale files (should be removed):
.claude/hooks/context-validation.py.claude/hooks/context-density-gate.py.claude/hooks/sot-update-trigger.py.claude/agents/HORIZON.md (replaced by subdirectory).claude/agents/STUDIO.md.claude/agents/DEVLAB.md.claude/agents/METRO.mdCheck for structure issues:
settings.json: Does it use 3-level nesting? Are timeouts in seconds?horizon/, studio/, devlab/, metro/ subdirectories exist with AGENT.md + MEMORY.md?template_version?Output a table:
| File | Status | Action | Risk |
|------|--------|--------|------|
| .claude/VERSION | Missing | Copy from template | None |
| .claude/hooks/*.py | Stale | Delete (replaced by .sh) | None |
| .claude/agents/HORIZON.md | Stale | Split into horizon/AGENT.md + MEMORY.md | Preserve MEMORY.md content |
| settings.json | Outdated | Update hook nesting + commands | Check for custom hooks |
| CLAUDE.md | Missing frontmatter | Add template_version: "3.0.0" | None |
Auto-safe (do without asking):
.claude/VERSION with current template versiontemplate_version frontmatter to files that lack itConfirm first (show diff, ask user):
settings.json hook configurationNever touch (product-specific):
PRD.md content (only add frontmatter)SoT/*.md contentepics/EPIC-*.md content (only update headers on closed EPICs).claude/agents/*/MEMORY.md contentREADME.md contentAfter all changes:
settings.json uses correct nesting| From | To | Key Changes |
|------|----|-------------|
| v1.0.0 | v2.0.0 | Add skills, hooks, agents, SoT standardization |
| v2.0.0 | v3.0.0 | Shell hooks, agent subdirs, semantic EPICs, versioning, domain-profile |
| v1.0.0 | v3.0.0 | All of the above (cumulative) |
Take mattgierhart/ghm-template-sync from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.