mattgierhart/PRD-driven-context-engineering / .claude/skills/ghm-self-install
ghm-self-install
VerifiedInstall the PRD-Driven Context Engineering methodology into a fresh OR existing repository — the subscription-native alternative to forking the whole repo. Runs an interactive wizard that seeds the framework (.claude/ hooks, skills, agents, rules, scripts) without clobbering product content. Triggers on "install the methodology", "adopt this into my repo", "self-install", "set up PRD lifecycle here", "onboard existing project". Outputs an installed framework + a verification report.
Self-Install
Install the methodology into a target repo from the install manifest, the way Xantham's blueprint installs from markdown: the agent runtime is the installer, so the whole thing runs inside your Claude Code subscription — no API key, no metered calls, no service to stand up.
Two paths, one manifest. This skill is the interactive path.
install.shis the deterministic CLI path. Both read.claude/install-manifest.yaml, so they can't drift. Prefer drivinginstall.shfrom this skill; fall back to manual copies only when the script isn't reachable.
Consumes
.claude/install-manifest.yaml— authoritativeframework/template_seed/never_touchlists (the keystone; never hardcode file lists).install.sh— the deterministic installer this skill normally drives.- Safety rules from
ghm-template-syncPhase "Safety Rules" — never overwriteMEMORY.md,SoT/*,PRD.md,README.mdcontent.
Produces
- An installed framework in the target repo (no new SoT IDs — this skill places the engine, it doesn't author specs).
- A verification report (hooks emit valid JSON;
readiness.pyruns).
Workflow
Phase 1 — Preflight & mode detect
- Confirm
git,python3,awkare present; warn if the target isn't a git repo. - Detect mode: greenfield (no
.claude/) vs brownfield (existing.claude/). Brownfield means merge, never overwrite product. - State the trade explicitly: this installs files only — it costs subscription tokens for the wizard turn, zero API.
Phase 2 — Wizard questions
Ask only what changes the outcome (honor the execution mode's budget):
- Target directory (default: current repo).
- Domain profile:
product(default) ·library·infrastructure·research. - Subset
[standard+]: keep all 4 agents + all skills (default), or trim to a role subset. Quick mode skips this and installs everything.
Phase 3 — Install (drive install.sh)
Run the deterministic installer so behavior matches the CLI path exactly:
bash install.sh --target <DIR> --profile <PROFILE> # add --dry-run to preview
- Show the
--dry-runplan first[standard+], then execute. - If a framework file shows drift, surface the diff and only re-run with
--forceafter the user confirms (mirrorsghm-template-sync"show diff before destructive"). - Never write anything in the manifest's
never_touchlist.
Phase 4 — Verify (trust-but-verify, the Xantham verify-blueprint.sh analog)
- Run each
.claude/hooks/*.shin the target; assert valid JSON on stdout. - Run
python scripts/readiness.py run— a non-zero exit on an empty scaffold is the expected BLOCK gate (no content yet), not a failure. Report the score. - Print next steps: customize
README.md+PRD.md, then "Let's frame the problem".
Anti-patterns
| Pattern | Fix |
|---|---|
| Hardcoding the file list in the skill | Read .claude/install-manifest.yaml |
Overwriting a brownfield repo's PRD.md/SoT | Honor never_touch; seed templates once |
| Treating readiness BLOCK on a fresh scaffold as a bug | It's the gate working — report the score |
Re-implementing copy logic instead of driving install.sh | One code path = no drift |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |