authoring-tests
Use when writing, reviewing, or modifying any test files, or when asked to add test coverage.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when writing, reviewing, or modifying any test files, or when asked to add test coverage.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Make a set of things (code, prose, config, docs) consistent along a dimension the user names, by picking a canonical form and conforming every member to it.
Remove illegal states from data structures by redesigning their types so the illegal states cannot be represented at all.
Remove unnecessary comments from code: tombstones, redundant restatements, and comments a well-named variable or function would replace.
Perform a task with a worker agent, critique it with an adversary agent, and apply the accepted critiques with a reconciler agent.
Replace jargon and imported metaphors in code and prose with concrete, domain-fitting terms a reader understands without translation.
Create a new Claude Code skill following the conventions of existing skills.
| name | authoring-tests |
| description | Use when writing, reviewing, or modifying any test files, or when asked to add test coverage. |
| paths | ["**/*.test.{js,cjs,mjs,jsx,cjsx,mjsx,ts,cts,mts,tsx,ctsx,mtsx}","**/*.spec.{js,cjs,mjs,jsx,cjsx,mjsx,ts,cts,mts,tsx,ctsx,mtsx}","tests/**/*","testing/**/*"] |
| user-invocable | false |
Adhere to these principles when writing tests:
Use arrange-act-assert with empty lines in between:
Keep each test focused and orthogonal to other tests unless you're testing an interaction between two behaviors or each test is expensive.
Prefer parameterized testing over multiple independent calls and assertions in the same test.
Test behaviors, not functions. A single function may exhibit many behaviors, and a single behavior sometimes spans across multiple functions.
Write test names that describe the scenario and expected outcome of the test.
Avoid overspecifying tests. Rule of thumb: if changing the expected data in an assertion does not change the meaning of test, then it shouldn't be asserted.
Don't test implementation details. Test the public API only.
Avoid mocks. Prefer real implementations and test doubles over mocks. Reserve mocks for I/O boundaries and third-party services. If you must use mocks, then ONLY mock public APIs.
Extract well named variables to split up and clarify complex test data.
Use helper functions to remove redundant details from the test body. NEVER hide details relevant to the test in helper functions. Pass the relevant data into the helper function from the test instead.
Don't put logic in tests. Avoid conditionals and loops, and state inputs and outputs directly to avoid bugs in the tests themselves. If the logic is truly necessary, then extract it to a function and test it as well.
Do not write redundant change detector tests. If the test would break for any change in the code under test, then it's likely a change detector test.