Detect template version drift and guide migration to the latest template version.

MITAuto-check: notesAgent Workflows

Install Ghm Template Sync

skills CLI
$ npx skills add mattgierhart/PRD-driven-context-engineering --skill ghm-template-sync -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mattgierhart/PRD-driven-context-engineering ghm-template-sync --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mattgierhart/PRD-driven-context-engineering.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ghm-template-sync .claude/skills/ghm-template-sync && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ghm-template-sync
GitHub stars
180
Token cost
~1.1k tokens
SKILL.md length
401 words
Files
1
Skills in repo
45
Repo updated
First seen
Licence
MIT

At a glance

Detect template version drift and guide migration to the latest template version.

  • Works in 5 steps: Detect Current State → Diff Against Template → Generate Migration Plan → …
  • Requests to sync with template
  • SKILL.md covers Workflow, Version Migration Matrix and Safety Rules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Ghm Template Sync is an agent skill from mattgierhart/PRD-driven-context-engineering. 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".

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: PRD-Led Context Engineering — Memory as Infrastructure. An ontology layer for product teams building products that solve real problems — with AI agents that remember. Gated PRD… The licence is MIT.

When your agent uses it

  • Requests to sync with template
  • Update template version
  • Check for template drift
  • User asks sync template

Example prompts

  • “sync template”
  • “update to v3”
  • “template drift”
  • “/ghm-template-sync”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Glob, Grep, Bash

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Detect Current State
  2. Diff Against Template
  3. Generate Migration Plan
  4. Execute Safe Updates
  5. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 30ed1b0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Glob
    • Grep
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ghm Template Sync loads about 1.1k tokens when it runs. Until then it costs about 108 tokens; SKILL.md has 401 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Glob, Grep, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mattgierhart/PRD-driven-context-engineering at commit 30ed1b0, republished under its MIT licence (© mattgierhart). 401 words, ~1,055 tokens.

