Borrowing it
Nothing to install: this file belongs to adrian-d-hidalgo/nestjs-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/adrian-d-hidalgo/nestjs-mcp-server/main/.claude/skills/test-first/SKILL.mdgit clone --depth 1 https://github.com/adrian-d-hidalgo/nestjs-mcp-serverWrote 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.
[](https://agentmods.dev/skills/adrian-d-hidalgo/nestjs-mcp-server/test-first)<a href="https://agentmods.dev/skills/adrian-d-hidalgo/nestjs-mcp-server/test-first"><img src="https://agentmods.dev/badge/skills/adrian-d-hidalgo/nestjs-mcp-server/test-first/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.
<a href="https://agentmods.dev/skills/adrian-d-hidalgo/nestjs-mcp-server/test-first"><img src="https://agentmods.dev/badge/skills/adrian-d-hidalgo/nestjs-mcp-server/test-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00076 | $0.02771 |
| Opus 5 | $0.00038 | $0.01385 |
| Sonnet 5 | $0.00015 | $0.00554 |
| Haiku 4.5 | $0.00008 | $0.00277 |
Grade A, and why
test-first 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-first is not a virtue signal here; it buys one specific thing that is otherwise unobtainable: proof that a test constrains the code. A test written after the code it tests passes by construction. You cannot tell, later, whether it would have caught anything. Writing it first and watching it fail is the only cheap way to know.
But that argument does not apply to every change, and pretending it does produces theatre — a nominal test written to satisfy a rule, then reshaped to match whatever got built. That is worse than honest test-after, because it looks like evidence. So this skill says where the discipline bites, where it inverts, and where it does not apply at all — and requires you to state which case you are in rather than silently choosing.
| Kind of work | First thing written | Obligation | Why this and not something else |
|---|---|---|---|
| Bug fix (Mode B) | a spec that reproduces the defect | MANDATORY | The only way to prove the test fails without the fix. Written after, you would have to revert the fix to check — nobody does, which is exactly how a test that passes either way ships. |
| New capability on the public surface (Mode C) | the consumer's call site: a spec that imports from src/index.ts and uses the API exactly as a consumer would |
MANDATORY | For a published library the call site is the design. Writing it first is when an awkward signature is cheap to fix; after publication it is a breaking change. This is the highest-value row in the table and the one most often skipped. |
| Change to an existing exported signature | two specs: one at the old shape (must now fail) and one at the new | MANDATORY | It proves the SemVer impact call empirically. If the old-shape spec still passes, the change was not breaking and the SPEC said MAJOR wrongly — and vice versa. |
| Internal logic — decorator metadata, registry behaviour, guard resolution, pure functions | a unit spec on the behaviour | DEFAULT yes | Cheap, fast, and it is where a spec most easily passes by construction if written afterwards. Check the current coverage of the method you are about to touch — pnpm test:cov, or codegraph on the symbol — rather than trusting the global percentage, which hides per-method gaps. Departing from the default needs a stated reason. |
| Transport / protocol behaviour | an e2e spec, reusing the harness in test/ |
yes when a harness exists | test/ already carries base, concurrent-clients, protocol-eras, stateless-load-balancing, mcp-features and examples-smoke — check which one already sets up what you need before building a harness. If building the harness is the work, the harness is the deliverable: say so and write it first instead. |
| Refactor (Mode R) — no behaviour change | nothing new. Run the existing suite green before touching anything | INVERTED | See <TheRefactorInversion>. Test-first is the wrong instrument here and applying it hides the actual check. |
| Performance | a measurement of the current number, not a spec | MANDATORY, as a benchmark | Without a before-number, "faster" is unfalsifiable. A passing test says nothing about speed. |
| Docs / examples (Mode D) | nothing | NO | The verification is that the example runs: EXAMPLE=<name> pnpm start:example. |
| Chore / deps / toolchain / CI (Mode T) | nothing | NO | The gate is the test. pnpm typecheck passing on a new TypeScript major, pnpm audit clean, the workflow green on the new runner. Writing a spec first here is pure theatre — there is no behaviour to constrain. |
| Accepted debt (Mode X) | nothing now | NO | Its closure condition is the verifiable trigger, checked when the debt closes. |
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.
- 10d ago First seen · 147 lines · 76 tokens per session scan A 075fb4f12ce2
test-first is a skill published in the GitHub repository adrian-d-hidalgo/nestjs-mcp-server (38 stars, last pushed 1mo ago), licensed MIT. It adds 76 tokens to every session and 2,771 once invoked, about $0.0004 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.
Other skills, from other repositories
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
iterative-development
TDD iteration loops using Claude Code Stop hooks - runs tests after each response, feeds failures back automatically.
python
Python development with ruff, mypy, pytest - TDD and type safety.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
mobiai-mobile-tdd
You MUST use this before writing any implementation code for a mobile feature, bug fix, refactor, or behavior change. Tests come before implementation — no exceptions.