Skip to content
Back to skills

Write Tests

ASecurity

Write and run focused tests for a change — find the runner, add cases, run, report.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
ai-agentsgotesting

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --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/black141312-write-tests/badge)](https://www.skillsdirectory.com/skills/black141312-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 and run focused tests for a change — find the runner, add cases, run, report.
category: testing
---

# Write tests

1. **Detect the setup.** Check `package.json` `scripts.test`, or look for existing `*test*` / `*spec*` files and the framework in use (vitest, jest, mocha, pytest, `go test`, …). Match the project's existing style exactly.
2. **Pick what to cover.** The change's happy path plus the edge cases that would actually break it: empty input, boundaries, error paths. Don't test trivial getters or framework code.
3. **Write the tests** next to their siblings, following local conventions for naming, imports, and assertions.
4. **Run them** with the project's command (`npm test`, `pytest -q`, `go test ./...`, …).
5. **Report** pass/fail with the real output. If a test fails, decide whether the test or the code is wrong — never weaken a test just to make it pass.

## Rules

- Cover the logic that would break, not every line. Minimal and meaningful.
- Don't add a new test framework unless the project has none and the user wants one.
- A test that can't fail is worthless — make sure each one would catch a real regression.

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.

Comments

Loading comments…

Newsletter

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