jpskill.com
🛠️ 開発・MCP コミュニティ

implementing-with-tdd

Use when implementing bug fixes, features, or any code changes where test-first development is appropriate.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o implementing-with-tdd.zip https://jpskill.com/download/17578.zip && unzip -o implementing-with-tdd.zip && rm implementing-with-tdd.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17578.zip -OutFile "$d\implementing-with-tdd.zip"; Expand-Archive "$d\implementing-with-tdd.zip" -DestinationPath $d -Force; ri "$d\implementing-with-tdd.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して implementing-with-tdd.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → implementing-with-tdd フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

TDDによる実装

PairCoderとの連携

このプロジェクトでTDDを用いて実装を行う場合:

  1. タスクを開始: bpsai-pair task update TASK-XXX --status in_progress
  2. tests/test_<module>.pyテストを記述
  3. テストを実行: pytest tests/test_<module>.py -v (REDになることを期待)
  4. tools/cli/bpsai_pair/実装
  5. テストを実行: pytest tests/test_<module>.py -v (GREENになることを期待)
  6. 必要に応じてリファクタリング。テストがGREENの状態を維持
  7. 完了: 2段階完了については managing-task-lifecycle スキルに従ってください

プロジェクトのテストコマンド

# 特定のテストを実行
pytest tests/test_module.py::test_function -v

# 全てのテストを実行
pytest

# カバレッジ付きで実行
pytest --cov=tools/cli/bpsai_pair

# 失敗したテストのみを実行
pytest --lf

# 最初の失敗で停止
pytest -x

# print出力を表示
pytest -s

プロジェクトのテスト規約

  • テストファイル: tests/test_<module>.py
  • テスト関数: test_<function>_<scenario>_<expected>()
  • tests/conftest.py のフィクスチャを使用
  • 外部サービス(Trello APIなど)をモック

Linting

# Lintingをチェック
ruff check .

# 自動修正
ruff check --fix .

全てのチェックを実行

bpsai-pair ci    # テスト + linting + 型チェックを1つのコマンドで実行

タスク完了

テストが成功した後、managing-task-lifecycle スキルに従ってください:

  1. bpsai-pair ttask done TRELLO-XX --summary "..." --list "Deployed/Done"
  2. bpsai-pair task update TASK-XXX --status done
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

TDD Implementation

PairCoder Integration

When implementing via TDD in this project:

  1. Start task: bpsai-pair task update TASK-XXX --status in_progress
  2. Write test in tests/test_<module>.py
  3. Run test: pytest tests/test_<module>.py -v (expect RED)
  4. Implement in tools/cli/bpsai_pair/
  5. Run test: pytest tests/test_<module>.py -v (expect GREEN)
  6. Refactor if needed, keeping tests green
  7. Complete: Follow managing-task-lifecycle skill for two-step completion

Project Test Commands

# Run specific test
pytest tests/test_module.py::test_function -v

# Run all tests
pytest

# Run with coverage
pytest --cov=tools/cli/bpsai_pair

# Run only failed tests
pytest --lf

# Stop on first failure
pytest -x

# Show print output
pytest -s

Project Test Conventions

  • Test files: tests/test_<module>.py
  • Test functions: test_<function>_<scenario>_<expected>()
  • Use fixtures from tests/conftest.py
  • Mock external services (Trello API, etc.)

Linting

# Check linting
ruff check .

# Auto-fix
ruff check --fix .

Run All Checks

bpsai-pair ci    # Runs tests + linting + type checks in one command

Task Completion

After tests pass, follow the managing-task-lifecycle skill:

  1. bpsai-pair ttask done TRELLO-XX --summary "..." --list "Deployed/Done"
  2. bpsai-pair task update TASK-XXX --status done