Agent skill
test-first
Guide for Test-First (Test-Driven) Development. Focuses on writing tests before implementation, ensuring comprehensive coverage and clear requirements. Covers test design, edge cases, and the Arrange-Act-Assert structure.
Install this agent skill to your Project
npx add-skill https://github.com/s-hiraoku/synapse-a2a/tree/main/plugins/synapse-a2a/skills/test-first
SKILL.md
Test-First Development Skill
Test-First Development (TDD) ensures that code is written to satisfy specific, predefined requirements, leading to higher quality and better design.
TDD Workflow
- Red: Write a failing test for a small piece of functionality.
- Green: Write the minimum amount of code required to make the test pass.
- Refactor: Clean up the code while ensuring the tests remain green.
Test Design Principles
1. Comprehensive Coverage
- Normal Cases: Test the expected "happy path" behavior.
- Boundary Values: Test inputs at the edges of valid ranges (e.g., 0, max_int, empty strings).
- Edge Cases: Test unusual or extreme conditions (e.g., network timeout, disk full, null values).
- Error Handling: Verify that the system fails gracefully and returns appropriate error messages.
2. Structure (Arrange-Act-Assert)
Follow the AAA pattern for clear and maintainable tests:
- Arrange: Set up the necessary preconditions and inputs.
- Act: Execute the function or method being tested.
- Assert: Verify that the outcome matches the expectation.
Best Practices
- One Assertion per Test: Aim to test a single concept per test case.
- Descriptive Naming: Name tests clearly (e.g.,
test_should_reject_invalid_api_key). - Independence: Ensure tests do not depend on each other or on a specific execution order.
- Fast Execution: Keep unit tests fast to encourage frequent execution.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
task-planner
Guide for decomposing large tasks into a structured plan with dependency chains, managing priorities, and distributing work across agents. Outputs plan cards or delegation messages as the team contract; TodoList for personal micro-steps.
react-performance
Comprehensive React and Next.js performance optimization guide. Covers waterfall elimination, bundle size reduction, server-side optimization, re-render prevention, and rendering performance. Use when building, reviewing, or optimizing React/Next.js applications for speed.
release
Update version in pyproject.toml, plugin.json, and add changelog entry. This skill should be used when the user wants to bump the version number and update CHANGELOG.md. Triggered by /release or /version commands.
api-design
Guide API design for REST, GraphQL, gRPC, and CLI interfaces. Use this skill when designing new APIs, reviewing existing API contracts, or establishing API conventions for a project. Produces consistent, well-documented API specifications.
pr-guardian
Continuously monitor a GitHub PR for merge conflicts, CI failures, and CodeRabbit review comments, then automatically fix any issues found. Polls every 5 minutes and loops until every check is green. Use this skill whenever a PR has just been created or code has been pushed to a PR branch — it should be the default follow-up action after any PR creation or push. Also trigger on: "watch this PR", "guard this PR", "monitor CI", "keep fixing until green", "PRを監視して", "CIが通るまで 直して", /pr-guardian. When a PostToolUse hook reports that a push or PR creation just happened, proactively invoke this skill to start monitoring without waiting for the user to ask.
post-impl2
Workflow: Test workflow with non-existent agent target. . Triggered by /post-impl2 command.
Didn't find tool you were looking for?