ソース情報
- リポジトリ
- andrem-sec/psc-comet
- ソースの最終更新活動
- 2026年4月1日 00:39
- 検出された SKILL.md の言語
- 英語
- スター
- 4
- フォーク
- 0
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/andrem-sec/psc-comet --skill tddコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SOC 職業分類に基づく
SKILL.md を表示中
| name | tdd |
| description | Test-driven development — Red, Green, Refactor with explicit phase gates |
| version | 0.2.0 |
| level | 2 |
| triggers | ["tdd","test driven","write tests first","TDD mode","/tdd"] |
| context_files | ["context/user.md"] |
| steps | [{"name":"Red","description":"Write a failing test describing the desired behavior. Run it. Confirm it fails for the right reason."},{"name":"Green","description":"Write minimum code to pass. Nothing more."},{"name":"Verify","description":"Run the full test suite. All tests must pass, not just the new one."},{"name":"Refactor","description":"Improve the implementation without changing behavior. Tests stay green."},{"name":"Repeat","description":"Next behavior increment — return to Red."}] |
Enforce the Red → Green → Refactor cycle.
Without TDD enforcement, Claude writes implementation first and tests after. The tests then verify what the code does rather than what it should do — producing tests that pass by construction. The feedback loop is inverted: Claude discovers problems at the end of implementation rather than at the start.
Write the test first. Run it. If it passes, the test is wrong — either it is testing something that already exists or it is not actually asserting anything.
The test must fail for the right reason:
AssertionError: expected 401, got 200 — the behavior is not implemented yetImportError: cannot import name 'login' — the function doesn't exist yet, fix the import structure firstDo not proceed to Green until the test fails for the right reason.
Write the minimum code to make the test pass. Not the cleanest code. Not the most extensible code. The minimum.
If you cannot make the test pass in under 15 minutes, the test scope is too large. Split it.
One refactor at a time. Rename, extract function, remove duplication — one change. Run tests. Green. Next change.
Do not batch multiple structural changes in one refactor pass. If tests go red mid-refactor, you have changed too much to know which change broke it.
Coverage targets are differentiated by code criticality:
100% coverage required:
90% coverage required:
80% coverage required:
Why differentiated: Not all code has the same cost-of-failure. A bug in auth can leak all user data. A bug in a UI tooltip is cosmetic. Invest test effort proportional to risk.
Check coverage before declaring Green complete. Do not regress existing coverage.
For non-deterministic code (LLM calls, external API integration, complex business rules), measure reliability with pass@k metrics:
pass@1: Test passes on first attempt
pass@3: Test passes at least once in 3 attempts
pass^3: Test passes on all 3 attempts
Use these metrics when:
Run 3 times, record pass@1, pass@3, pass^3. Only use for non-deterministic code — deterministic tests should be pass@1 = 100%.
test_[unit]_[scenario]_[expected_outcome]
Examples:
test_auth_with_expired_token_returns_401test_order_when_stock_zero_raises_OutOfStockDo not write implementation and then write a test that matches it. That is not TDD — it is documentation.
Do not test implementation details. Tests should not break when internal structure changes without behavior changing.
Do not mock the database in integration tests. Use a real test database. Mocked tests that pass while real behavior is broken are worse than no tests.