nestjs-mcp-server: Skill for Claude Code

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

test-first is a skill for Claude Code from adrian-d-hidalgo/nestjs-mcp-server. It costs 76 tokens per session (2,771 once invoked), scanned A, original, MIT.

A test-first protocol for the NestJS MCP server, explaining when tests must be written before code and how to verify they fail for the right reason.

In plain words
What is it for?
Handling bug fixes, new public features, and other changes according to the project's defined testing and verification rules.
Why use it?
It prevents tests from merely confirming code that was already written and makes the evidence for a change more trustworthy.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is adrian-d-hidalgo/nestjs-mcp-server's own configuration. It tells Claude Code how to work on nestjs-mcp-server 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 nestjs-mcp-server configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/adrian-d-hidalgo/nestjs-mcp-server/main/.claude/skills/test-first/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/adrian-d-hidalgo/nestjs-mcp-server

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/adrian-d-hidalgo/nestjs-mcp-server/test-first/github.svg)](https://agentmods.dev/skills/adrian-d-hidalgo/nestjs-mcp-server/test-first)
Your own site
<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.

agentmods 80×15 button for test-first

Your own site · 80×15
<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>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,771 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.00076 $0.02771
Opus 5 $0.00038 $0.01385
Sonnet 5 $0.00015 $0.00554
Haiku 4.5 $0.00008 $0.00277

Measured 10d ago against content hash 075fb4f12ce2, 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 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.

.claude/skills/test-first/SKILL.md · 147 lines

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.

Read the full file on GitHub · 147 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. 10d ago First seen · 147 lines · 76 tokens per session scan A 075fb4f12ce2

Subscribe to this mod's changes

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.