# Ghm template sync

> Ghm template sync is an open-source agent skill for developer tools. Detects template version drift in a repo and guides safe migration to the latest version. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/mattgierhart/PRD-driven-context-engineering/tree/main/.claude/skills/ghm-template-sync
- **Repository:** https://github.com/mattgierhart/prd-driven-context-engineering
- **GitHub stars:** 179
- **License:** MIT
- **Skill name:** ghm-template-sync
- **Collection:** https://github.com/mattgierhart/PRD-driven-context-engineering
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-30

## About

This skill compares a project set up from the PRD-driven context engineering template against the version it is meant to follow. It reads the version marker from the repo, checks for missing and stale template files, and checks structure such as hook configuration, agent subdirectories and EPIC headers. The result is a migration table listing each file, its status, the proposed action and the risk involved.

The workflow is staged. Simple, low-risk additions such as creating a version file or adding frontmatter are applied directly. Changes that delete files or restructure agent and settings files are shown to the user for confirmation first. Product-specific content, including PRD and SoT files, EPICs, agent memory files and the README, is left untouched. After changes, the skill checks that shell hooks emit valid JSON, that no Python hooks remain, and that agent folders contain both their instruction and memory files.

The skill is a single SKILL.md with no bundled scripts. It works with files in the repository through standard read, write, search and shell tools, and it expects the project to follow the template's folder layout.

## When your agent uses it

> 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".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/mattgierhart/PRD-driven-context-engineering/tree/HEAD/.claude/skills/ghm-template-sync)
- [Asks for: Read, Write, Edit, Glob, Grep, Bash](https://github.com/mattgierhart/PRD-driven-context-engineering/blob/HEAD/.claude/skills/ghm-template-sync/SKILL.md)
- [License: MIT](https://github.com/mattgierhart/PRD-driven-context-engineering/tree/HEAD/.claude/skills/ghm-template-sync)

## Features

- **Template version detection:** Reads the version file or frontmatter to determine which template release the repo is on.
- **Drift and missing file checks:** Lists template files that are absent or still present after being superseded.
- **Structured migration plan:** Produces a table of files with status, action and risk for review before any change.
- **Safe versus confirmed updates:** Separates low-risk edits that run automatically from changes that need user approval.
- **Protection of product content:** Keeps PRD, SoT, EPIC bodies, agent memory and README content out of automated edits.
- **Post-migration verification:** Checks hook output, settings nesting and agent subdirectory contents after updating.

## Good for

- Check whether my repo is behind the latest PRD context engineering template
- Plan a migration from template v2 to v3 without losing agent memory
- Find stale Python hooks left over from an older template version
- Update settings.json hook nesting after a template upgrade
- Verify that agent subdirectories contain AGENT.md and MEMORY.md

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/ghm-template-sync` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mattgierhart/PRD-driven-context-engineering.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ghm-template-sync &&
cp -R "$tmp/.claude/skills/ghm-template-sync" ~/.claude/skills/ghm-template-sync &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ghm-template-sync` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ghm-template-sync` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mattgierhart/PRD-driven-context-engineering.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ghm-template-sync &&
cp -R "$tmp/.claude/skills/ghm-template-sync" ~/.agents/skills/ghm-template-sync &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ghm-template-sync` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ghm-template-sync` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mattgierhart/PRD-driven-context-engineering.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ghm-template-sync &&
cp -R "$tmp/.claude/skills/ghm-template-sync" ~/.cursor/skills/ghm-template-sync &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ghm-template-sync` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/mattgierhart/PRD-driven-context-engineering.git --path .claude/skills/ghm-template-sync
```

Or copy the folder to `~/.gemini/skills/ghm-template-sync` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ghm-template-sync`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mattgierhart/PRD-driven-context-engineering.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ghm-template-sync &&
cp -R "$tmp/.claude/skills/ghm-template-sync" ~/.copilot/skills/ghm-template-sync &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ghm-template-sync` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/mattgierhart/PRD-driven-context-engineering.git
```

Then copy `PRD-driven-context-engineering/.claude/skills/ghm-template-sync` into your agent's skills folder as `ghm-template-sync`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Ghm template sync trigger?

It is invoked on requests such as sync template, update template version, template drift or check template version. Its metadata disables automatic model invocation, so it runs when asked.

### What does Ghm template sync change in my repo?

Low-risk items like creating a version file and adding template_version frontmatter are applied directly. Deleting stale hooks, restructuring agent files and editing settings.json require showing a diff and confirmation first.

### Will Ghm template sync overwrite my agent memory or PRD content?

No. The SKILL.md says MEMORY.md files, SoT content, PRD body text and README content must not be overwritten, and only frontmatter or headers are adjusted in specific cases.

### How does Ghm template sync know what version I am on?

It reads .claude/VERSION if present, otherwise the template_version field in CLAUDE.md frontmatter, and assumes v1.0.0 if neither exists.

### How do I install Ghm template sync in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ghm-template-sync to use it in all your projects, or to .claude/skills/ghm-template-sync in one project.

### Does Ghm template sync run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Ghm template sync?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Ghm template sync?

The closest alternatives to Ghm template sync are Prd vXX skill name, Harness sync, Make PR easy to review, Intent drift and Ghm self install.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Prd vXX skill name](https://ai-powered.com/skills/prd-vxx-skill-name): Prd vXX skill name is an open-source agent skill for developer tools.
- [Harness sync](https://ai-powered.com/skills/harness-sync-chachamaru127): Harness sync is an open-source agent skill for developer tools.
- [Make PR easy to review](https://ai-powered.com/skills/make-pr-easy-to-review): Make PR easy to review is an open-source agent skill for developer tools.
- [Intent drift](https://ai-powered.com/skills/intent-drift): Intent drift is an open-source agent skill for developer tools.
- [Ghm self install](https://ai-powered.com/skills/ghm-self-install): Ghm self install is an open-source agent skill for developer tools.
- [PR](https://ai-powered.com/skills/pr): PR is an open-source agent skill for developer tools.
- [Dependency upgrade](https://ai-powered.com/skills/dependency-upgrade): Dependency upgrade is an open-source agent skill for developer tools.
- [Project retrofit](https://ai-powered.com/skills/project-retrofit): Project retrofit is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/ghm-template-sync
