write-tests

write-tests is a skill for Claude Code, Codex from Karthick-Ramachandran/persist-os. It costs 44 tokens per session (401 once invoked), scanned A, original, MIT.

A testing procedure that turns acceptance criteria, risks, security rules, module boundaries, and past regressions into meaningful automated tests. TDD means test-driven development; this add-on is broader, covering tests for important behaviour whether or not tests are written first.

In plain words
What is it for?
Planning and writing unit, integration, golden, and regression tests; updating test plans; checking feature requirements; and recording test commands, results, skipped tests, and remaining risks.
Why use it?
It reduces the chance that tests cover only the happy path while missing unsafe inputs, overwrites, symlinks, invalid configuration, generated output, or command-line failures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Planning and writing unit, integration, golden, and regression tests; updating test plans; checking feature requirements; and recording test commands, results, skipped tests, and remaining risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/karthick-ramachandran/persist-os/write-tests
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 Karthick-Ramachandran/persist-os --skill write-tests
Clone the repo
git clone --depth 1 https://github.com/Karthick-Ramachandran/persist-os

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 write-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/karthick-ramachandran/persist-os/write-tests/github.svg)](https://agentmods.dev/skills/karthick-ramachandran/persist-os/write-tests)
Your own site
<a href="https://agentmods.dev/skills/karthick-ramachandran/persist-os/write-tests"><img src="https://agentmods.dev/badge/skills/karthick-ramachandran/persist-os/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.

agentmods 80×15 button for write-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/karthick-ramachandran/persist-os/write-tests"><img src="https://agentmods.dev/badge/skills/karthick-ramachandran/persist-os/write-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 401 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.00044 $0.00401
Opus 5 $0.00022 $0.00200
Sonnet 5 $0.00009 $0.00080
Haiku 4.5 $0.00004 $0.00040

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

Security

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 9d 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.

.agents/skills/write-tests/SKILL.md · 64 lines

What it actually says

Skill: Write Tests

Purpose

Create professional tests that prove important behavior, not random happy paths.

Inputs

  • Feature PRD or task.
  • Acceptance criteria.
  • Changed files or planned modules.
  • Known risks.

Required Reading

  • docs/50-quality/TESTING_STRATEGY.md
  • docs/50-quality/QUALITY_GATES.md
  • docs/20-security/SECURITY_MODEL.md
  • docs/60-engineering/ENGINEERING_STANDARDS.md
  • Relevant feature TEST_PLAN.md
  • Relevant module TEST_PLAN.md

Output Files

  • Test files under the appropriate tests/ area.
  • Updated TEST_PLAN.md when test strategy changes.
  • Completion evidence listing commands and results.

Process

  1. Map acceptance criteria to test cases.
  2. Add risk-based tests for unsafe paths, overwrites, symlinks, config validation, generated output, and CLI behavior as relevant.
  3. Prefer unit tests for pure logic and integration tests for command behavior.
  4. Add golden tests for generated docs and templates.
  5. Name tests by behavior.
  6. Document skipped tests and remaining risk.

Stop Conditions

Stop and request human decision if:

  • Requirements are not testable.
  • The requested test would require runtime network, telemetry, cloud, MCP, or AI API behavior without review.
  • Security-sensitive behavior lacks a documented expected result.
  • The test approach conflicts with engineering standards.

Quality Bar

  • Tests derive from requirements and risk.
  • Security invariants are covered.
  • Test names describe behavior.
  • Engineering standards for evidence and skipped checks are followed.
  • The completion report includes commands and results.
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. 9d ago First seen · 64 lines · 44 tokens per session scan A 833edd934a2e

Subscribe to this mod's changes

write-tests is a skill published in the GitHub repository Karthick-Ramachandran/persist-os (8 stars, last pushed 2mo ago), licensed MIT. It adds 44 tokens to every session and 401 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

tdd-cycle

Execute full TDD red-green-refactor cycle with validation gates. Use when saying "TDD cycle", "test-driven development", or "full TDD workflow".

anton-abyzov/specweave · 33 tokens

atomic-tdd

Test-first discipline. Auto-triggers on "let's implement X", "add feature Y", "fix bug Z", "write a test for", "implement", "build out", and similar pre-code-change phrases. Iron rule: failing test exists before production code. Skip only for pure docs/config changes with an explicit "skipped because:" note. Explicit…

damusix/atomic-claude · 142 tokens

ralphctl-test-driven-development

Execute-phase skill — write the failing test before the code that makes it pass; for bug fixes, this is the reproduction test itself. Use for any logic change, bug fix, or behavioural modification; for the full root-cause triage pipeline around an unexpected failure, see ralphctl-debugging-and-error-recovery.

lukas-grigis/ralphctl · 72 tokens

tdd

A test-driven development workflow based on repeating three stages: write a failing test, make it pass, then improve the code. The tests focus on what users can do through public interfaces rather than internal implementation details.

Yulin-Bi/CodeAuto · 53 tokens

go

Go phase. Reads the approved SPEC file, maps Requirements to tasks (plan), executes via TDD (build), and integrates results verifying all Acceptance Criteria.

epicsagas/epic-harness · 33 tokens

test-driven-development

Use when user explicitly requests test-driven development. Triggers: 'TDD', 'write tests first', 'red green refactor', 'test-first', 'start with the test'. Also invoked by develop and executing-plans for implementation tasks. NOT for: full feature work (use develop, which includes TDD internally).

axiomantic/spellbook · 69 tokens