Skip to content
cccskills
FreePublished on GitHub

tdd

Practice test-driven development for new features and bug fixes.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

TDD

Invocation

This skill is performed in the Developer persona. If you are not already running as Developer (for example, the user invoked /tdd directly), read subagents/developer.md and adopt its role guidance for the rest of this task. Stay in the current chat—do not delegate to a subagent.

Objective

Use a red -> green -> refactor workflow for changes that should be test-first.

Use /code instead when the work is implementation-heavy but not centered on new automated test coverage, such as tooling, config, or linting work.

Instructions

  1. Determine whether the task is a bug fix or a new feature.
  2. For new features, read the relevant spec or acceptance criteria before writing tests.
  3. For bug fixes, capture the expected behavior, actual behavior, and reproduction path before writing tests.
  4. Identify the most appropriate unit-level test location based on nearby repo patterns.
  5. Write the failing test first.
  6. Verify the red phase by running the relevant test suite.
  7. Implement the smallest change needed to make the new test pass.
  8. Re-run tests, then run the applicable verification checks (linting, type checking, etc.).
  9. If the change also requires browser-flow validation, call out that E2E tests are relevant and why.
  10. End with the test paths, the observed red failure, the passing result, and any follow-up work.

Guardrails

  • Do not create or modify E2E tests unless the user explicitly asks for E2E coverage.
  • Keep TDD changes scoped to the behavior under test.
  • Refactor only after the tests demonstrate the intended behavior.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

brief

Free

Create a product brief document for a feature or project.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

code

Free

Implement production changes with or without new test coverage.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

Prepare commits, push a branch, and create a draft PR targeting your base branch.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

Generate a PR description for the current branch against your base branch.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

review

Free

Review a branch or PR for merge readiness and produce a QA report.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

spec

Free

Transform a product brief into a technical specification.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

See all skills by g2i-ai

Report a problem with this skill