testing-guidelines
Guide for writing tests. Use when adding new functionality, fixing bugs, or when tests are needed. Emphasizes integration tests, real-world fixtures, and regression coverage.
Install
mkdir -p .claude/skills/testing-guidelines && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3585" && unzip -o skill.zip -d .claude/skills/testing-guidelines && rm skill.zipInstalls to .claude/skills/testing-guidelines
About this skill
Testing Guidelines
Follow these principles when writing tests.
Core Principles
1. Mock External Services, Use Real Fixtures
ALWAYS mock third-party network services. ALWAYS use fixtures based on real-world data.
- Fixtures must be scrubbed of PII (use dummy data like
foo@example.com,user-123) - Capture real API responses, then sanitize them
- Never make actual network calls in tests
2. Prefer Integration Tests Over Unit Tests
Focus on end-to-end style tests that validate inputs and outputs, not implementation details.
- Test the public interface, not internal methods
- Unit tests are valuable for edge cases in pure functions, but integration tests are the priority
- If refactoring breaks tests but behavior is unchanged, the tests were too coupled to implementation
3. Minimize Edge Case Testing
Don't test every variant of a problem.
- Cover the common path thoroughly
- Skip exhaustive input permutations
- Skip unlikely edge cases that add maintenance burden without value
- One representative test per category of input is usually sufficient
4. Always Add Regression Tests for Bugs
When a bug is identified, ALWAYS add a test that would have caught it.
- The test should fail before the fix and pass after
- Name it descriptively to document the bug
- This prevents the same bug from recurring
Note: Regression tests are for unintentional broken behavior (bugs), not intentional changes. Intentional feature removals, deprecations, or breaking changes do NOT need regression tests—these are design decisions, not defects.
5. Cover Every User Entry Point
ALWAYS have at least one basic test for each customer/user entry point.
- CLI commands, API endpoints, public/exported functions
- Test the common/happy path first
- This proves the entry point works at all
Note: "Entry point" means the public interface—exported functions, CLI commands, API routes. Internal/private functions are NOT entry points, even if they handle user-facing flags or options. Test entry points; internal functions get coverage through those tests.
6. Tests Validate Before Manual QA
Tests are how we validate ANY functionality works before manual testing.
- Write tests first or alongside code, not as an afterthought
- If you can't test it, reconsider the design
- Passing tests should give confidence to ship
Technical Guidelines
File Organization
- Co-locate tests with source files when possible
- Use the project's standard test file naming convention
Test Isolation
Every test must:
- Run independently without affecting other tests
- Use temporary directories for file operations
- Clean up resources after completion
Pure Function Tests
For pure functions without side effects, no special setup is needed—just test inputs and outputs directly.
Checklist Before Submitting
- New entry points have at least one happy-path test
- Bug fixes (not intentional changes) include a regression test
- External services are mocked with sanitized fixtures
- Tests validate behavior, not implementation
- No shared state between tests
More by getsentry
View all →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
rust-coding-skill
UtakataKyosui
Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.