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

tdd-guide

Test-driven development workflow with test generation, coverage analysis, and multi-framework support

インストール方法を見る

含まれるファイル(21)

  • SKILL.md4.2 KB
  • agents/openai.yaml143 B
  • assets/expected_output.json2.3 KB
  • assets/sample_coverage_report.lcov615 B
  • assets/sample_input_python.json1.4 KB
  • assets/sample_input_typescript.json1.4 KB
  • HOW_TO_USE.md7.0 KB
  • README.md18.0 KB
  • references/ci-integration.md3.9 KB
  • references/framework-guide.md4.2 KB
  • references/tdd-best-practices.md3.4 KB
  • scripts/coverage_analyzer.py15.1 KB
  • scripts/fixture_generator.py14.0 KB
  • scripts/format_detector.py11.9 KB
  • scripts/framework_adapter.py14.5 KB
  • scripts/metrics_calculator.py15.1 KB
  • scripts/output_formatter.py12.4 KB
  • scripts/tdd_workflow.py16.6 KB
  • scripts/test_generator.py14.3 KB
  • SKILL.en.md4.2 KB
  • SKILL.es.md4.9 KB

SKILL.md(原文)

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

TDD Guide

Test-driven development skill for generating tests, analyzing coverage, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, and Vitest.

Table of Contents


Capabilities

CapabilityDescription
Test GenerationConvert requirements or code into test cases with proper structure
Coverage AnalysisParse LCOV/JSON/XML reports, identify gaps, prioritize fixes
TDD WorkflowGuide red-green-refactor cycles with validation
Framework AdaptersGenerate tests for Jest, Pytest, JUnit, Vitest, Mocha
Quality ScoringAssess test isolation, assertions, naming, detect test smells
Fixture GenerationCreate realistic test data, mocks, and factories

Workflows

Generate Tests from Code

  1. Provide source code (TypeScript, JavaScript, Python, Java)
  2. Specify target framework (Jest, Pytest, JUnit, Vitest)
  3. Run test_generator.py with requirements
  4. Review generated test stubs
  5. Validation: Tests compile and cover happy path, error cases, edge cases

Analyze Coverage Gaps

  1. Generate coverage report from test runner (npm test -- --coverage)
  2. Run coverage_analyzer.py on LCOV/JSON/XML report
  3. Review prioritized gaps (P0/P1/P2)
  4. Generate missing tests for uncovered paths
  5. Validation: Coverage meets target threshold (typically 80%+)

TDD New Feature

  1. Write failing test first (RED)
  2. Run tdd_workflow.py --phase red to validate
  3. Implement minimal code to pass (GREEN)
  4. Run tdd_workflow.py --phase green to validate
  5. Refactor while keeping tests green (REFACTOR)
  6. Validation: All tests pass after each cycle

Tools

ToolPurposeUsage
test_generator.pyGenerate test cases from code/requirementspython scripts/test_generator.py --input source.py --framework pytest
coverage_analyzer.pyParse and analyze coverage reportspython scripts/coverage_analyzer.py --report lcov.info --threshold 80
tdd_workflow.pyGuide red-green-refactor cyclespython scripts/tdd_workflow.py --phase red --test test_auth.py
framework_adapter.pyConvert tests between frameworkspython scripts/framework_adapter.py --from jest --to pytest
fixture_generator.pyGenerate test data and mockspython scripts/fixture_generator.py --entity User --count 5
metrics_calculator.pyCalculate test quality metricspython scripts/metrics_calculator.py --tests tests/
format_detector.pyDetect language and frameworkpython scripts/format_detector.py --file source.ts
output_formatter.pyFormat output for CLI/desktop/CIpython scripts/output_formatter.py --format markdown

Input Requirements

For Test Generation:

  • Source code (file path or pasted content)
  • Target framework (Jest, Pytest, JUnit, Vitest)
  • Coverage scope (unit, integration, edge cases)

For Coverage Analysis:

  • Coverage report file (LCOV, JSON, or XML format)
  • Optional: Source code for context
  • Optional: Target threshold percentage

For TDD Workflow:

  • Feature requirements or user story
  • Current phase (RED, GREEN, REFACTOR)
  • Test code and implementation status

Limitations

ScopeDetails
Unit test focusIntegration and E2E tests require different patterns
Static analysisCannot execute tests or measure runtime behavior
Language supportBest for TypeScript, JavaScript, Python, Java
Report formatsLCOV, JSON, XML only; other formats need conversion
Generated testsProvide scaffolding; require human review for complex logic

When to use other tools:

  • E2E testing: Playwright, Cypress, Selenium
  • Performance testing: k6, JMeter, Locust
  • Security testing: OWASP ZAP, Burp Suite

レビュー

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

同じリポジトリのスキル

概要と使いどころ

ab-test-setup

無料日本語概要

A/Bテストや実験の設計・実装を支援するスキル。 「A/Bテストを設計して」「スプリットテストしたい」「仮説を立ててテストしたい」「バリアントを比較」等のリクエストで発動。 トラッキング実装は analytics-tracking を参照。

minicoohei/ai-agent-camp3472026年10月7日 更新

agent-designer

無料日本語概要

マルチエージェントシステムのアーキテクチャ設計ツールキット。 「エージェントを設計して」「マルチエージェント構成」「エージェントのアーキテクチャ」「オーケストレーション設計」等のリクエストで発動。

minicoohei/ai-agent-camp3472026年10月7日 更新

aiagent-check-setup

無料日本語概要

ai-agent-campのローカル環境セットアップを確認するスキル。 「セットアップ確認」「環境チェック」「初期設定できてる?」「インストール確認」「依存関係チェック」等のリクエストで発動。

minicoohei/ai-agent-camp3472026年10月7日 更新

aiagent-command-router

無料日本語概要

ai-agent-campのスラッシュコマンドをCodexでルーティングするスキル。 「/start-0-1を実行」「スラッシュコマンドを使いたい」「コマンドルーティング」「Cursorのコマンドを使いたい」等のリクエストで発動。

minicoohei/ai-agent-camp3472026年10月7日 更新

aiagent-env-manager

無料日本語概要

ai-agent-campの環境変数・認証情報を安全に管理するスキル。 「APIキーを設定」「.envを管理」「環境変数の設定」「credential managerを使いたい」「秘密情報の管理」等のリクエストで発動。

minicoohei/ai-agent-camp3472026年10月7日 更新

aiagent-guide

無料日本語概要

ai-agent-campリポジトリの案内・オリエンテーションスキル。 「リポジトリ案内」「次のレッスンは?」「どこから始める」「ツールの違い」「aiagent概要」等のリクエストで発動。

minicoohei/ai-agent-camp3472026年10月7日 更新

minicoohei のスキルをすべて見る

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