Skip to content
Agentmart
Submit a tool

unit-testing

Use when creating or running focused automated tests for isolated logic and edge cases.

Skill by prinx

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/prinx-unit-testing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when creating or running focused automated tests for isolated logic and edge cases.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/unit-testing

What's inside

Skill name
unit-testing
Description
Use when creating or running focused automated tests for isolated logic and edge cases.
License
MIT
Instructions
44 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Unit Testing

Write and run fast, isolated tests for individual functions, methods, classes, or modules. Unit tests verify correctness at the smallest useful boundary without external services, networks, or UI.

## When to write

- **New code**: write a failing unit test before implementation (test-first), then implement the smallest change to make it pass.
- **Bug fix**: write a focused regression unit test that reproduces the bug, confirm it fails, apply the fix, confirm it passes.
- **Changed logic**: update or add unit tests when existing behavior changes.

## What to test

- Core logic: calculations, transformations, validations, state transitions.
- Edge cases: empty input, null/undefined, boundary values, maximum/minimum, off-by-one.
- Error handling: invalid input, missing fields, permission denial, timeout simulation.
- Branch coverage: every meaningful if/else, switch case, try/catch path.
- Pure functions first: they are the easiest to unit test and give the highest confidence per effort.

## What not to test

- Framework boilerplate or trivial getters/setters.
- Third-party library internals (test your integration with them, not their implementation).
- Implementation details that do not affect observable behavior.

## How to write

- Follow the project's existing test framework, file naming, and directory conventions.
- Each test should be independent and runnable in isolation.
- Use descriptive test names that state the scenario and expected outcome.
- Prefer Arrange-Act-Assert or Given-When-Then structure.
- Mock or stub only external boundaries (network, filesystem, database, time); do not mock the unit under test.
- Keep tests fast: if a test needs more than a few seconds, it is likely not a unit test.

## Running

- Use the project's test command (for example `npm test`, `pytest`, `go test`, `cargo test`).
- Run the specific test file or test name when possible for fast feedback.
- Record the exact command run and its output: tests passed, tests failed, any skip or warning counts.

## Evidence for quality

Give quality the actual test command, result summary, and any test files created or modified. Do not claim tests were run if they were not. Keep the evidence concise and factual.

From prinx/agents, MIT.

More from prinx/agents

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 26, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from prinx

Cite this page

unit-testing skill. Agent Mart. https://agentmart.dev/skills/prinx-unit-testing (last updated 2026-10-24)