test-writer

test-writer is a skill for Claude Code, Codex from rysh-ai/rysh-cli-code. It costs 16 tokens per session (206 once invoked), scanned A, original, Apache-2.0.

A test-writing guide for existing code that checks a test fails before the behaviour is fixed and passes afterwards.

In plain words
What is it for?
Use it to find untested code paths, write focused tests for real failure cases, follow the project's testing style, and verify the test suite.
Why use it?
It prevents tests that pass even when the required behaviour is missing, which creates false confidence.

Skill for Claude CodeCodex

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

Good fit Use it to find untested code paths, write focused tests for real failure cases, follow the project's testing style, and verify the test suite.

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

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/rysh-ai/rysh-cli-code/test-writer/github.svg)](https://agentmods.dev/skills/rysh-ai/rysh-cli-code/test-writer)
Your own site
<a href="https://agentmods.dev/skills/rysh-ai/rysh-cli-code/test-writer"><img src="https://agentmods.dev/badge/skills/rysh-ai/rysh-cli-code/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/rysh-ai/rysh-cli-code/test-writer"><img src="https://agentmods.dev/badge/skills/rysh-ai/rysh-cli-code/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 206 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.00016 $0.00206
Opus 5.5 $0.00006 $0.00082
Sonnet 5.5 $0.00003 $0.00041
Haiku 4.5 $0.00002 $0.00021

Measured 1mo ago against content hash c9bf43dd93b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

packages/test-writer/SKILL.md · 27 lines

What it actually says

You write tests for existing code.

The bar

A test earns its place only if it fails without the behaviour it covers. Before you finish, verify that: comment out or revert the behaviour, run the test, confirm it fails, then restore. A test that passes either way is worse than no test — it costs runtime and buys false confidence.

Method

  1. Read the code under test. Find the branches that are not exercised.
  2. Prefer one honest test of a real failure mode over five shallow ones.
  3. Use the project's existing test conventions — read a neighbouring test file first rather than importing a framework the project does not use.
  4. Run test_run and make sure the suite is green before you report.

Never

Never weaken an assertion to make a test pass. If the code is wrong, say the code is wrong and stop.

Files

What ships with it

3 files 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. 1mo ago First seen · 27 lines · 16 tokens per session scan A c9bf43dd93b1

Subscribe to this mod's changes

test-writer is a skill published in the GitHub repository rysh-ai/rysh-cli-code (5 stars, last pushed 11d ago), licensed Apache-2.0. It adds 16 tokens to every session and 206 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-08-31.

Related

Other skills, from other repositories

test-driven-development

TDD: enforce RED-GREEN-REFACTOR, tests before code.

StarryCod/cogitum · 20 tokens

golang-testing

Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices.

ronmkr/PromptBook · 35 tokens

test-driven-development

Writing code with tests first: RED-GREEN-REFACTOR, reproduce bugs as failing tests before fixing, and avoid testing anti-patterns. Use when implementing behaviour, fixing a defect, or asked to add tests.

damianvtran/local-operator · 48 tokens

rpa-gen-rules

Use when the user invokes /rpa-gen-rules or asks to create, refresh, audit, or synchronize project instructions such as root AGENTS.md, Cursor .cursor/rules, or Claude Code .claude/rules, especially when existing rule trees have drifted.

coddy-project/coddy-agent · 61 tokens

rpa-feat

Run when the user invokes /rpa-feat together with a clear feature description (for example issue text). BDD workflow: plan, failing tests, implementation, green tests, full suite, docs and examples, linter at the end. Will not work correctly without the user supplying what to build.

coddy-project/coddy-agent · 66 tokens

pixiv-cli-test

Select and run pixiv-cli regression, TDD, document, SDK, CLI/MCP, and build checks. Use when changing behavior, reproducing a bug, choosing test scope, or reporting readiness. Separates offline fixtures, native evidence, and explicitly authorized live API tests.

FlanChanXwO/pixiv-cli · 61 tokens