tester
БесплатноЗапускает вложенные скриптыНе проверенWrites high-signal tests and plans test strategy: a regression test for a bug fix verified failing-then-passing, the priority edge cases of a behaviour…
от crewrig★ 24 звезды на GitHubОб этом скилле
Tester
Tests exist to catch regressions and to document behavior, not to inflate a coverage number. Bias toward fewer, sharper tests.
When to activate
- A feature is being added and the project's convention requires tests.
- A bug fix lacks a regression test.
- The user asks for a test plan or edge-case enumeration.
- A diff is up for review and you suspect under-tested behavior.
If the project has no test infrastructure and the user has not asked for one, do not invent one — say so and move on.
Operating mode
1. Identify the unit of behavior
Pick the smallest observable behavior to test, not the smallest function. A function with no observable contract has nothing to test. A file-level helper called only from one place is best tested through the caller.
2. Golden path + edge cases (not exhaustively)
For each behavior, plan:
- One golden-path test that exercises the success case.
- One or two edge-case tests for the failure modes that matter.
- A regression test if the test was triggered by a bug fix — named so it is obvious which bug it guards.
Edge cases to consider, in this order of priority:
- Empty / null / zero-length input.
- Boundary values (off-by-one, overflow, encoding edges).
- Known-bad input (malformed, adversarial — see security skill).
- Concurrent / repeated invocations if the surface is stateful.
- Partial failure (network mid-call, disk full, signal interrupt).
Stop adding cases when the marginal case becomes contrived. Coverage of contrived cases costs maintenance forever.
3. Real dependencies where it matters
For integration tests:
- Hit a real database when the project's convention is integration testing (use Testcontainers, Docker Compose, or the project's scaffold). Mocked DB tests have a known failure mode where they pass while the real schema is broken.
- Mock an external API only when its calls are non-deterministic, slow, or rate-limited. Otherwise prefer a recorded fixture (VCR-style).
If the project has explicit guidance ("don't mock the database"), follow it without rediscovering the lesson.
4. Test naming and structure
Name tests by behavior, not by function:
✓ test_login_with_valid_credentials_returns_session_token
✗ test_login_function
Structure each test as arrange / act / assert, with a blank line between each phase. Multi-assertion tests are fine when the assertions together describe one behavior; split when they describe two.
5. Verifying a fix
When the trigger is a bug fix:
- Write the test first. Run it. Confirm it fails for the right reason — not a setup error.
- Apply the fix.
- Run the test. Confirm it passes.
- Run the rest of the suite to detect regressions in unrelated areas.
A test that never failed before the fix proves nothing.
6. Tool availability is empirical, not assumed
A test skipped because a tool, binary, subcommand or service is "unavailable" is only as good as the check behind it: CLIs evolve faster than anyone's memory of them, so a skip rationale resting on a guess gets the test attempted again later at the user's expense.
Before declaring the skip, run the probe:
node scripts/probe-tool.ts <tool> [<subcommand>] [--timeout <seconds>] [--json]
It runs the tool's help flag, then its version flag, directly and not
through a shell, and looks the tool up on PATH as a precursor only
(a binary on PATH can still lack the subcommand you need).
| Exit | Meaning | What to do |
|---|---|---|
0 |
A probe exited 0: the tool answers. |
Write the test. Do not skip. |
1 |
No probe succeeded. The finding quotes each command, its exit code or command not found or timed out, and the first line of stderr. |
Run one minimal real invocation with throwaway input, since a tool can exist and still exit non-zero on its help flag. If that fails too, quote the finding and that invocation in the skip rationale. |
2 |
Usage error. | Fix the command line. |
3 |
PATH is not set. |
Set it, or give the tool as a path. |
These are not grounds for a skip: "I do not recognise this subcommand",
"the documentation I have seen does not mention it", or "the previous
attempt in this session failed". None is a probe, and the environment
may have changed (PATH, login shell, credentials) since.
A skip without a quoted failure forces the test to be attempted again.
Output expectations
- Tests committed alongside the change they cover, never in a separate PR (unless the project explicitly batches test PRs).
- A one-line comment above each test stating the why — the behavior being asserted — only when the test name alone is not self-evident.
- Test data inline when small; in fixtures when reused or large.
Findings from a review loop
When you are re-spawned to act on the findings of a review, act only on
the findings tagged class: tech that touch the test surface. Return a
finding with no tag to the orchestrator as a pr
Установить tester в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл tester?
Writes high-signal tests and plans test strategy: a regression test for a bug fix verified failing-then-passing, the priority edge cases of a behaviour, integration tests against real dependencies, and the check that a tool is really unavailable before a test is skipped. Use when asked to write tests, add a regression test, plan a test strategy, enumerate edge cases, review whether a change has adequate coverage, or decide whether to skip a test for a missing tool. Not for web end-to-end tests with Playwright or RobotFramework or accessibility scans (a project that needs them supplies its own web testing components), for fixing the code under test (developer), or for reviewing a pull request (pr-reviewer).
Как установить скилл tester?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tester запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic