test-writing

test-writing is a skill for Claude Code, Codex from andreaswasita/copilot-agents-dojo. It costs 11 tokens per session (1,037 once invoked), scanned A, original, MIT.

A test-writing workflow for software that covers normal cases, edge cases, errors, and changes in state. TDD, or test-driven development, means writing a test before the code that makes it pass.

In plain words
What is it for?
It is for adding tests to new features, protecting untested code before changes, and reproducing bugs that escaped earlier testing.
Why use it?
It focuses tests on catching real bugs instead of merely increasing the reported amount of code covered.

Skill for Claude CodeCodex

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

Good fit It is for adding tests to new features, protecting untested code before changes, and reproducing bugs that escaped earlier testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andreaswasita/copilot-agents-dojo/test-writing
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 andreaswasita/copilot-agents-dojo --skill test-writing
Clone the repo
git clone --depth 1 https://github.com/andreaswasita/copilot-agents-dojo

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/test-writing/github.svg)](https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/test-writing)
Your own site
<a href="https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/test-writing"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/test-writing/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-writing

Your own site · 80×15
<a href="https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/test-writing"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/test-writing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,037 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 46
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00011 $0.01037
Opus 5 $0.00005 $0.00518
Sonnet 5 $0.00002 $0.00207
Haiku 4.5 $0.00001 $0.00104

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

Security

Grade A, and why

test-writing 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 10d 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-writing/SKILL.md · 117 lines

How it starts

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

Test Writing Skill

Produces tests that fail when the code is wrong — not tests that exist for coverage theatre. Covers happy path, edge cases, error paths, and state transitions. Does NOT chase 100% coverage as a goal; chases meaningful coverage that catches real regressions.

When to Use

  • Writing tests for new code or features.
  • Adding coverage to an untested area before changing it.
  • A bug slipped through that tests should have caught.
  • Practicing test-driven development.
  • The verify-before-done skill flagged missing coverage.
  • NOT when the user explicitly asked for a spike or throwaway script.

Prerequisites

  • A test framework installed for the stack (pytest, vitest, jest, go test, xUnit, JUnit).
  • Ability to run the test suite via the powershell tool.
  • The view, edit, and grep tools to read existing patterns.
  • A baseline run of the existing suite passing.

How to Run

1. Read existing tests with `view`/`grep` to copy the project's pattern.
2. List scenarios: happy path, edges, errors, state transitions.
3. Write one test per scenario using Arrange-Act-Assert.
4. Run the suite — confirm new tests pass and nothing else broke.
5. If TDD: write the test first, watch it fail for the right reason, then implement.

Quick Reference

Stack Framework Run command
TypeScript Vitest / Jest npm test or npx vitest
Python pytest pytest or python -m pytest
Java JUnit 5 mvn test or gradle test
Go testing go test ./...
.NET xUnit dotnet test
Scenario type Must cover
Happy path Valid input → expected output
Edge case Empty, null, boundary, maximum size
Error case Invalid input, dependency failure, timeout
State transition Stateful object moves between valid states

Procedure

Step 1: Read the Existing Pattern

Use grep for test_* or *.spec.* files and view one of them. Match the project's naming, location, fixtures, and assertion style. Do not introduce a second testing dialect.

Read the full file on GitHub · 117 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. 10d ago First seen · 117 lines · 11 tokens per session scan A 223d7068c4ef

Subscribe to this mod's changes

test-writing is a skill published in the GitHub repository andreaswasita/copilot-agents-dojo (53 stars, last pushed 3d ago), licensed MIT. It adds 11 tokens to every session and 1,037 once invoked, about $0.0001 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.