write-tests

write-tests is a skill for Claude Code, Codex from evgenii-studitskikh/Claude-Code-SaaS-Studio. It costs 47 tokens per session (733 once invoked), scanned A, original, MIT.

A guided workflow for writing tests for one product requirement, covering small code units, connected parts, full user journeys, access rules, and payment webhooks.

In plain words
What is it for?
Use it after test setup to choose a user story, propose test cases, write the tests, and verify that they pass with mocked services and test payment data.
Why use it?
It makes test coverage match the feature’s risk and avoids unsafe tests that use real secrets or live services.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/evgenii-studitskikh/claude-code-saas-studio/write-tests
Any agent
npx skills add evgenii-studitskikh/Claude-Code-SaaS-Studio --skill write-tests
Clone the repo
git clone --depth 1 https://github.com/evgenii-studitskikh/Claude-Code-SaaS-Studio

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/evgenii-studitskikh/claude-code-saas-studio/write-tests.svg)](https://agentmods.dev/skills/evgenii-studitskikh/claude-code-saas-studio/write-tests)
Your own site
<a href="https://agentmods.dev/skills/evgenii-studitskikh/claude-code-saas-studio/write-tests"><img src="https://agentmods.dev/badge/skills/evgenii-studitskikh/claude-code-saas-studio/write-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 733 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00047 $0.00733
Opus 5 $0.00023 $0.00367
Sonnet 5 $0.00009 $0.00147
Haiku 4.5 $0.00005 $0.00073

Measured 4d ago against content hash 1a1e1b274094, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

.claude/skills/write-tests/SKILL.md · 22 lines

How it starts

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

Author a complete, passing test suite for one user story, covering every layer the QA plan prescribes for that story's risk profile. Non-autonomous: identify the target, propose cases, get approval, write, then prove green. Never use real secrets or live network calls in tests.

Phases

  1. Load context — read docs/specs/qa-plan.md to understand the pyramid and conventions; read docs/specs/prd.md to list available stories. Ask the user which story or feature to target. If qa-plan.md is missing, stop and direct to /qa-plan; if the test scaffold is absent (no vitest.config.ts), stop and direct to /test-setup.
  2. Propose cases — for the chosen story, enumerate the specific test cases at each layer: (a) unit tests for pure functions/helpers; (b) integration tests for server actions, route handlers, and API routes (using mocked DB/Stripe calls); (c) e2e tests for the critical user path in Playwright; (d) RLS policy tests asserting that other-tenant rows are inaccessible; (e) Stripe webhook tests using stripe.webhooks.generateTestHeaderString (or the Stripe CLI stripe trigger) with a signed test payload — never real keys. Present the list with a note on what each case catches. Under full, confirm each layer separately; under lean, one confirmation for the full list; under solo, proceed and summarize. Get explicit approval before writing any test code.
  3. Write — on approval, author the test files in the locations prescribed by the QA plan (e.g. src/__tests__/, e2e/). Follow conventions from docs/specs/qa-plan.md and, if present, the .claude/rules/tests.md rule. Reference secrets by env-var name only (e.g. process.env.STRIPE_WEBHOOK_SECRET) — never embed literal secret-shaped strings. Use seeded or in-memory test data, not production data.
  4. Run green — execute npm test (or vitest run) for unit/integration tests and npm run test:e2e for Playwright tests; show the output. If any test fails, diagnose the root cause, fix the test or the fixture, and re-run. Repeat until the full suite for this story is green; if the suite cannot be made green within the session, surface the remaining failures for the user to resolve and still point to /code-review. Under full, show each failure and proposed fix before applying; under lean or solo, fix and re-run, then show the final result.
  5. Next step — once the suite is green, point to /code-review to review the new tests alongside the feature code.

Read the full file on GitHub · 22 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. 4d ago First seen · 22 lines · 47 tokens per session scan A 1a1e1b274094

Subscribe to this mod's changes

write-tests is a skill published in the GitHub repository evgenii-studitskikh/Claude-Code-SaaS-Studio (1 stars, last pushed 2mo ago), licensed MIT. It adds 47 tokens to every session and 733 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

test-software

Design, implement, and evaluate risk-based software tests across unit, integration, contract, end-to-end, and regression layers. Use when adding tests, reproducing bugs, improving coverage, diagnosing flaky tests, or defining a test strategy; do not use to change production behavior unless the user also requests…

Phelan164/codex-howto · 65 tokens

aidex-coverage

Use when writing, placing, or running tests in any project — which layer a behaviour belongs in ("unit or E2E for X", "component test or browser test"), which tests to run for a change instead of the whole suite, when to extract a fixture, setting up an isolated disposable E2E environment, or the per-project testing…

yacb2/aidex · 193 tokens

Android Testing

JUnit + Robolectric unit tests, Compose UI tests, screenshot tests, and Espresso for legacy views.

niels-emmer/myace · 23 tokens

devteam-test

Coordinate test writing and execution across the project. Launches the Test Coordinator to orchestrate language-specific test writers and verification agents.

michael-harris/devteam · 29 tokens

javascript-testing-patterns

Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.

tmolavi/mcp-agent-skills-hub · 63 tokens

iOS Testing

XCTest unit tests, XCUITest UI tests, snapshot testing, and performance baselines for iOS apps.

niels-emmer/myace · 27 tokens