本文へ移動
cccskills
無料GitHub で公開

test-driven-development

Implements behavior changes with a test-first red-green-refactor loop: write one meaningful failing test, watch it fail for the intended reason, make the smallest change, then refactor while green. Use for new behavior, bug fixes, refactors with preserved contracts, and regression tests. Not required for disposable prototypes, generated files, or documentation-only edits.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md2.2 KB
  • references/test-design.md950 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Test-Driven Development

The test is an executable statement of behavior, not a coverage decoration.

Red-green-refactor

  1. Red: name one behavior and write the smallest test at the highest seam that can fail for the missing behavior.
  2. Verify red: run the focused command. Confirm it fails because the behavior is absent, not because of a typo, broken fixture, or setup error.
  3. Green: implement the simplest production change that makes the test pass. Do not add speculative options or unrelated cleanup.
  4. Verify green: run the focused test and relevant existing tests.
  5. Refactor: improve names, duplication, and boundaries while keeping the suite green. Add the next behavior only after the current loop is stable.

Honest tests

  • Assert user-visible or contract-visible behavior, not private call counts.
  • Prefer real collaborators; mock only an expensive, nondeterministic, or unavailable boundary and state why.
  • Make failures diagnostic: clear name, small fixture, one cause.
  • Include error, empty, boundary, retry, ordering, and permission cases when they are part of the contract.

Exceptions

For a prototype, generated output, or docs-only change, state why test-first is not useful and choose another observable check. “I will test later” is not an exception for production behavior.

Use test-design.md when the test seam or fixture quality is unclear. Pair with root-cause-debugging for an existing failure and completion-verification at the final gate.

Completion condition

The loop is credible when the test was observed failing for the intended reason, passes after the change, neighboring checks remain green, and the remaining untested behavior is named.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Designs and runs reproducible evaluations for AI agents, prompts, tools, skills, and model-backed workflows using realistic datasets, isolated baselines, objective assertions, rubric grading, trajectory analysis, cost/latency tracking, and regression comparison. Use when measuring agent quality, optimizing skill triggering, comparing prompts or models, or gating an AI feature release. Not for ordinary deterministic unit tests.

日本語の概要は準備中です。原文の説明を表示しています。

thiientv/godmode962026年8月26日 更新

Designs or reviews HTTP, REST, GraphQL, RPC, CLI, webhook, event, and service interfaces with explicit inputs, outputs, errors, compatibility, idempotency, pagination, authentication, versioning, and observability. Use when introducing or changing an API or cross-component contract. Not for internal implementation details with no boundary or for debugging one API failure; use root-cause-debugging there.

日本語の概要は準備中です。原文の説明を表示しています。

thiientv/godmode962026年8月26日 更新

Reviews an existing codebase for structural friction, unclear ownership, leaky or shallow interfaces, excessive coupling, misplaced state, poor testability, and risky dependency direction, then prioritizes evidence-backed improvement candidates. Use for architecture audits, modularization, modernization, or recurring cross-cutting change pain. Not for designing one new interface, simplifying a local function, or fixing a reproduced bug.

日本語の概要は準備中です。原文の説明を表示しています。

thiientv/godmode962026年8月26日 更新

Validates a running application, CLI, API, service, or generated artifact as a user or operator against a prewritten observable behavior contract while remaining source-blind. Use for acceptance checks, runtime proof, anti-fake probes, release smoke tests, or an independent companion to code review. Not for source-quality findings, root-cause diagnosis, or visual design judgment outside the contract.

日本語の概要は準備中です。原文の説明を表示しています。

thiientv/godmode962026年8月26日 更新

Closes a completed development branch by checking the final diff and proof, presenting merge, pull-request, keep, or discard options, and cleaning up only after the user or repository workflow chooses a path. Use when feature work is complete and the branch must be integrated or retired. Not for claiming a feature is complete before verification.

日本語の概要は準備中です。原文の説明を表示しています。

thiientv/godmode962026年8月26日 更新

Tests a real web user flow with a browser by asserting semantic behavior, network and loading states, keyboard access, responsive layouts, and stable visual evidence. Use for browser bugs, end-to-end UI behavior, responsive or accessibility checks, and screenshot baselines. Not for static source review without a browser or for backend-only tests.

日本語の概要は準備中です。原文の説明を表示しています。

thiientv/godmode962026年8月26日 更新

thiientv のスキルをすべて見る

このスキルの問題を報告する