test-writer

test-writer is a skill for Claude Code, Codex from anchildress1/awesome-github-copilot. It costs 130 tokens per session (3,040 once invoked), scanned A, original, MIT.

A general workflow for writing, extending, or reviewing automated tests in a codebase. Automated tests run checks against software so changes can be verified repeatedly.

In plain words
What is it for?
Use it to inspect source branches and error paths, identify the test setup, follow existing conventions, add suitable tests, and verify them.
Why use it?
It helps produce tests that match the existing code, framework, fixtures, configuration, and project commands instead of adding disconnected examples.

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/anchildress1/awesome-github-copilot/test-writer
Any agent
npx skills add anchildress1/awesome-github-copilot --skill test-writer
Clone the repo
git clone --depth 1 https://github.com/anchildress1/awesome-github-copilot

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/anchildress1/awesome-github-copilot/test-writer.svg)](https://agentmods.dev/skills/anchildress1/awesome-github-copilot/test-writer)
Your own site
<a href="https://agentmods.dev/skills/anchildress1/awesome-github-copilot/test-writer"><img src="https://agentmods.dev/badge/skills/anchildress1/awesome-github-copilot/test-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,040 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.00130 $0.03040
Opus 5 $0.00065 $0.01520
Sonnet 5 $0.00026 $0.00608
Haiku 4.5 $0.00013 $0.00304

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

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

How it starts

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

Test Writer

You are writing production-quality tests. These rules apply to every repo, every language, every test framework.

Step 0: Orient Before You Write

Do ALL of the following before writing a single line of test code — in parallel where possible:

  1. Read the source file(s) under test completely. Map every branch, early return, validation check, and error path.
  2. Detect the stack and test framework — see Stack Detection below.
  3. Find the test run command. Check package.json scripts.test, Makefile, pyproject.toml, or the repo's CI config. You will need this for verification.
  4. Read the existing test files for the module (if any). Extract mock patterns, fixture shapes, and naming conventions — your new tests must be consistent with them.
    • If no test files exist, establish conventions: check for a tests/ or __tests__/ directory; if none, create one mirroring the source structure.
  5. Read the test config (vitest.config.ts, jest.config.ts, pytest.ini, pyproject.toml). Note coverage thresholds and excluded paths.
  6. Read test helpers and shared fixtures. Use what exists before inventing new utilities.
  7. Identify which test types apply: unit, integration, end-to-end, performance, Lighthouse CI (LHCI). Each has different mock boundaries and scope.
  8. Read CLAUDE.md or AGENTS.md for project-specific test conventions.

Stack Detection and File Placement

Detect the framework from config files before writing anything:

Signal Framework
vitest.config.ts or vitest in package.json Vitest
jest.config.* or jest in package.json Jest
pytest.ini, pyproject.toml [tool.pytest] pytest
.mocharc.* Mocha
cypress.config.* Cypress (e2e)
playwright.config.* Playwright (e2e)

File placement — match the repo's existing convention:

  • If test files live next to source (src/foo.tssrc/foo.test.ts), follow that.
  • If test files live in a separate tree (tests/foo_test.py), follow that.
  • When bootstrapping: prefer co-location for unit tests; prefer tests/ for integration and e2e.

Read the full file on GitHub · 293 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 · 293 lines · 130 tokens per session scan A 29c4496dd8c0

Subscribe to this mod's changes

test-writer is a skill published in the GitHub repository anchildress1/awesome-github-copilot (65 stars, last pushed yesterday), licensed MIT. It adds 130 tokens to every session and 3,040 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

mcp-server-dev

Use when the user asks to build an MCP server, create an MCP integration, wrap an API for AI agents, or expose tools via the Model Context Protocol. Guides through deployment model selection (remote HTTP, MCPB, local stdio), tool-design patterns, and framework choice before scaffolding code.

euxx/claude-skills-for-copilot · 65 tokens

conventions-improver

Audit and improve project conventions files (AGENTS.md, CLAUDE.md, GEMINI.md). Scans for all conventions files, evaluates quality against a scoring rubric, outputs a quality report, then makes targeted improvements with user approval. Use when asked to check, audit, update, or improve AGENTS.md or similar files.

euxx/claude-skills-for-copilot · 72 tokens

security-threat-model

Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations, and writes a concise Markdown threat model. Trigger only when the user explicitly asks to threat model a codebase or path, enumerate threats/abuse paths, or perform AppSec threat modeling.…

euxx/claude-skills-for-copilot · 82 tokens

code-review

Multi-agent code review for local changes, files, or directories. Detects bugs, security issues, and conventions-file violations (AGENTS.md/CLAUDE.md/GEMINI.md).

euxx/claude-skills-for-copilot · 41 tokens

comment-analyzer

Analyzes code comments for accuracy, completeness, and long-term maintainability. Detects comment rot and misleading documentation. Use after adding or modifying code comments.

euxx/claude-skills-for-copilot · 35 tokens

gh-address-comments

Fetch all review comments and threads on the current branch's open GitHub PR using the gh CLI, present a numbered summary, and address the ones the user selects.

euxx/claude-skills-for-copilot · 37 tokens