/kenji:workflow-coding-disciplinefrom kenji skills
Provides guardrails for writing, editing, refactoring, or debugging code: surface assumptions, prioritize simplicity, make surgical changes. Useful when vibe-coding produces wrong results or for think-before-coding workflows.
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.
None: SKILL.md is the whole skill.
Degree of freedom: HIGH. How strictly to apply each guardrail is judgment. Trivial one-liners may skip the full loop; a wrong architectural guess may not.
Observe: user said "just add caching"; repo already has TanStack Query on the same endpoint. Interpret: a second cache would duplicate, not simplify. Classify: ask, then reuse Query — do not add Redis. Check: surgical edit; no new abstraction.
workflow-refactor; repo-wide pattern → audit-code-qualityFour guardrails to apply on every non-trivial coding task. Bias toward caution over speed. For trivial one-liners (typo fixes, obvious renames), use judgment — not every change needs full rigor.
If a project's own rules contradict any guideline below, the project rules win.
State your assumptions. Say when you're confused. Surface tradeoffs.
Before writing code:
Anti-pattern: Reading an ambiguous request, picking one interpretation, building 200 lines, then discovering the user meant something else.
Minimum code that solves the problem. Nothing speculative.
try/catch, ?. chains, or Array.isArray() guards as the primary fix — those are symptom suppressors. Fix the root cause first; harden second.The test: Would a senior engineer reading this say it's overcomplicated? If yes, simplify.
Touch only what you must. Clean up only your own mess.
When editing existing code:
When your changes create orphans:
The test: Every changed line in the diff should trace directly to the user's request. If a reviewer asks "why is this line different?" you should have an answer rooted in the task.
Define success criteria. Loop until verified.
Transform imperative tasks into verifiable goals:
| Instead of... | Transform to... |
|---|---|
| "Add validation" | "Write tests for invalid inputs, then make them pass" |
| "Fix the bug" | "Write a test that reproduces it, then make it pass" |
| "Refactor X" | "Ensure tests pass before and after" |
| "Make it work" | "Define what 'work' means as a verifiable check, then verify" |
For multi-step tasks, say in one line what you are about to do before the first tool call, then list the steps with the check that proves each:
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
Strong success criteria let you loop independently. Weak criteria ("make it work") force the user back into the loop to clarify.
Before saying "done", confirm:
Source: Adapted from forrestchang/andrej-karpathy-skills, distilled from Andrej Karpathy's observations on LLM coding pitfalls. MIT licensed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
coding-discipline, code-quality, refactoring, debugging, simplicity
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".
/audit-auth-flowsRead-only audit of app-layer auth: route×gate matrix, session lifecycle, OAuth, provider traps (getSession vs getUser, middleware-only gates, CVE-2025-29927). Use when "audit our auth" or "check middleware protection". RLS → plan-rls-audit.
/audit-backend-architectureRead-only backend-architecture audit and pattern advisor, gated by stack. Use when "audit backend architecture", "which pattern should I use", "am I over-engineering", or "sync vs event-driven". Enforced boundaries → enhance-arch-boundaries.
/audit-bundle-sizeAnalyse and shrink a web app's JavaScript bundle. Use when "reduce bundle size", "code splitting", "slow initial load", or "why is the bundle so big". Runtime → audit-performance.
Other plugins' skills for the same job