testing · mindrally — Claude Code skill: what it does, how to install
Defines software testing guidelines for AI agents, covering test isolation, table-driven checks, and mock boundaries.
npx skills add Mindrally/skills --skill testing -a claude-codeWhat testing does
This skill guides the coding agent through software testing conventions. It insists on behavioral test coverage for every exported function, separates quick unit tests from integration suites, and matches test directories to the source file layout. Related tests stay grouped in describe or context blocks.
For test setup, the instructions favor factories over static fixtures. Tests must remain isolated without shared state between runs, relying on clean lifecycle hooks and mocks for external dependencies like databases or APIs. When verifying outcomes, the agent must use framework-specific assertion helpers instead of generic assert checks.
The instructions apply across frameworks without language-specific tooling, so custom runner flags or mock generators require direct instructions in the prompt.
What it helps with
- separate fast unit tests from slower integration test suites
- mirror project directory structures inside the test folder
- isolate tests by mocking databases and external API interfaces
- build table-driven test suites covering edge cases and error states
Example prompts for the agent
- Write table-driven unit tests for all exported methods in
src/payment.tsusing mocked network calls. - Review my test suite in
tests/user.test.tsto ensure each test runs independently without shared state. - Generate test data factories and add edge case checks for the registration flow.
How to install testing
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill testing -a claude-code2Manually: put the files in place
~/.claude/skills/testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/testing/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill testing -a codex2Manually: put the files in place
.agents/skills/testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill testing -a cursor2Manually: put the files in place
.cursor/skills/testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills testing2Manually: put the files in place
.github/skills/testing/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path testingManually: put the files in place
.devin/skills/testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about testing
How to install testing in Claude Code?
Run npx skills add Mindrally/skills --skill testing -a claude-code. You can also place the skill file directly at ~/.claude/skills/testing/SKILL.md.
What does the testing skill do?
It gives the agent guidelines for writing and reviewing test suites. The instructions cover test isolation, table-driven unit tests, mock usage for external services, and directory organization.
What does the skill recommend for test data?
It favors test data factories over fixtures and requires minimal setup per test. It also encourages generating diverse test data to catch edge cases and invalid inputs.
Source text
SKILL.md · Apache-2.0
--- name: testing description: General testing best practices and guidelines for writing comprehensive, maintainable tests across different testing frameworks and languages. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Testing Best Practices You are an expert in software testing best practices. Apply these principles when writing, reviewing, or discussing tests. ## Core Testing Principles ### Unit Testing - Write unit tests using table-driven patterns and parallel execution where appropriate - Mock external interfaces cleanly using generated or handwritten mocks - Separate fast unit tests from slower integration and E2E tests - Ensure test coverage for every exported function, with behavioral checks - Use coverage tools to verify adequate coverage ### Test Organization - Use descriptive and meaningful test names that clearly describe expected behavior - Organize tests to mirror your source file structure - Group related tests logically using describe/context blocks or equivalent ### Test Isolation - Each test must be independent; avoid shared state between tests - Use fixtures and setup/teardown hooks for clean state management - Mock external services (APIs, databases) appropriately ### Test Data - Prefer factories over fixtures for test data creation - Use minimal, necessary setup for each test - Generate unique, diverse test data to cover edge cases ### Comprehensive Coverage - Tests must cover both typical cases and edge cases - Include tests for invalid inputs and error conditions - Focus on critical user paths that reflect real behavior ### Code Quality in Tests - Keep test code concise without unnecessary complexity - Extract reusable logic into helper functions - Share common behaviors across contexts using shared examples - Add comments explaining complex test logic ### Assertions - Use clear, readable assertion syntax - Prefer framework-specific assertion methods over generic assert statements - Write assertions that clearly communicate intent
© Mindrally · Apache-2.0 · Mindrally/skills
Similar skills
All skills for Testing and QA →testing by other authors comes first.