Test Writer

Test Writer is a skill for Claude Code, Codex from AmariahAK/atlarix-skills. It costs 2 tokens per session (823 once invoked), scanned A, original, Apache-2.0.

A guide for writing tests that check what software does and report failures clearly. It uses Arrange, Act, Assert: prepare the case, run the code, and check the result.

In plain words
What is it for?
Use it when adding features or fixing bugs, including testing return values, database effects, network boundaries, and rendered interface behavior.
Why use it?
It helps lock in expected behavior without tying tests to private implementation details, making changes safer to review.

Skill for Claude CodeCodex

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

Good fit Use it when adding features or fixing bugs, including testing return values, database effects, network boundaries, and rendered interface behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amariahak/atlarix-skills/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 AmariahAK/atlarix-skills --skill test-writer
Clone the repo
git clone --depth 1 https://github.com/AmariahAK/atlarix-skills

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/amariahak/atlarix-skills/test-writer/github.svg)](https://agentmods.dev/skills/amariahak/atlarix-skills/test-writer)
Your own site
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/test-writer"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/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/amariahak/atlarix-skills/test-writer"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 823 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.00002 $0.00823
Opus 5 $0.00001 $0.00411
Sonnet 5 $0.00000 $0.00165
Haiku 4.5 $0.00000 $0.00082

Measured 7d ago against content hash 3244516719aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 7d 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.

skills/test-writer/SKILL.md · 133 lines

How it starts

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

Test Writer

When to use this skill

Use this skill when you’re adding features or fixing bugs and you want tests that lock in behavior, are easy to read, and fail with useful diagnostics.

Core patterns

Test behavior, not implementation

Prefer assertions on:

  • outputs and return values
  • observable side-effects (DB writes, network calls via mocked boundary)
  • rendered UI behavior

Avoid asserting:

  • internal helper calls
  • private state
  • exact call order unless it’s part of the contract

Arrange / Act / Assert (AAA)

Structure tests so readers can skim:

  • Arrange: setup inputs + mocks
  • Act: execute
  • Assert: verify outcomes
it("returns 401 when token is missing", async () => {
  // Arrange
  const req = makeRequest({ headers: {} });

  // Act
  const res = await handler(req);

  // Assert
  expect(res.status).toBe(401);
});

Naming conventions

Use readable test names:

  • describe("<unit>")
  • it("does <behavior> when <condition>")

Bad:

  • it("works")
  • it("test1")

Mocking philosophy: mock at the boundary

Mock:

  • HTTP clients
  • DB adapters/repositories
  • filesystem
  • time

Avoid mocking deep internals; that freezes implementation and makes refactors painful.

Testing async code

Rules:

  • always await promises
  • assert rejection paths explicitly
await expect(fn()).rejects.toThrow("missing");

Snapshot tests (use intentionally)

Use snapshots when:

  • large stable output (markdown rendering, formatted AST)
  • you want quick diff review

Avoid snapshots for:

  • small outputs (write explicit asserts)
  • unstable values (timestamps, random IDs)

Error paths are first-class

Every critical function should have tests for:

  • invalid input
  • missing resources (ENOENT)
  • permission denied
  • timeouts / retries

Unit vs integration vs e2e

Use:

  • Unit: pure logic, fast, lots of cases
  • Integration: modules wired together (DB in memory, API route handler with mocked network)
  • E2E: user flows (Playwright/Cypress), fewer tests but high confidence

Read the full file on GitHub · 133 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. 7d ago First seen · 133 lines · 2 tokens per session scan A 3244516719aa

Subscribe to this mod's changes

Test Writer is a skill published in the GitHub repository AmariahAK/atlarix-skills (2 stars, last pushed 4d ago), licensed Apache-2.0. It adds 2 tokens to every session and 823 once invoked, about $0.0000 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.