test-writer

Enforce contract-based test writing for Python functions, models, APIs, and integrations.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/cncorp/arsenal --skill test-writer-cncorp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/cncorp/arsenal/tree/main/dot-claude/skills/test-writer
Command: npx skills add https://github.com/cncorp/arsenal --skill test-writer-cncorp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest.

What problem does it solve?

This Skill enforces good testing practices to produce robust, contract-focused tests and avoid brittle tests.

Core Features & Use Cases

  • Contract-based testing: writing tests that verify contracts, not library internals.
  • Fixture guidance: proper fixture usage.
  • Test structure: ensures tests cover YOUR code guarantees.

Quick Start

Follow test-writer guidelines before writing any test code, including analyzing the code and dependencies.

Frequently Asked Questions about test-writer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write tests that verify my code's contracts instead of library behavior?

Contract-based testing verifies what your code guarantees, not how pytest or dependencies work internally. Focus tests on your function's input-output contracts, database model invariants, and API response guarantees rather than framework implementation details.

What's the best way to structure pytest fixtures for robust tests?

Proper fixture usage means creating reusable, explicit test data that isolates concerns and avoids framework-specific behavior. test-writer enforces fixture patterns that prevent brittle tests and ensure your fixtures reflect actual business requirements.

How do I avoid writing brittle tests for Python functions and APIs?

Brittle tests fail when implementation details change, not when contracts break. Enforce contract coverage across pure functions, database models, and external integrations by defining explicit business guarantees upfront, then verify those guarantees—not implementation specifics.

Can I use contract-focused testing with pytest for database models and external integrations?

Yes. Contract-based testing applies across pure functions, database models, APIs, and external integrations in Python projects. test-writer guides fixture usage and contract coverage for all these contexts, ensuring tests remain robust as implementations evolve.

What should I review after writing tests to ensure they're contract-focused?

Mandatory review after test creation checks that fixtures are appropriate, contracts are explicit, tests cover your code's guarantees rather than library behavior, and coverage is complete. This prevents tests from becoming brittle as requirements or dependencies change.