Back to Skills
🧪

Generate Tests

Official Skill
/test

Generates comprehensive unit tests for the specified function or file.

C

by Claude Rules

Skill author

.claude/commands/test.md
Generate comprehensive tests for $ARGUMENTS.

- Use the project existing test framework and conventions
- Cover: happy path, edge cases, error cases, boundary values
- Mock external dependencies appropriately
- Write descriptive test names
- Aim for 100% branch coverage
- Do not modify the source code being tested

How to install this skill

Save the content above as a .md file in your .claude/commands/ directory, then use /test in Claude Code.

Project-level (current project only):

.claude/commands/test.md

Global (all projects):

~/.claude/commands/test.md

Browse by Tag

What are Skills?

Claude Code Skills are reusable slash commands stored as .md files in your .claude/commands/ directory. Type /test in Claude Code to run this skill.

Learn more in the docs