Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill testing -a claude-code
Open on GitHub

What 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.ts using mocked network calls.
  • Review my test suite in tests/user.test.ts to 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-code

2Manually: put the files in place

~/.claude/skills/testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/testing/

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.

testing tursodatabase Skill teaches you to write tests for SQL and Rust: choose between .sqltest, TCL and integration formats, run test suites with the right commands. CX Codex +1 1,300installs testing codewithmukesh A skill that lays out a testing strategy for .NET 10 apps: integration tests via WebApplicationFactory, real databases in Testcontainers, Verify snapshots. CX Codex +1 2,800installs testing grafana Sets up uptime probes, k6 load tests, and frontend observability through Grafana Cloud. Use it before a release or when investigating failures. CX Codex +1 4,200installs testing rshankras A set of TDD workflows and test infrastructure for Apple platform apps. Useful when an agent writes the code and you want tests around it. CX Codex +1 468installs testing modelcontextprotocol The skill covers where tests live for each MCP server, which runner picks them up, and how to clear the per-file coverage gate. Useful when a test is skipped or passes against a stale build. CX Codex +1 ★ 91,547repo stars improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. CX Codex +1 678,700installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. 1,141,062installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. 414,180installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. CX Codex +1 1,200,000installs prototype Matt Pocock Creates throwaway prototypes for checking state logic or exploring UI before committing the decision to the main codebase. 986,201installs

From the same set214

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor