/dev-process-toolkit:best-practices <subcommand> [args...]from dev-process-toolkit
Manage the project best-practices manifest at specs/best-practices.yaml. Add, edit, delete, or list entries cataloguing house best-practices docs with scope globs and topics that feed guidance retrieval into planning and implementation.
Ships in dev-process-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
User-invocable management surface for the best-practices manifest at specs/best-practices.yaml. The manifest catalogues repo-tracked best-practices documents — each entry names a document by repo-relative path, with optional scope glob list, topics list, and free-form notes — so house rules can be retrieved by scope and topic instead of rediscovered per session (M124).
This skill writes to specs/best-practices.yaml. It is commit-producing — the normal commit-producing branch gate applies.
Parse <command-args> (substituted in as $ARGUMENTS) and route on the first token:
add → § addlist → § listedit <name> → § editdelete <name> → § deleteIf <command-args> is empty or the first token is not one of the four above, refuse with the canonical NFR-10 shape:
best-practices: unknown subcommand '<token>'. Supported: add | edit | delete | list.
Usage: /dev-process-toolkit:best-practices <subcommand> [args...]
Exit non-zero. Do not silently default to a subcommand — the operator must name what they want.
All four subcommands operate through the shared helpers in adapters/_shared/src/best_practices_manifest.ts (readManifest, writeManifest, addEntry, removeEntry, findEntry). Never author specs/best-practices.yaml YAML by hand — the helpers enforce the canonical CLOSED schema (unknown entry keys refuse) and throw BestPracticesManifestShapeError (NFR-10 canonical refusal) on malformed input. The skill surfaces the thrown message verbatim to the operator; do not re-template.
Other tools write the manifest through the same module's CLI legs, never by editing the YAML: bun run "${CLAUDE_PLUGIN_ROOT}/adapters/_shared/src/best_practices_manifest.ts" add --specs <dir> --name <n> --path <p> [--scope "<globs>"] [--topics "<t1,t2>"] [--notes "<text>"] [--max-bytes <N>] [--sha256 <hex>] appends one entry, and bun run "${CLAUDE_PLUGIN_ROOT}/adapters/_shared/src/best_practices_manifest.ts" remove --specs <dir> --name <n> drops one. Both validate through addEntry / writeManifest, so a refusal there is the same BestPracticesManifestShapeError text.
Socratic flow. One AskUserQuestion per step, wait for the answer before asking the next. Bare-prose questions are forbidden — every operator-facing prompt below MUST be an AskUserQuestion tool_use. The Other free-form fallback is always available.
Issue AskUserQuestion:
Repo-relative path of the best-practices document to register?docs/best-practices/<topic>.md shape and docs/<name>.md shape as exemplar choices. Other is always present for free-form input.Capture the answer as path. path MUST be repo-relative — no absolute paths, no .. traversal (the exact inverse of the deps manifest's sibling-only convention; the helpers enforce it). Pre-validate before continuing — on violation, surface the BestPracticesManifestShapeError refusal text verbatim and abort.
Compute the default name from path: take the file basename, strip the .md suffix (docs/best-practices/error-handling.md → error-handling). Issue AskUserQuestion:
Confirm manifest entry name?<default-name> as the default choice, plus the explicit Other option for operator override.If the chosen name collides with an existing manifest entry, do not proceed to the optional-field prompts — short-circuit to the refusal in Step 5 below so the operator is not asked questions whose entry will be rejected.
Issue AskUserQuestion:
Which file scopes does this document govern (comma-separated globs, empty for repo-wide)?src/** shape and **/*.ts shape as exemplar choices, an explicit Repo-wide (omit scope) choice, and Other.Then issue a second AskUserQuestion:
Which topics does this document cover (comma-separated, empty to omit)?errors, logging), an explicit Omit topics choice, and Other.Capture the answers as the optional scope and topics string lists. Empty answers omit the field.
Issue AskUserQuestion:
One-line notes for this entry (empty to omit)?Omit notes choice plus Other for free-form input.Capture the answer as the optional notes scalar.
Then issue one AskUserQuestion for each of the two optional integrity fields:
max_bytes — Question: Largest size in bytes this document may grow to (empty to omit)? Options: an explicit Omit max_bytes choice plus Other. A positive integer.sha256 — Question: Pin the document's sha256 digest (empty to omit)? Options: the digest of the file at path as computed now, an explicit Omit sha256 choice, and Other. 64 lowercase hex characters.Empty answers omit the field.
Verify the document exists on disk (Read / Bash test -f) — a missing path gets a refusal naming the file as remedy (create <path> first, or fix the path, then re-run add); do not append the entry. When all prior steps pass, build the entry and persist:
const entry = { name, path, scope, topics, notes, max_bytes, sha256 }; // optional fields omitted when empty
addEntry(manifest, entry);
writeManifest(specsDir, manifest);
addEntry is the single authority for the name-collision invariant — it throws BestPracticesManifestShapeError on a duplicate name. Surface the thrown message verbatim and abort. The write path fails closed — validation refusals abort before writeManifest; an invalid entry is never written.
add is commit-producing (it writes specs/best-practices.yaml). After the manifest write, trigger the universal pre-commit branch gate via requireCommittableBranch (adapters/_shared/src/commit_producing_skill_branch_gate.ts) and capture the branch_gate_* outcome row. Then prompt:
Apply commit "chore(specs): add best-practices entry <name>"? [y / n / edit]
On y, stage specs/best-practices.yaml and create the commit with the exact subject above (Conventional Commits scope specs). On edit, surface the suggested commit message for operator-supplied tweaks. On n, leave the manifest written but uncommitted (the operator can commit manually later).
Print a tabular summary of every manifest entry to stdout. Read-only: no prompts, no writes, no branch gate.
readManifest(specsDir) (helper from adapters/_shared/src/best_practices_manifest.ts). On BestPracticesManifestShapeError, surface the thrown message verbatim and abort — the schema is malformed and the operator must fix specs/best-practices.yaml by hand before retrying.existsSync(join(repoRoot, entry.path)). Render the doc-status column as the literal present when the file exists, missing otherwise. The probe is purely an existence check — no content validation.name | path | scope | topics | doc-status. Use the literal em-dash — for absent scope / topics / notes fields (all optional in the schema).specs/best-practices.yaml is absent → readManifest returns an empty manifest, or the file exists with best_practices: []), skip the table and emit the literal line (no manifest entries — use /best-practices add to register a document). The closing-summary contract still fires with <N> = 0.best_practices_list_<N>_entries where <N> is the entry count (including 0), as a backticked literal token — narrative paraphrase is insufficient.Operate on the manifest entry whose name matches the <name> positional argument parsed from <command-args> (i.e., the second token after edit). Socratic flow: one AskUserQuestion per step, wait for the answer before asking the next. Bare-prose questions are forbidden — every operator-facing prompt MUST be an AskUserQuestion tool_use.
Read the manifest via readManifest(specsDir). Look up the entry via findEntry(manifest, name). If the helper returns undefined, surface the NFR-10 canonical refusal shape:
Refusing: no manifest entry named `<name>`
Remedy: pick one of: <comma-separated list of existing entry names> — or run `/dev-process-toolkit:best-practices add` to register it
Context: mode=best-practices-edit, name=<name>, manifest=specs/best-practices.yaml
Exit non-zero. Do not prompt for the field-to-change when the target is absent — the refusal is terminal.
Issue AskUserQuestion:
Which field of entry '<name>' would you like to change?path (repo-relative document path), scope (glob list), topics (topic list), notes (free-form scalar), max_bytes (positive integer size cap), sha256 (pinned digest); Other is always present for free-form input but the field name MUST be one of the six editable schema fields — anything else is rejected with the NFR-10 canonical refusal (Refusing: '<field>' is not an editable manifest field — pick one of path|scope|topics|notes|max_bytes|sha256).Capture the answer as field. name is immutable — it is the manifest's primary key (changing it would orphan downstream references). To rename, delete + re-add.
Issue a second AskUserQuestion whose Question text shows the current value plus a request for the new value:
New value for '<field>' (current: '<current-value-or-—>')?Other for free-form input. For path, include a docs/best-practices/<name>.md shape exemplar. For scope / topics, accept comma-separated lists.Capture the answer as newValue.
Validate per the canonical schema (adapters/_shared/src/best_practices_manifest.ts):
field === "path" — MUST be repo-relative: no leading /, no .. traversal. Pre-validate before the write so the operator sees a single clean refusal rather than a deep-stack BestPracticesManifestShapeError. Also verify the file exists on disk; a missing target gets a refusal naming the file as remedy.field === "scope" / field === "topics" — comma-separated string list. Empty clears the field (set to undefined).field === "notes" — opaque scalar. Empty clears the field (set to undefined).field === "max_bytes" — positive integer. field === "sha256" — 64 lowercase hex characters. Empty clears either field (set to undefined).Update entry[field] = newValue (or delete entry[field] when newValue is empty for the optional scope / topics / notes / max_bytes / sha256 fields). Call writeManifest(specsDir, manifest) — the helper re-runs the full schema validation, so a stale local edit that bypassed Step 4 still fails closed. The document on disk is never touched — edit is manifest-only.
edit is commit-producing. Trigger the universal pre-commit branch gate via requireCommittableBranch and capture the branch_gate_* outcome row. Then prompt:
Apply commit "chore(specs): edit best-practices entry <name>"? [y / n / edit]
On y, stage specs/best-practices.yaml and create the commit with the exact subject above. On edit, surface the subject for operator-supplied tweaks. On n, leave the manifest written but uncommitted.
Validation refusals (Step 1 missing-name, Step 2 non-canonical field, Step 4 schema violation) abort before the write — no best_practices_edit_<name> capability row fires.
Operate on the manifest entry whose name matches the <name> positional argument parsed from <command-args> (i.e., the second token after delete). Socratic flow: one AskUserQuestion, wait for the answer.
Read the manifest via readManifest(specsDir). Look up via findEntry(manifest, name). If undefined, surface the same NFR-10 canonical refusal shape as edit Step 1, substituting mode=best-practices-delete:
Refusing: no manifest entry named `<name>`
Remedy: pick one of: <comma-separated list of existing entry names>
Context: mode=best-practices-delete, name=<name>, manifest=specs/best-practices.yaml
Exit non-zero. No confirmation prompt fires when the target is absent — the refusal is terminal.
Issue AskUserQuestion:
Delete manifest entry '<name>'? The document at <path> will not be touched (manifest-only deletion).Yes, delete entry (proceeds to Step 3), No, cancel (aborts cleanly with no write), Other (free-form fallback).The question text MUST surface the entry's path so the operator can verify they're deleting the right entry.
On confirmation (Yes):
removeEntry(manifest, name) (idempotent — does nothing when the entry is already absent, but Step 1 guarantees presence at this point).writeManifest(specsDir, manifest) to persist the shortened entry list.<path> is never removed. Manifest-only deletion is the contract.On decline (No): do not call removeEntry or writeManifest — no filesystem mutation occurs. Skip the commit gate (nothing to commit), emit the best_practices_delete_declined_<name> capability row, and exit cleanly.
delete (confirmed branch) is commit-producing. Trigger the universal pre-commit branch gate via requireCommittableBranch and capture the branch_gate_* outcome row. Then prompt:
Apply commit "chore(specs): delete best-practices entry <name>"? [y / n / edit]
On y, stage specs/best-practices.yaml and create the commit with the exact subject above. On edit, surface the subject for tweaks. On n, leave the manifest written but uncommitted.
Every successful invocation MUST emit a closing summary on the quiet path. The status block below supersedes the shape this contract formerly mandated; the rows it names now ride inside the fence. For reference, that shape was ≥ 100 bytes on stdout and must include:
add / edit / delete → before/after row for the affected manifest entry plus the resulting specs/best-practices.yaml change line.list → the full manifest table (or the empty-manifest literal line). BOUNDED, and inside the fence. The markdown table is superseded for the CLOSING report — it is reference material to render inline when the operator asks for the manifest, not verbatim content the report reproduces above the fence, and a header + separator + one row per entry cannot fit any budget. list emits a manifest entries: <M> summary: row inside the block, then at most the first 3 entries as first 3 of <M> rows. The total <M> is always stated, so the bound is never a silent truncation — specs/best-practices.yaml still holds every entry. Authoring shape: docs/stage-status-block.md § How a stage FITS.best_practices_added_<name> — add reached writeManifest.best_practices_list_<N>_entries — list, entry count including 0.best_practices_edit_<name> — edit reached writeManifest.best_practices_deleted_<name> / best_practices_delete_declined_<name> — delete's mutually-exclusive outcomes.requireCommittableBranch (any of the branch_gate_* literal-token outcomes) for add / edit / delete runs that committed. list is read-only and skips the gate.The Next: line varies by subcommand — list recommends add; add / edit / delete recommend list.
Closing summary — the status block. /best-practices closes with exactly one stage-status-block fence as the LAST thing in its report, with at most 12 lines of prose lead-in above it — the block replaces the narration this contract formerly mandated rather than riding beneath it. Fixed section order, the - (none found) fallback and the caps live in docs/stage-status-block.md; adoption is graded by adapters/_shared/src/stage_block_adoption.ts. Skip this block when the invocation body carries the driven-run marker: the orchestrator drives the next step in the same turn.
stage: best-practices # then milestone, status, summary, gate, drive, e2e, follow_ups in fixed order — docs/stage-status-block.md
AskUserQuestion. Wait for the answer before asking the next. Bare-prose questions are forbidden. See docs/patterns.md § Pattern 26: Socratic Prompting {#pattern-socratic-prompting} for the canonical rule and docs/auto-mode-protocol.md § Socratic Loop Contract for the full contract.specs/best-practices.yaml YAML by hand — always route through the readManifest / writeManifest / addEntry / removeEntry helpers.path is repo-relative — no absolute paths, no .. traversal (the inverse of the deps manifest's sibling-only convention). The helpers enforce this; a hand-edited manifest with traversing paths fails readManifest.BestPracticesManifestShapeError verbatim; do not re-template (NFR-10).writeManifest; an invalid entry is never written.delete and edit are manifest-only — the referenced document is never created, moved, or removed by this skill.claude -p quiet-mode runs.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nesquikm/dev-process-toolkit --plugin dev-process-toolkit29 skills in this plugin
/brainstormSocratic design session for greenfield features with open solution spaces. Clarifies goals one question at a time, proposes 2-3 approaches with tradeoffs, gets design approval, then feeds into /spec-write./debugStructured debugging protocol for failed gate checks, failing tests, unexpected behavior, or a reported bug. Use when /gate-check or /tdd fails and the cause is unclear, or when a reported bug (a symptom, a ticket, a bug FR) needs its cause found and a test that proves the fix. Phases: Root Cause → Pattern Analysis → Hypothesis Testing → Implementation./deliverFull delivery pipeline orchestrator — takes a feature request from idea through specs to shipped, merged milestones by chaining the toolkit's phase skills end-to-end./depsManage the sibling-package dependency manifest at `specs/deps.yaml`. Add, edit, delete, list, or sync entries that feed topic-aware retrieval into /brainstorm and /spec-write via the deps-researcher fork./deps-researchInternal research fork — invoked exclusively by /brainstorm and /spec-write via context:fork pairing with the deps-researcher subagent. Returns topic-aware sibling-package retrieval as a ≤25-line block. Do not invoke directly./docsGenerate or update project docs (requires user_facing_mode or packages_mode true in the `docs` key of specs/settings.yaml, legacy CLAUDE.md'sOther plugins' skills for the same job