test-writer

Official

Automate robust tests, prevent bugs, save costs.

Authortrust-chain-organization
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill ensures that all tests in the Polibase project adhere to strict quality standards, preventing flaky tests, CI/CD failures, and unnecessary API costs. It guides developers through best practices like Test-Driven Development (TDD), proper mocking, and async testing, significantly reducing debugging time.

Core Features & Use Cases

  • TDD Workflow Guidance: Promotes a "Red-Green-Refactor" cycle, ensuring tests are written before implementation.
  • Critical Mocking Enforcement: Strictly forbids real external API calls in tests, enforcing AsyncMock with spec= to guarantee test isolation and determinism.
  • Async Test Best Practices: Guides on using pytest-asyncio for asynchronous code, preventing common pitfalls.
  • Use Case: When you're developing a new feature, this skill helps you write the initial failing test, then guides you to implement just enough code to pass it, and finally assists in refactoring, ensuring your code is robust and well-tested from the start.

Quick Start

I need to write a new unit test for the CreatePoliticianUseCase. Guide me through the TDD workflow and ensure I mock all external dependencies correctly.

Dependency Matrix

Required Modules

pytestpytest-asyncio

Components

referencesassets

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: test-writer
Download link: https://github.com/trust-chain-organization/polibase/archive/main.zip#test-writer

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.