habit-hooks-prompting
Write or revise a habit-hooks coaching prompt. Use when a linter / knip / jscpd rule fires and the agent's default fix is wrong…
Spawn a reviewer sub-agent to assess a change set against habit-hooks's coding principles. Use AFTER habit-hooks reports clean — habit-hooks catches structural smells; this catches what it cannot (correctness, tests, design, missed edge cases).
$ npx -y skills add habit-hooks/habit-hooks --skill habit-hooks-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/habit-hooks-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Spawn a reviewer sub-agent to assess a change set against habit-hooks's coding principles. Use AFTER habit-hooks reports clean — habit-hooks catches structural smells; this catches what it cannot (correctness, tests, design, missed edge cases).
name: habit-hooks-review description: "Spawn a reviewer sub-agent to assess a change set against habit-hooks's coding principles. Use AFTER habit-hooks reports clean — habit-hooks catches structural smells; this catches what it cannot (correctness, tests, design, missed edge cases)."
You are reading this because `habit-hooks` reported clean and you (the implementing agent) need a second pair of eyes on the change set before declaring the work done.
A green habit-hooks run is necessary, not sufficient. habit-hooks catches structural smells — oversized functions, high complexity, `any`, dead bindings, stale `TODO`s, comments standing in for unclear code. It cannot see:
This skill spawns a reviewer sub-agent to look for exactly those things.
Use the `Task` tool to spawn a `general-purpose` sub-agent with the brief below. Do **not** review the change yourself first — the value of this skill is the fresh read. Include the diff scope (commit range, branch, or staged files) in the brief so the reviewer knows what to look at.
Paste this verbatim into the Task tool's `prompt`, filling in the change-set scope at the top:
---
You are reviewing a change set against the principles below. The implementing agent has already run `habit-hooks` and it reports clean — so structural smells (function size, parameter count, complexity, file length, `any`, unused vars, etc.) are already covered. **Do not re-flag anything habit-hooks catches.** Focus on what habit-hooks cannot see.
**Change set under review:** `<describe scope: commit range, branch diff, or staged files>`
**Ground rules:**
**Principles to review against:**
**Categorise findings:**
**Confirm the gate:**
Run (or read the most recent output of) all four scripts: `typecheck`, `lint`, `test`, `build`. Detect the package manager from the lockfile in the project root (`pnpm-lock.yaml` → `pnpm`, `yarn.lock` → `yarn`, `bun.lock` or `bun.lockb` → `bun`, otherwise `npm`) and invoke accordingly — pnpm/yarn/bun take the script name directly (`pnpm typecheck`), npm needs `run` (`npm run typecheck`).
All four must exit 0. Report each exit code in the output.
**Output format (return this verbatim):**
## Verdict <PASS | CHANGES NEEDED> ## Findings ### Blocking - <file:line — one-line summary. One short paragraph of detail.> - (or: "None.") ### Worth flagging - <file:line — one-line summary. One short paragraph of detail.> - (or: "None.") ### Nits (max 2) - <file:line — one-line summary.> - (or: "None.") ## Gate output - typecheck: exit <code> - lint: exit <code> - test: exit <code> - build: exit <code> ## Specific calls <Anything that does not fit the categories above — design questions for the author, a follow-up worth scheduling, a pattern worth a CLAUDE.md note. Keep it short or omit the section entirely.>
---
`code-style-review` is invoked by a human, on a file or a region, to start a discussion before refactoring. It lists problems for the human to triage and prioritise.
`habit-hooks-review` is invoked by an agent, after a clean automated gate, to get a second-pass quality read on a finished change set. The shape of the output is different — verdict-driven, scoped to the diff, framed for an agent that is about to declare done.
The two skills are complementary, not interchangeable. Do not use `code-style-review` as a stand-in here: it will not check the gate, will not categorise by blo
Turn best-practice coding advice into AI habits. Stop reciting software engineering literature to your AI agent.
Write or revise a habit-hooks coaching prompt. Use when a linter / knip / jscpd rule fires and the agent's default fix is wrong…
Cut a new release of the habit-hooks packages. Use when asked to release, publish, or bump the version. Reviews what lands,…
Write or trim habit-hooks documentation under docs/. Use when creating, editing, reviewing or cutting any doc in this repo —…