unit-test
Skill1 starsChanged 38 days agoMITView on GitHub
Use when the user directly requests efficiency-aware multi-angle unit tests or a test report after code changes. Triggers include "단위 테스트", "유닛테스트", "테스트 돌려", "다방면 테스트", "테스트 문서 정리", and the English equivalents "unit test", "run the tests", "multi-angle tests", "write up the test results", and "/unit-test". Codex or Claude runs tests locally without calling another LLM, avoids duplicate full-suite gates, and writes a focused report to the project's test directory. Not for E2E, external DB/network checks, runtime verification, or performance benchmarks.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- neomjs/neo-agent-skillstheir own version, first seen Nov 8, 2026
- eyssette/js-templatetheir own version, first seen Nov 1, 2026
- kudeerliu48-web/CloseCodetheir own version, first seen Nov 1, 2026
- DongDuong2001/pudo-code-systemtheir own version, first seen Oct 13, 2026
- ivyfan-toowell/IvyClawtheir own version, first seen Oct 13, 2026
- phatysddev/skillstheir own version, first seen Oct 9, 2026
Used with
Projects with it also use e2e-test.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
WhatIfWeDigDeeperSkille2e-test
Create Playwright e2e tests for features in isolated worktree
Also in 4 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- xtermjs/xterm.js★ 21ksame name
- oprogramadorreal/optimus-claude★ 75same name
- ivyfan-toowell/IvyClaw★ 66same name
- johnqtcg/awesome-skills★ 30same name
- kudeerliu48-web/CloseCode★ 14same name
- neomjs/neo-agent-skills★ 11same name
- phatysddev/skills★ 8same name
- DongDuong2001/pudo-code-system★ 5same name
- kevinaimonster/skill-hub★ 4same name
- lldwb/lldwb-claude-skills★ 1same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- crosscheckSkill
- verifySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 10 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use the runtime identity supplied by the current session.
- Distinctive: line 16
Use this skill only when the user explicitly asks for unit testing or its report.
- Distinctive: line 29
Prefer pure-logic units and isolated local fixtures first.
- Distinctive: line 51
Every retained case must name the defect it catches and assert an observable result, exception, or state effect.
- Distinctive: line 56
Do not alter the user's working tree for this check.
- Very specific: line 61
Prefer the project's existing test framework (phpunit, jest, pytest, go test…).
- Distinctive: line 63
If using runtime assertions, first prove a deliberately false assertion fails.
- Very specific: line 66
Test path stated in project rule docs (CLAUDE.md, CLAUDE.local.md, AGENTS.md …) — e.g.
- Distinctive: line 73
Run changed-unit focused tests first.
- Very specific: line 81
If an unchanged test fails, rerun it once.
- Very specific: line 91
Write <project>/test/UNITTEST_<YYYYMMDD>_<topic>.md (create test/ if absent).
- Very specific: line 106
Use explicit representations for empty values ([], null, "").
- Very specific: line 109
Before finishing, run python3 <skill>/scripts/validate_report.py <report> and fix any count mismatch, missing case evidence, or forbidden …
- Distinctive: line 120
Keep meaningful regression tests in the existing test suite when the approved change introduces or fixes behavior.
- Distinctive: line 122
Delete task-only test scripts, probes, and fixtures after use when no durable coverage remains.
- Distinctive: line 124
If project rules explicitly require temporary tests only (e.g.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
unit-test — multi-angle unit testing after code changes
The active host designs, runs, and documents unit tests for freshly changed code. Use the runtime identity supplied by the current session; never infer it from skill paths. Host-local only: never call the counterpart, crosscheck scripts, or another LLM. Respond in the language the user writes in — Korean request, Korean output; English request, English output. The report follows that same language. This rule document stays English regardless.
0. Invocation — explicit requests only
- Use this skill only when the user explicitly asks for unit testing or its report.
- Ordinary code modification does not trigger this skill. Do not offer unit tests merely because code changed.
- A direct request to run unit tests IS the approval for local unit testing; do not ask again.
- Approval covers local unit testing only. Never access an external DB, network, service, or runtime from this skill. Route those checks to a separate verification step with its own explicit permission.
1. Scope — what to test
git diff HEAD(or the session's edit list) → enumerate changed functions/methods.- Classify each check as
UNIT,STATIC,BUILD,INTEGRATION,RUNTIME, orPERFORMANCE. This skill executes only localUNIT, plus the smallest usefulSTATICorBUILDgate. List the other classes as uncovered; do not run them here. - Prefer pure-logic units and isolated local fixtures first.
- Skip generated files, comments-only changes, config values.
2. Design — multi-angle case matrix
Pick every applicable angle per unit (skip N/A ones, say so in the report):
| Angle | What it catches |
| happy path | basic contract |
| boundary | 0 / max / off-by-one / time-second edges |
| empty·null·missing | [], null, absent keys, no rows |
| error path | invalid input, enum tryFrom fail, exception contract |
| ordering·determinism | sort stability, map-vs-single result order |
| before/after equivalence | refactor: old logic vs new logic on same inputs |
| side effects | state mutation, cache pollution across calls |
- For refactors, equivalence is the top priority: use captured pre-change results or the OLD logic as an oracle on the same inputs. Do not derive expected values by calling the new implementation. Pair equivalence with an independent contract assertion so an existing defect does not become the desired behavior.
- Boundary values come from the code (constants,
E_-style config), not guesses. - Every retained case must name the defect it catches and assert an observable result, exception, or state effect. Prefer different failure mechanisms over many inputs that repeat the same assertion.
- For a newly fixed defect, observe the regression case failing on an isolated pre-change implementation/known-bad fixture and passing after the fix when feasible. Do not alter the user's working tree for this check. If unavailable, state that defect-detection strength was not demonstrated; do not invent a red/green run.
3. Run efficiently
- Prefer the project's existing test framework (
phpunit,jest,pytest,go test…). - None available → a standalone script with explicit failure exceptions/exit code ≠ 0. If using runtime assertions, first prove a deliberately false assertion fails; disabled assertions cannot supply PASS evidence.
- Script location — resolve in THIS order, stop at first hit:
- Test path stated in project rule docs (
CLAUDE.md,CLAUDE.local.md,AGENTS.md…) — e.g. hnote →tools/test/. - Existing test dir auto-detect:
tests/→test/→tools/test/→spec/→__tests__/, cross-checked with framework config (phpunit.xmltestsuite dir,package.jsontest script,pytest.ini/pyproject.tomltestpaths). - Neither exists → create
<project>/test/scripts/.
- Test path stated in project rule docs (
- The resolved script dir affects scripts ONLY — the result report stays in
<project>/test/(step 4) regardless. - Isolate class dependencies: include only the needed enum/util files instead of full bootstrap when the framework bootstrap requires env constants.
- Run changed-unit focused tests first.
- Choose exactly one full-suite owner when broader regression coverage is warranted: the project's official build/release command if it already runs the suite, otherwise the direct full-suite command. Never run a full suite and then a wrapper that repeats it.
- During iterative edits, rerun affected focused tests. Run the full-suite owner once on the final stable change, unless the code changed after that gate.
- For a small isolated change, focused tests can be sufficient when project rules do not require a full gate. Record the omitted full suite as uncovered risk.
- If an unchanged test fails, rerun it once. Mark it
BASELINE_FAILonly when pre-change or HEAD evidence proves the same failure. Do not repeatedly run a known baseline failure after every edit; include it once in the final gate. - Capture per-case PASS/FAIL and actual values. Never fake a result. A local unit case that
could not run is
SKIPwith the reason. - Distinguish product failures from import/bootstrap/assertion-tooling failures before retrying. An unexecuted assertion is SKIP, even if the runner exited successfully.
4. Report — <project>/test/
- Write
<project>/test/UNITTEST_<YYYYMMDD>_<topic>.md(createtest/if absent). - Written in the user's language, dyslexia-friendly (one sentence per line, short paragraphs).
Sections (Korean heading / English heading — use one set, matching the report language):
- 요약 / Summary — one-line conclusion plus
<!-- UNIT_COUNTS PASS=<n> FAIL=<n> SKIP=<n> --> - 대상 / Scope — changed files and functions (file:line)
- 케이스 표 / Case table —
| type | # | angle | input | expected | actual | verdict |, with oneUNITrow per counted case - 실패 상세 / Failures — reproduction command and cause, failed cases only
- 미커버 위험 / Uncovered risk — areas skipped (DB needed, etc.) and why
- 환경 / Environment — runtime version, commands run once, full-suite owner, date
- 요약 / Summary — one-line conclusion plus
STATIC,BUILD, andBASELINE_FAILresults are supporting checks; report them separately and never add them toUNIT_COUNTS.INTEGRATION,RUNTIME, andPERFORMANCEresults do not belong in a unit-test report.- Use explicit representations for empty values (
[],null,""); leave no case field blank. SKIP's actual field states why it did not run. PASS/FAIL actual fields must contain an observed value, error, or state, never a pending/not-run placeholder. - Before finishing, run
python3 <skill>/scripts/validate_report.py <report>and fix any count mismatch, missing case evidence, or forbidden external-check row. Validator success proves report consistency only; execution evidence comes from the run. - Append only when the objective and changed unit are the same and the resulting file stays at or below 300 lines. Append at the true EOF, never at a repeated text anchor.
- For a materially different subtask or a report over 300 lines, use a more specific new topic filename instead of growing the old report.
- The report file stays; whether to commit it is the user's call (never auto-commit project repos).
5. Cleanup
- Keep meaningful regression tests in the existing test suite when the approved change introduces or fixes behavior; record their path and the defect each one prevents.
- Delete task-only test scripts, probes, and fixtures after use when no durable coverage remains. Inspect exact task-owned paths first; preserve user files and permanent tests.
- If project rules explicitly require temporary tests only (e.g. hnote), follow that scope and record why no regression test remains. A request to keep tests takes priority.
- Report failures honestly in chat: FAIL count first, then the report path.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

