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 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/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/nirecom/agents/write-tests"><img src="https://agentmods.dev/badge/skills/nirecom/agents/write-tests.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00024 | $0.02342 |
| Opus 5.5 | $0.00010 | $0.00937 |
| Sonnet 5.5 | $0.00005 | $0.00468 |
| Haiku 4.5 | $0.00002 | $0.00234 |
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 4d 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 — 98 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
WT-0. Read the session facts once, before the pre-launch steps that consume them: node "$AGENTS_MAIN_ROOT/bin/workflow/read-session-facts" --session "$SESSION_ID"
PLANS_DIR=— substitute this absolute path for every<PLANS_DIR>below.GATE_CONFIRM_TESTS=— the WT-5 pre-action gate (ON/OFF/ERROR).COMPLEXITY_LEVEL_write_tests=,COMPLEXITY_MODEL_write_tests=andCOMPLEXITY_SIGNALS=— the WT-6 level, model and signals.- If the command exits non-zero, or
PLANS_DIR=NONE, stop — do not proceed with any step that uses<PLANS_DIR>; report via /supervisor-report; never construct a path likeNONE/<session-id>-....
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 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 WT-4. WT-4. List all planned test cases by category (include call-path error cases from WT-3). WT-5. Decide the destination of each planned case — append to an existing test file, or create a new one.- For each planned case, state its complete source set S (the
# Tests:tokens the case protects). - Run
bash "$AGENTS_MAIN_ROOT/bin/find-tests-for-source.sh" --with-language --sources <comma-joined S>with every distinct S in one call, repeating--sources(Bash, standalone command with timeout 600000; split rule and language columns inskills/_shared/test-design/append-vs-new.md; rows come back in query order; read-only, sohooks/block-tests-direct.jsdoes not apply). On exit 4 or a tool timeout, HALT and surface the stderr. - Record each row's verdict/reason/target as the case group's destination.
appendis mandatory; the sole permitted new file when a target exists is thesize-hard-limitcase, perskills/_shared/test-design/append-vs-new.md— do not decide by eye. - If
GATE_CONFIRM_TESTSisONorERROR, present the planned cases together with their destinations and wait for user confirmation before WT-6. WT-6. Determine the subagent's model: - If
COMPLEXITY_LEVEL_write_testsfrom WT-0 is notNONE, useCOMPLEXITY_MODEL_write_testsas the model andCOMPLEXITY_SIGNALSdirectly; skip the fallback below. - If
NONE(fail-open for sessions without persisted evaluation): followskills/_shared/jev-two-stage-judge.mdwith point=complexity-judgestage=write-tests; use itsmodel=andSIGNALS_CSV— never judge the level inline. - Emit in Claude text output (NOT Bash echo):
Model selected: (signals: [comma-separated triggered signal IDs, or "none"])
WT-7. Launch a subagent (Agent tool, mode: "default", model: <model alias from WT-6>) to autonomously:
WT-7a. Write the test file(s).
WT-7b. Run tests with timeout.
WT-7c. Fix failures and re-run until green.
WT-7d. Review test coverage against skills/_shared/test-design.md categories — fix gaps.
WT-7e. 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 WT-6 verbatim (comma-separated IDs, or "none")source_files: list of source file paths from WT-2planned_cases: list of planned test cases from WT-4 — each entry states the source set it protectstest_destinations: one entry per case group, keyed by that group's complete source set —append <path>ornew. Each source set'snewverdict generates its own independent new file — one new file per source set. Anewtest file's path MUST betests/<category>/<file>(category = first path segment of the source it protects; valid categories: hooks bin skills agents install tests) — never a flattests/<file>; the commit gate rejects a newly-added flat test (#1834, #2392). Name anewfile by asupportedentry'spatternsinhooks/lib/test-language-registry.json. Follow the language column of the WT-5 output: a new test file MUST load that registry entry'shelperLibrary—bin/check-test-frontmatter.shrejects new files without it. If theTests:header lists 2 or more paths, every case MUST carry a case marker written per that entry'snotationDoc;bin/check-case-markers.shflags multi-path files without markers as HIGH. Onappend: never rewrite the target's# Tests:line;# Tags:may only be added to.appendis mandatory when the verdict isappend;skills/_shared/test-design/append-vs-new.mdis the SSOT for when a new file is warranted instead. 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 include the canonical line of therules/shell-commands.mdSubagent Dispatch Prompts section, verbatim as a standalone line, with<AGENTS_MAIN_ROOT>replaced by the literal absolute path. 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."- (Optional) Follow
agents/lib/nfr-severity-calibration.mdto obtain the PROJECT NFR block and use it as a test constraint when relevant.
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.
- 4d ago Changed · +1 lines b974d99d64b8
- 6d ago Changed 493dc294bd6f
- 7d ago Changed · -4 lines d30e4f00a97f
- 9d ago Changed · +1 lines 3e7899cbc26d
- 11d ago Changed bd38f0ff1c73
- 17d ago Changed · +1 lines eb1e97ed8586
- 18d ago Changed 2e41f5f4d106
- 21d ago Changed f170770cfcb0
- 24d ago Changed · +2 lines 7c390e0a8e4b
- 25d ago First seen · 97 lines · 24 tokens per session scan A c13aa0be8b79
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 2,342 once invoked, about $0.0001 per session on Opus 5.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
research-engineer
An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.
eval-dataset-design
A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.
tika-eval-compare
Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".
cua-driver
Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.
jetson-validate-image
Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.
atmos-validation
Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.