test-writer

test-writer is a skill for Claude Code, Codex from tahirraufkeeyu/software-development-agent-stack--sdas. It costs 75 tokens per session (2,233 once invoked), scanned A, original, MIT.

A workflow for writing automated tests for a file, function, or class, including tests for a recently fixed bug.

In plain words
What is it for?
Use it to add unit or regression tests, cover an untested branch, or test a new function using Arrange-Act-Assert structure.
Why use it?
It first follows the repository’s existing test style, reducing mismatched frameworks, file locations, naming, setup, and fixtures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add unit or regression tests, cover an untested branch, or test a new function using Arrange-Act-Assert structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tahirraufkeeyu/software-development-agent-stack--sdas/test-writer
Install

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.

Any agent
npx skills add tahirraufkeeyu/software-development-agent-stack--sdas --skill test-writer
Clone the repo
git clone --depth 1 https://github.com/tahirraufkeeyu/software-development-agent-stack--sdas

Made for: Claude Code, Codex.

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-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/test-writer/github.svg)](https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/test-writer)
Your own site
<a href="https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/test-writer"><img src="https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/test-writer/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-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/test-writer"><img src="https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,233 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.
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.00075 $0.02233
Opus 5 $0.00037 $0.01117
Sonnet 5 $0.00015 $0.00447
Haiku 4.5 $0.00007 $0.00223

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

Security

Grade A, and why

test-writer 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 8d 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.

departments/developers/skills/test-writer/SKILL.md · 180 lines

How it starts

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

When to use

  • User points at a file, function, or class and asks for tests.
  • A bug was just fixed and a regression test is needed.
  • Coverage report flagged an untested branch and the user wants it filled.
  • New function was added alongside a feature and the PR review asked for tests.

Do not use this skill to design a test strategy for an entire service (use a broader testing-strategy skill) or to write end-to-end browser tests (those require a separate harness skill).

Inputs

  • Target under test: a file path, or a file path plus a list of function/class/method names.
  • Optional: a specific bug description ("reproduce this failure mode first, then fix-verify") or a branch in the code that must be covered.

Outputs

  • One or more test files placed where the repo's convention expects them.
  • Every new test function follows Arrange-Act-Assert, names the behaviour, and is deterministic.
  • A short summary listing each test added with the behaviour it pins down and the branch it covers.

Tool dependencies

  • Read, Glob, Grep for inspecting the existing test suite.
  • Edit / Write for creating or updating test files.
  • Ability to run the project's test command (the user should run it — do not assume a sandbox).

Procedure

  1. Locate existing tests. Use Glob on common patterns: **/*.test.ts, **/*.spec.ts, **/test_*.py, **/*_test.go, tests/**/*.rs, spec/**/*_spec.rb. Read 2-3 representative files.
  2. Infer conventions and record them before writing:
    • Framework (Jest, Vitest, Mocha, pytest, unittest, go test + testify, Rust #[test], RSpec).
    • File location: sibling (foo.ts -> foo.test.ts) vs mirrored tree (src/foo.ts -> tests/foo.test.ts).
    • Naming (describe/it vs test(...) vs class TestFoo vs TestFoo_Bar).
    • Setup/teardown (beforeEach, pytest fixtures, TestMain, TestFixture).
    • Assertion style (expect().toEqual(), assert ==, require.Equal, etc.).
    • Test data: factories/builders vs inline literals vs JSON fixtures.
    • Mocking library if any (jest.mock, unittest.mock, gomock, mockito).
    • Coverage tool and thresholds if configured (jest.config, pyproject.toml [tool.coverage], go test -cover).
  3. Read the target code. List every observable behaviour: normal case, each error/return branch, boundary values (0, 1, max, empty, None/null), and every external effect (DB write, event emit, HTTP call).
  4. Design one test per behaviour, not one test per method. Name each test after the behaviour: returns 404 when user is missing, not test_get_user_3.
  5. For each test apply the AAA template:
    • Arrange: build inputs with the repo's factory/builder or inline; stub collaborators but never the unit under test.
    • Act: one call to the unit under test.
    • Assert: observable outcome — return value, thrown error, published event, DB state, rendered output. Avoid asserting on internal calls unless that is the contract.
  6. Make every test deterministic: fake the clock, seed the RNG, fix timezone to UTC, stub network with the repo's chosen library (nock, responses, httptest, wiremock). Never let a test touch the real network or wall clock.
  7. Cover the negative space: invalid input, expired token, empty collection, duplicate key, concurrent write (if applicable), cancellation. At minimum add one "sad path" test per public function.
  8. For a bugfix, write the failing test first. Confirm it reproduces the bug against the un-patched code (describe this in the summary, e.g. "this test fails at commit abc123").
  9. Run the test command. If any test fails that is not an intended reproduction, fix the test — never relax an assertion to make it pass.
  10. Emit a summary: new test files, count of tests added, which branches are now covered. Link each test name to the behaviour it pins down.

Read the full file on GitHub · 180 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 180 lines · 75 tokens per session scan A aed280229626

Subscribe to this mod's changes

test-writer is a skill published in the GitHub repository tahirraufkeeyu/software-development-agent-stack--sdas (18 stars, last pushed 4mo ago), licensed MIT. It adds 75 tokens to every session and 2,233 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.