br4zz4:skill:test

Creates tests for code files changed in the current git diff.

Updated May 25, 2025
One-click install
npx skills add https://github.com/oporpino/commons --skill br4zz4-skill-test-oporpino
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: br4zz4:skill:test
Source: https://github.com/oporpino/commons/tree/main/ai/shared/skills/br4zz4%3Atest
Command: npx skills add https://github.com/oporpino/commons --skill br4zz4-skill-test-oporpino

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing tests for newly changed code is often skipped or done inconsistently. This Skill automates the creation of tests for files modified in the current git diff, following your project's testing conventions. ## Core Features & Use Cases - Diff-based test generation: Identifies changed code files via git diff and analyzes happy paths, alternative flows, and boundary inputs. - Convention enforcement: Applies Triple A pattern, atomic tests, one assert per test, and correct mock usage for unit vs integration tests. - Safety guardrails: Never modifies existing test files or production code without explicit user confirmation, preventing false positives. - Use Case: After finishing a feature branch, ask the assistant to create tests for your changes; it inspects the diff, writes the tests, and runs make t to verify they pass. ## Quick Start Create tests for the files changed in my current git diff and verify they pass.

Frequently Asked Questions about br4zz4:skill:test

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

FAQPage Schema
How do I generate tests for files changed in my git diff?▼

Run git diff to list modified code files, analyze each change for happy paths, alternative flows, and boundary inputs, then write tests following the Triple A pattern. This Skill automates that entire workflow and verifies results with make t.

How to write unit tests following the Triple A pattern?▼

Structure each test with explicit arrange, act, and assert comments, keep tests atomic by instantiating everything inside the test, and limit assertions to one per test. Use mocks for external dependencies in unit tests only.

Will this modify my existing test files automatically?▼

No. If test files already exist for the changed code, the Skill asks for explicit permission before modifying them, describing exactly what will change and why. This prevents accidental regressions in existing coverage.

What happens when a generated test fails?▼

The Skill analyzes the failure: if the issue is in the test, it fixes the test; if the failure indicates a real bug in production code, it reports the problem to the user instead of changing the code to make the test pass.

Should mocks be used in integration tests?▼

No. The testing rules applied here use mocks only for external dependencies in unit tests. Integration tests run against real dependencies to validate actual component interactions.