/kenji:workflow-spec-tddfrom kenji skills
Enforces a spec → plan → TDD loop before writing code. Activates for ambiguous tasks, recurring bugs, or when LLM output keeps being wrong. Use via workflow-build-feature (full feature) or workflow-fix-and-ship (one bug).
Ships in kenji skills. 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.
Read when SKILL.md points to them.
Degree of freedom: MIXED. Approach choice and spec content [HIGH freedom];
phase order, RED-before-GREEN, and Phase 5 checklist [LOW freedom — run exactly].
The antidote to vibe-coding. LLMs fail not because they can't write code, but because they skip the thinking: they guess requirements, write code before tests, and declare victory without verification. This skill forces the discipline. Stack-agnostic — works for web, React Native, and Capacitor.
Adapted from obra/superpowers (MIT) and the Karpathy LLM-coding guardrails.
| Skill | Owns |
|---|---|
| workflow-spec-tdd (this) | Spec, plan, TDD loop before writing a line |
workflow-build-feature | Feature end to end through unit tests, Playwright, PR |
workflow-fix-and-ship | One bug-fix lifecycle from triage to PR |
Restate: add coupon codes on checkout (web), not a new promotions engine. Contract: one optional code; invalid → inline error; valid → discounted total; out of scope: stacking, expiry admin UI. RED: test
applyCoupon('SAVE10')on a $40 cart expects $36 — fails because helper is missing. Verify: GREEN is the helper only; Playwright later lives inworkflow-build-feature, not here.
workflow-build-feature; one production bug → workflow-fix-and-shipUse for: a new feature, a multi-file refactor, a recurring bug, anything ambiguous, or any task where "looks done" has burned you before.
Skip for: one-line edits, pure formatting, a single obvious fix. Don't ceremony-tax trivial work.
0. Read the room → understand repo + exact ask
1. Brainstorm → surface assumptions, explore alternatives
2. Spec → write the contract: behavior, inputs, outputs, edge cases
3. Plan → ordered, file-mapped steps with a verification per step
4. TDD → RED (failing test) → GREEN (minimal code) → REFACTOR, per step
5. Self-review → spec coverage + quality gate before "done"
mobile-capacitor-platform, mobile-rn-performance, enhance-*), note it.Write a short spec before coding. Template:
## Spec: [feature]
- Behavior: [what it does, observable]
- Inputs: [shape, types, sources]
- Outputs / side effects: [returns, DB writes, navigation, events]
- Edge cases: [empty, error, offline, large, concurrent, unauthorized]
- Out of scope: [what this explicitly does NOT do]
- Done when: [the concrete, checkable success criteria]
"Done when" must be verifiable, not "it works". Weak criteria produce weak code.
## Plan
1. [file] — [change] — verify: [test/command]
2. [file] — [change] — verify: [test/command]
...
- New deps (if any): [pkg@version — why]
- Migrations / schema / RLS / edge fns touched: [list — deploy in same turn per full-stack-ship-discipline]
- Risk: [low/med/high per step]
When steps depend on each other, order them so each leaves the tree green and note the intermediate state and side effects a later step relies on.
For each plan step:
Rules:
mobile-emulator-test for device; Capacitor → vitest + mobile-capacitor-platform E2E.Run this checklist. If any box fails, you are not done:
- [ ] Every "Done when" criterion is met and verified (not assumed)
- [ ] Every spec edge case is handled or explicitly deferred in the spec
- [ ] Tests fail without the change and pass with it (RED was real)
- [ ] No placeholder / TODO / dead code / stubbed return left behind
- [ ] No unrequested scope crept in (YAGNI held)
- [ ] Backend deps deployed + verified on the remote, not just on disk
- [ ] Error path actually exercises the new code (logs/network confirm, not a stale 404)
- [ ] Narrowest verification command for the surface was run and is green
full-stack-ship-discipline.workflow-coding-discipline — behavioral guardrails (this skill operationalizes them).full-stack-ship-discipline — Phase 5 backend-deploy gate.mobile-capacitor-platform / mobile-rn-performance / enhance-* — surface domain knowledge for the plan.test-playwright / mobile-emulator-test / test-unit — the verification runners for Phase 4–5.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kensaurus/skills --plugin kenji162 skills in this plugin
/audit-accessibilityWCAG 2.2 AA audit via playwright-cli: axe-core, keyboard, contrast, target size, focus, ARIA. Use when "audit accessibility", "check a11y", "WCAG audit", "check keyboard nav", or "test screen reader".
/audit-agent-speedMeasure and fix a slow coding-agent setup: status line, hooks, instruction bloat, effort, worktree pile-up, antivirus and indexer scans. Use when "Claude is slow" or "CPU is pinned". App speed → audit-performance.
/audit-analyticsRead-only audit of product-analytics events (PostHog, Amplitude, Mixpanel, GA4): taxonomy, funnels, consent-gated firing, dead or duplicate events. Use when "audit our analytics", "are we tracking the right events", or "funnel instrumentation".
Other plugins' skills for the same job