Download SKILL.mdSave it as .claude/skills/ghm-template-sync/SKILL.md (or your agent's skills folder).
name
ghm-template-sync
description
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".
allowed-tools
Read, Write, Edit, Glob, Grep, Bash
disable-model-invocation
true
context
fork

Template Sync

Detect template version drift and migrate to the latest template version.

Workflow

Phase 1: Detect Current State
  1. Read .claude/VERSION (if it exists) to get current template version
  2. If no VERSION file, check CLAUDE.md frontmatter for template_version
  3. If neither exists, assume v1.0.0 (pre-versioning)
  4. Report: "Your repo is on template v{X}. Latest is v{Y}."
Phase 2: Diff Against Template

Compare 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.sh
  • CHANGELOG.md
  • MIGRATION.md

Check 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.md

Check for structure issues:

  • settings.json: Does it use 3-level nesting? Are timeouts in seconds?
  • Agent directories: Do horizon/, studio/, devlab/, metro/ subdirectories exist with AGENT.md + MEMORY.md?
  • EPIC template: Does it use semantic headers (not numbered)?
  • Frontmatter: Do key files have template_version?
Phase 3: Generate Migration Plan

Output a table:

FileStatusActionRisk
.claude/VERSIONMissingCopy from templateNone
.claude/hooks/*.pyStaleDelete (replaced by .sh)None
.claude/agents/HORIZON.mdStaleSplit into horizon/AGENT.md + MEMORY.mdPreserve MEMORY.md content
settings.jsonOutdatedUpdate hook nesting + commandsCheck for custom hooks
CLAUDE.mdMissing frontmatterAdd template_version: "3.0.0"None
Phase 4: Execute Safe Updates

Auto-safe (do without asking):

  • Create .claude/VERSION with current template version
  • Add template_version frontmatter to files that lack it
  • Report what was done

Confirm first (show diff, ask user):

  • Update settings.json hook configuration
  • Restructure agent files (must preserve MEMORY.md)
  • Delete stale Python hooks
  • Update EPIC template headers

Never touch (product-specific):

  • PRD.md content (only add frontmatter)
  • SoT/*.md content
  • epics/EPIC-*.md content (only update headers on closed EPICs)
  • .claude/agents/*/MEMORY.md content
  • README.md content
Show full SKILL.md (133 more words)Show less
Phase 5: Verify

After all changes:

  1. Test all shell hooks produce valid JSON
  2. Verify no Python hooks remain
  3. Confirm settings.json uses correct nesting
  4. Check agent subdirectories have both AGENT.md and MEMORY.md
  5. Report summary of changes made

Version Migration Matrix

FromToKey Changes
v1.0.0v2.0.0Add skills, hooks, agents, SoT standardization
v2.0.0v3.0.0Shell hooks, agent subdirs, semantic EPICs, versioning, domain-profile
v1.0.0v3.0.0All of the above (cumulative)

Safety Rules

  1. NEVER overwrite MEMORY.md -- these contain product-specific agent memory
  2. NEVER modify SoT content -- only add section markers or frontmatter
  3. NEVER modify PRD.md content -- only add frontmatter version
  4. ALWAYS show diff before destructive changes (deletes, restructures)
  5. ALWAYS verify hooks work after updating settings.json
  6. Commit changes incrementally -- one commit per phase, not one giant commit

© mattgierhart, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/ghm-template-sync of mattgierhart/PRD-driven-context-engineering.

Open the folder on GitHubat commit 30ed1b0

Compare with similar skills

Ghm Template Sync next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ghm Template Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ghm Template Sync this skillmattgierhart/PRD-driven-context-engineering180—~1.1kAutomated safety check: NotesMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k35 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers297k2 repos~5.1kAutomated safety check: PassMIT
Skill CreatorAzure/azqr79689 repos~8.2kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 35 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    297k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    796 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed

More from mattgierhart/PRD-driven-context-engineering

All 45 skills in this repo
  • Ghm Gate Check

    mattgierhart/PRD-driven-context-engineering

    Validates gate criteria before PRD lifecycle advancement by delegating to the readiness scoring pipeline (scripts/readiness.py).

    180 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check: notes
  • Ghm Harvest

    mattgierhart/PRD-driven-context-engineering

    Extracts durable insights from temp/ files to SoT during EPIC Phase E.

    180 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Ghm Id Register

    mattgierhart/PRD-driven-context-engineering

    Validates and registers new SoT IDs with cross-reference integrity.

    180 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Ghm Sot Builder

    mattgierhart/PRD-driven-context-engineering

    Creates new Source of Truth (SoT) files when existing templates don't fit your needs.

    180 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Prd V01 Problem Framing

    mattgierhart/PRD-driven-context-engineering

    Transform vague product ideas into evidence-anchored problem statements for PRD v0.1 Spark.

    180 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Prd V01 User Value Articulation

    mattgierhart/PRD-driven-context-engineering

    Transform validated pain points into articulated user value statements for PRD v0.1 Spark.

    180 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Ghm Template Sync

What does Ghm Template Sync do?

Detect template version drift and guide migration to the latest template version. Ghm Template Sync is an agent skill from mattgierhart/PRD-driven-context-engineering. Detect template version drift and guide migration to the latest template version.

When should I use Ghm Template Sync?

Ghm Template Sync fits situations like: requests to sync with template; update template version; check for template drift; user asks sync template.

How do I install Ghm Template Sync in Claude Code?

Run `npx skills add mattgierhart/PRD-driven-context-engineering --skill ghm-template-sync -a claude-code`. Or copy the skill folder (.claude/skills/ghm-template-sync in mattgierhart/PRD-driven-context-engineering) into .claude/skills/ghm-template-sync in your project. Claude Code loads it when a task matches its description.

How do I install Ghm Template Sync in Codex?

Run `npx skills add mattgierhart/PRD-driven-context-engineering --skill ghm-template-sync -a codex`. Or copy the skill folder (.claude/skills/ghm-template-sync in mattgierhart/PRD-driven-context-engineering) into .agents/skills/ghm-template-sync in your project. Codex loads it when a task matches its description.

Can I use Ghm Template Sync in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mattgierhart/PRD-driven-context-engineering --skill ghm-template-sync -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ghm-template-sync, .gemini/skills/ghm-template-sync, .github/skills/ghm-template-sync and .opencode/skills/ghm-template-sync in your project.

What does Ghm Template Sync need to run?

SKILL.md names no scripts, command-line tools or credentials: Ghm Template Sync is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash.

Does Ghm Template Sync access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ghm Template Sync safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Ghm Template Sync use?

Ghm Template Sync is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ghm Template Sync use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ghm Template Sync?

Skills that share tags, products or a category with Ghm Template Sync: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 297k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ghm Template Sync?

mattgierhart (a GitHub user) maintains it in mattgierhart/PRD-driven-context-engineering, which has 180 GitHub stars. The repository holds 45 skills in this directory. The repository was last updated on August 31, 2026.

Source: mattgierhart/PRD-driven-context-engineering on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.