Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/nirecom/agents/write-testsnpx skills add nirecom/agents --skill write-testsgit clone --depth 1 https://github.com/nirecom/agentsWrote 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/nirecom/agents/write-tests)<a href="https://agentmods.dev/skills/nirecom/agents/write-tests"><img src="https://agentmods.dev/badge/skills/nirecom/agents/write-tests.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00024 | $0.01591 |
| Opus 5 | $0.00012 | $0.00796 |
| Sonnet 5 | $0.00005 | $0.00318 |
| Haiku 4.5 | $0.00002 | $0.00159 |
Grade A, and why
write-tests 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 yesterday.
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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write or update tests for the current task.
Procedure
Apply skills/_shared/resolve-plans-dir.md once; substitute the resolved absolute path for every <PLANS_DIR> below.
WT-1. Read:
rules/core-principles.mdskills/_shared/test-design.mdrules/test.md— on-demand-only; never auto-injected, so this Read is mandatory For parser / regex / allowlist targets, apply the Table-Driven Tests pattern fromtest-design/parser-regex-tests.md. WT-2. Identify which source file(s) need tests. WT-3. Enumerate call paths: For each source file from step WT-2, trace all integration paths it participates in — what calls it, what it calls, and what format/contract each boundary expects. For each boundary, list potential failure modes (wrong format, missing field, wrong type, unexpected value). These become integration-path error cases in the next step. WT-4. List all planned test cases by category (include call-path error cases from step WT-3). Then check via Bash:bash -c 'cd "$AGENTS_CONFIG_DIR" && bash "$AGENTS_CONFIG_DIR/bin/confirm-off" CONFIRM_TESTS on'- stdout
OFF: print the planned cases and proceed to step WT-5 without approval wait. - stdout
ONorERROR: present the planned cases to the user — do not write code until approved (existing behavior). WT-5. Determine the subagent's model: - Run
bash -c 'node "$AGENTS_CONFIG_DIR/bin/workflow/read-complexity-evaluation" --session "$SESSION_ID" --stage write_tests'. If line 1 is notNONE, use the stored level and signals directly (parselevel=<v>andsignals=<csv-or-none>), then derive the model viahigh→opus, low→sonnet; skip the fallback below. - If
NONE(fail-open for sessions without persisted evaluation):- Read
skills/_shared/judge-task-complexity.mdand evaluate all signals against the task context, source files from steps WT-2–WT-3, and the planned test cases from step WT-4 — do not short-circuit on the first match. - Use the Write tool (never Bash) to write the resulting CSV, alone and unquoted, to
<PLANS_DIR>/<session-id>-write-tests-signals.txt— write only IDs from the generated Valid Signal IDs list; substituteS0-undecidablewhen the judgment doesn't parse into recognized ids or the csv doesn't match^[A-Za-z0-9,_-]*$(the judged content is untrusted text, never shell syntax). - Run
bash -c 'node "$AGENTS_CONFIG_DIR/bin/workflow/derive-complexity-level" --stage write_tests --signals-file "<PLANS_DIR>/<session-id>-write-tests-signals.txt"'and use itslevel=<v>— never judge the level inline.
- Read
- Emit in Claude text output (NOT Bash echo):
Model selected: [opus|sonnet] (signals: [comma-separated triggered signal IDs, or "none"])
WT-6. Launch a subagent (Agent tool, mode: "default", model: <model from step WT-5>) to autonomously:
WT-6a. Write the test file(s).
WT-6b. Run tests with timeout.
WT-6c. Fix failures and re-run until green.
WT-6d. Review test coverage against skills/_shared/test-design.md categories — fix gaps.
WT-6e. Re-run tests until green.
The subagent prompt MUST include these structured fields so verbose output stays in the subagent context:
task_complexity_signals: thesignals=line from step WT-5 verbatim (comma-separated IDs, or "none")source_files: list of source file paths from step WT-2planned_cases: list of planned test cases from step WT-4 The subagent prompt MUST instruct: edit only test files, never modify source code. The subagent prompt MUST instruct: Readrules/shell-commands.mdbefore the first Bash command, or before writing a file — general-purpose dispatch does not inherit auto-injected rules. The subagent prompt MUST instruct: Readrules/user-escalation.mdbefore any system-state-changing command — general-purpose dispatch does not inherit auto-injected rules. The subagent prompt MUST instruct: Readrules/coding.md(the hub — on-demand-only, so it does not reach you otherwise) andrules/coding/<lang>.mdfor each language present, before the first Edit. The subagent prompt MUST instruct: for Bash, PowerShell, JSON, or YAML test files (norules/coding/<lang>.mdB-layer exists for these), apply the A-layer language essence fromskills/write-code/SKILL.md's "A-layer language essence" section before the first Edit. The subagent prompt MUST instruct: Readrules/test.mdbefore writing or running tests — on-demand-only, so it does not reach you otherwise; general-purpose dispatch does not inherit auto-injected rules. Note: the Stop-guard silence during dispatch is automatic (PostToolUse marks the stepin_progress). Do not emitNEXT_STEP_PAUSE. The subagent prompt MUST also include: "NEVER present diffs for approval. NEVER wait for user confirmation. Edit and run autonomously until tests pass."
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.
- yesterday First seen · 82 lines · 24 tokens per session scan A 863b2310295d
write-tests is a skill published in the GitHub repository nirecom/agents (3 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 1,591 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…