Skip to content
Back to skills

Write Tests

ASecurity

Write or extend tests for new or changed code, following the project's test framework and conventions. Use when adding a feature, fixing a bug, or when the user asks for tests or more coverage.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentstesting

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add John99101/claude-code-project-template --skill write-tests --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Write Tests?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Write Tests
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/john99101-write-tests/badge)](https://www.skillsdirectory.com/skills/john99101-write-tests)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: write-tests
description: Write or extend tests for new or changed code, following the project's test framework and conventions. Use when adding a feature, fixing a bug, or when the user asks for tests or more coverage.
---

# Write tests

1. Read `.claude/rules/testing.md` and the **Commands** table in `CLAUDE.md` for the framework and how to run tests.
2. Find two or three existing tests near the code. Copy their structure, naming, fixtures and helpers.
3. List the behaviours to cover: the main path, edge cases (empty, zero, max, unicode), error paths, and for a bug fix the exact failing case.
4. For a bug fix, write the test first and run it to confirm it fails for the right reason.
5. Write the tests. Fake the network, time and randomness. Keep each test focused on one behaviour.
6. Run the new tests, then the surrounding suite. Fix until green.
7. Report what's covered and anything deliberately left out.

For a large test task, delegate to the **test-writer** agent.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.