codegen-test
A skill for writing Go tests in a TDD workflow. Follow README/Issue requirements and existing test conventions, add a balanced set of table-driven cases across behavior/boundaries/branches, and produce maintainable tests without excessive mocking or coverage-chasing.
Security Assessment
About codegen-test
The codegen-test skill is designed to assist developers in writing Go tests within a Test-Driven Development (TDD) workflow. This skill aims to streamline the process of creating tests by focusing on the core principles of TDD: Red → Green → Refactor. It emphasizes generating idiomatic, maintainable, and readable Go tests that are aligned with project conventions. The skill encourages test design practices that go beyond simple coverage, incorporating boundary cases, behavior testing, and regression prevention. With a focus on minimizing excessive mocking, it enables developers to create tests that are both effective and maintainable, reducing the potential for bloated or fragile test code.
FAQ
What is the purpose of the codegen-test skill?
The codegen-test skill helps developers write Go tests following a TDD workflow, ensuring that the tests are maintainable, idiomatic, and aligned with existing project conventions.
When should I use this skill?
Use this skill when you want to write tests first for a new feature, bug fix, or refactor. It is also helpful when the existing behavior is unclear, and you want to establish consensus on the expected behavior via tests.
Are there any specific test conventions to follow?
Yes, the skill emphasizes following the existing test conventions of the project, including package style, assertion approaches, test data layout, and naming conventions.
Does the codegen-test skill support mocks?
The skill discourages the use of mocks, promoting a more classicist approach to writing tests that minimize the reliance on mocking frameworks.
What should I focus on while writing tests using this skill?
Focus on writing tests that cover behavior (black-box), boundaries, and regression cases, rather than solely focusing on branch coverage. Table-driven tests are recommended to improve readability and maintainability.
Install codegen-test
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nihiyama/ffq