Skip to content
Back to skills

Test Writer

ASecurity

Designs and writes focused unit tests for a function or module. Use when asked to add tests, raise coverage, or after fixing a bug that needs a regression test.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 29, 2026
ai-agents

Security analysis

A100/100

Scanned November 29, 2026

npx -y skills add aixisstudio/claude-skills --skill test-writer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Writer?

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

Security grade badge for Test Writer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aixisstudio-test-writer/badge)](https://www.skillsdirectory.com/skills/aixisstudio-test-writer)

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: test-writer
description: Designs and writes focused unit tests for a function or module. Use when asked to add tests, raise coverage, or after fixing a bug that needs a regression test.
---

# Test writer

## Procedure
1. Read the code under test and the existing tests to match framework, naming and fixtures.
2. List behaviors to verify before writing anything: happy path, boundaries, invalid input, error paths, and one regression case for any bug being fixed.
3. Write small tests, one behavior each, named for the behavior (`test_rejects_negative_amount`).
4. Run the tests. A test you did not run is not done.

## Rules
- Arrange / Act / Assert, visibly separated.
- No logic in tests (no loops that compute the expected value the same way the code does).
- Prefer real objects and in-memory fakes; mock only true external boundaries (network, clock, filesystem).
- Do not test private implementation details; test observable behavior.
- Make tests deterministic: fixed time, seeded randomness, no network.
- If a test is hard to write, report that the code is hard to test and suggest the smallest refactor.
- Verify a new test can FAIL: temporarily break the code or reason explicitly why it would.

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.