scaffold-hooks
Installation
SKILL.md
Universal Agent Hook Scaffold
Scaffold or migrate agent lifecycle hooks so every selected harness points at repo-owned hook scaffolding. This is the single hooks scaffolder: the former scaffold-cc-hooks, scaffold-codex-hooks, scaffold-github-copilot-hooks, scaffold-devin-hooks, and scaffold-opencode-hooks skills are retired and live here as internal harness components under harnesses/<name>/.
Decision Tree
- If the user says
/scaffold-hooks, hooks, lifecycle hooks, hook migration, or names any of Claude Code, Codex, GitHub Copilot, Devin CLI, or OpenCode hooks, use this skill. - If the user names harnesses, pass exactly those harnesses with
--harnesses <list>. A single-harness request is just--harnesses <name>. - If the user gives no target path, use the current workspace or repository root as the target project.
- If the user gives no harness preference, inspect the target project. When any supported hook surface or managed scaffold state exists, run the universal script without
--harnessesso it refreshes exactly the detected harnesses. Do not add new harnesses unless the user explicitly asks. - If no supported hook surface exists, ask which harnesses to scaffold. Default to all supported harnesses (
claude,codex,copilot,devin,opencode) for a new scaffold. - If existing configs point at
.claude/hooks/generated,.codex/hooks/generated, or.devin/hooks/generated, treat the work as a migration: strip those managed command entries, scaffoldhooks/, and remove only legacy managed folders that contain a manifest. - If the project has custom hooks outside managed roots, preserve them unless the user explicitly asks for removal.
Harness Selection
Selection order is deterministic: