Skip to content
Back to skills

Write Tests

ASecurity

Write focused, fast tests that cover behaviour, edges, and failures.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentstestingapi

Works with

  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add Ashutosh0428/pi-agent --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/ashutosh0428-write-tests/badge)](https://www.skillsdirectory.com/skills/ashutosh0428-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 focused, fast tests that cover behaviour, edges, and failures.
trigger: when the user asks for tests or to improve coverage
---
## When to use
The user wants tests for some code, or asks to raise coverage.

## How
1. `read_file` the target so tests match the real API.
2. Put tests in `tests/test_<module>.py`; plain `pytest`, minimal fixtures.
3. Cover the happy path, one edge case, and one failure/error path.
4. Keep each test small, independent, and named for what it asserts.
5. Assert on behaviour and return values, not internal calls.

## Avoid
- Testing implementation details that break on harmless refactors.
- Giant fixtures or shared mutable state across tests.
- Tests that assert nothing meaningful ("it runs").

## Done well
A handful of small tests that fail loudly when behaviour breaks and pass quietly
otherwise — plus a note on what you covered and what you left out.

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.