원클릭으로
test-scenario-hygiene
Use after TDD is finished, to review and clean the testing additions
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use after TDD is finished, to review and clean the testing additions
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes - four-phase framework (root cause investigation, pattern analysis, hypothesis testing, implementation) that ensures understanding before attempting solutions
IMMEDIATELY USE THIS SKILL when creating or develop anything and before writing code or implementation plans - refines rough ideas into fully-formed designs through structured Socratic questioning, alternative exploration, and incremental validation
Read this skill whenever you need to build a cli where the primary consumer is the agent.
Use when implementing user interfaces or user experiences - guides through exploration of design variations, frontend setup, iteration, and proper integration
Use when asked to create a new skillset.
Use this skill when faced with a difficult debugging task where you need to replicate some bug or behavior in order to see what is going wrong.
| name | test-scenario-hygiene |
| description | Use after TDD is finished, to review and clean the testing additions |
After TDD completes, many test scenarios may be temporary scaffolding, useful during development but adding little long-term value. You must review and clean up these tests.
Announce at start: "I'm using the Test Scenario Hygiene skill to review and clean up test scenarios from this session."
Integration test hitting real boundaries Unit test for pure utility function Durable end-to-end test for user workflow Edge case that risks application failure
Test that exclusively exercises mocks Test for stdlib/builtin/library behavior Brittle test checking internal state Duplicate coverage for already-tested behavior
Signs a test should likely be discarded:
skip or xfail markers with no clear reasonReview all changes from this session to identify added test scenarios.
# Check staged and unstaged changes
git diff --name-only
git diff --cached --name-only
# If no current changes, check recent commits from this session
git log --oneline -20
git diff HEAD~N..HEAD --name-only # where N = commits from this session
Create a list of all test files that were modified or created. For each test file, identify the specific test scenarios (functions/methods) that were added.
If no test changes are found: Report this to the user and skip to Step 5 (formatters/linters).
Use the Task tool with subagent_type=general-purpose to review test quality.
Pass the list of tests with this prompt:
Review each of these test cases. For each test, determine:
- Is this test durable and likely useful over time? (Tests real behavior, good coverage, not overly specific to implementation details)
- OR is this test temporary/scaffolding? (Maybe useful during TDD, but brittle, testing a builtin or library, adds little long-term value)
Return a structured list categorizing each test as 'keep' or 'discard' with a brief reason.
Tests to review:
<list of test file paths and test function names>
Summarize the results to the user:
The following test scenarios have been reviewed:Recommended to KEEP:
path/to/test.ts:42 - test_name: [reason]path/to/test.ts:58 - other_test: [reason]Recommended to DISCARD:
path/to/test.ts:87 - scaffolding_test: [reason]path/to/test.ts:102 - mock_only_test: [reason]Would you like to:
Use AskUserQuestion to determine the choice from the four options.
Based on user selection:
When removing tests, edit the test files to delete the specific test functions/methods. Do not delete entire files unless all tests in the file are being removed.
Check if the project has formatting/linting configured:
# Look for common config files
ls package.json pyproject.toml Cargo.toml setup.cfg .eslintrc* .prettierrc* Makefile justfile 2>/dev/null
If NO formatters/linters are configured: Ask the user if something was missed. Do not fail - just note it and proceed.
Use the Task tool to run any formatters and fix issues in a subagent. Provide this prompt the subagent:
Run the project's formatters and linters. Fix any issues that arise.
Look for:
- npm run lint / npm run format
- yarn lint / yarn format
- just fmt / just fix
- make lint / make format
- ruff / black / isort (Python)
- eslint --fix / prettier --write (JavaScript/TypeScript)
- cargo fmt / cargo clippy
Present the final summary to the user:
**Test Scenario Hygiene Complete**Temporary tests removed:
path/to/test.ts:87 - scaffolding_testpath/to/test.ts:102 - mock_only_testThese tests were used to keep development on track with requirements and have now been cleaned up.
Tests retained: N tests across M files
Formatters/linters: [Ran successfully / No issues / Fixed N issues / Not configured]