kenjaku: Skill for Claude Code

.claude/skills/test-first-discipline/SKILL.md

test-first-discipline is a skill for Claude Code from tpierrain/kenjaku. It costs 117 tokens per session (6,096 once invoked), scanned A, original, Apache-2.0.

A general method for writing software by specifying expected behaviour in tests before implementing the code, then checking whether the tests catch faulty changes.

In plain words
What is it for?
Use it for libraries, tools, algorithms, services, and other code where you want fail-first tests, refactoring checks, and mutation testing to judge test quality.
Why use it?
It makes requirements explicit and exposes weak tests or incorrect assumptions early. TDD, or test-driven development, is the related practice of repeatedly writing a failing test, making it pass, and refining the code.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is tpierrain/kenjaku's own configuration. It tells Claude Code how to work on kenjaku itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kenjaku configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tpierrain/kenjaku. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tpierrain/kenjaku/main/.claude/skills/test-first-discipline/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tpierrain/kenjaku

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-first-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/tpierrain/kenjaku/test-first-discipline/github.svg)](https://agentmods.dev/skills/tpierrain/kenjaku/test-first-discipline)
Your own site
<a href="https://agentmods.dev/skills/tpierrain/kenjaku/test-first-discipline"><img src="https://agentmods.dev/badge/skills/tpierrain/kenjaku/test-first-discipline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-first-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/tpierrain/kenjaku/test-first-discipline"><img src="https://agentmods.dev/badge/skills/tpierrain/kenjaku/test-first-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,096 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.06096
Opus 5 $0.00059 $0.03048
Sonnet 5 $0.00023 $0.01219
Haiku 4.5 $0.00012 $0.00610

Measured 9d ago against content hash cde29d8c6bcf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

test-first-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/test-first-discipline/SKILL.md · 351 lines

How it starts

The opening of the file, as written. The whole thing — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test-first discipline (universal)

The name states what SURVIVED the measurement, not what was dropped: the test comes before the code, and it is seen red for the right reason first. Everything else in here is a mode, a reflex or a judge.

This skill replaces tdd-discipline (v1.1.0), and the replacement is not cosmetic. That skill opened on a rule — "one test at a time, complete red→green→refactor at each step; writing several tests ahead then implementing is forbidden" — which was measured and did not survive. Everything else it carried (fail-first, the refactor step, and above all the assertion-quality reflexes below) was kept verbatim, because that is what the measurements credit.

Why the name changed rather than the clause. What was dropped is not a ceremony inside TDD, it is TDD's own thesis: the design emerging under the pressure of one example at a time. What remains — specify, see it fail, implement, refactor, and let a mutation score judge — is honest work, but calling it TDD would be false advertising. Classic TDD did not disappear; it became a mode, described below with its criteria and its open question.

The evidence (Kenjaku, maintainers/mutation/RESULTS.md), first-pass scores on brand-new files, before any review and before any survivor was killed:

Release Mode New files, first pass
v4.9.0 strict baby-steps 84.62 % and 87.74 %
v4.9.1 design-first, test-first in small batches 91.80 %

One release is one data point, and the v4.9.1 figure only reached 95.92–100 % after three adversarial reviews and two more mutation passes. So the claim is not "the relaxed mode is free". It is: the step size did not carry the quality — the nets did.

🛑 The low numbers you are remembering are NOT baby-steps — here is what each one is

No score in this record is low because the steps were small. Every low number that gets quoted against baby-steps belongs to a different cause, and the cause is always when the test was written or whether the line sits in a seam a test can reach:

Recalled as "baby-steps scored badly" Actually What it really measures
51.5 %update-engine.mjs composition glue written after an already-green core test-after, never step size
71.4 %reconcile-brain.mjs a pure core wrapped in I/O and a CLI an unreachable branch (reflex 6)
66 %, and a flat 0 % for months top-level entry points no test ever imported the entry-point seam rule

And the reverse case, from the same audit: engine-skill-refresh.mjsthe one file built in strict baby-steps — came out top of its batch at 86.7 %, needing "only assertion polish". The two numbers actually attached to baby-steps in this record are 84.62 % and 87.74 %. There is no ~60 % baby-steps run. It does not exist.

Why this table is here rather than left to be re-derived: the misattribution has now happened twice, from both sides (the 87-vs-51 pair was long quoted in this file's own predecessor as evidence about step size; the owner recalled a "60 % baby-steps" figure on 2026-08-20). A number misfiled twice is a number that will be misfiled again — so the filing is written down, not the correction.

Read the full file on GitHub · 351 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 351 lines · 117 tokens per session scan A cde29d8c6bcf

Subscribe to this mod's changes

test-first-discipline is a skill published in the GitHub repository tpierrain/kenjaku (80 stars, last pushed today), licensed Apache-2.0. It adds 117 tokens to every session and 6,096 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.