Command Palette

Search for a command to run...

Back to skills
skill № 03439

hoc-test-execution

Run a project's test cases and drive them to green without weakening them — no test skipped, deleted or loosened to make the suite pass. Use this skill…

FreeNo executable scripts
openreachtechby openreachtech★ 17 GitHub stars

Install hoc-test-execution in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Test Execution

A skill for running the test cases and resolving what they report.

The failure this skill exists to prevent is not "the tests fail". It is what usually happens next: changing the test until it stops failing. A suite that was changed until it passed reports nothing, and the next defect ships behind a green run.

Core principle: a failing test is a result, not an obstacle

The test is a statement about required behavior. When it fails, exactly one of two things is true: the behavior is wrong, or the statement is wrong. Deciding which one — with evidence — is the work. Everything else is just routine detail.

  • The default assumption is that the implementation is wrong. A test written before the implementation encodes what was required; the implementation is the newer, less-reviewed thing.
  • A test's expectation may be changed only when a written acceptance criterion says the expectation is wrong. Not because the implementation disagrees with it — the implementation disagreeing with it is the failure.
  • Making a red test green is not the goal. Learning what the red test found is the goal.

The loop

run the whole suite
      │
      ▼
any failure? ──no──▶ report the run's own summary ──▶ done
      │yes
      ▼
take ONE failure
      │
      ▼
read its actual output (message, diff, stack, the assertion that failed)
      │
      ▼
classify it  ──────▶  see references/failure-triage.md
      │
      ▼
fix the thing the classification names — never the test unless the class is "test defect"
      │
      ▼
re-run that one test ──fails──▶ back to reading the output (do NOT try a second change on top)
      │passes
      ▼
re-run the whole suite ──▶ back to the top
  • One failure at a time. Changing three things and re-running tells you nothing about which change did what, and routinely leaves two of them wrong.
  • Re-run the whole suite after every fix, not only the test that was failing. A fix that breaks two other tests is a worse state than the one it started from, and only the full run shows it.
  • Never stack a second change on a failed attempt. Revert the attempt, re-read the output, then change one thing.

Before running anything

  1. Discover how this project runs its tests. Read package.json scripts and the test configuration. Use the project's own command; do not invent one.
    • A subset runs through that same command, with the filter passed to it rather than to a runner invoked directly — <the project's test script> -- <path or pattern>. The script is not a convenience wrapper; it carries what the runner needs, and a runner started beside it starts without it.
    • An invented command does not fail by saying so. Measured: a runner invoked directly, without the flag its project's script exports, reported a file under node_modules as unloadable and offered three fixes — add a compiler, widen a configuration key, raise the platform version. All three are work on the project; none was the cause. The symptoms are an environment problem's, so triage sends the reader hunting a setup that was never broken. Confirm the command was the project's own before classifying any failure.
  2. Discover whether the project has more than one suite and whether order matters. Many projects separate tests that touch no persistent state from tests that write to a store, and require them to run in a defined order. Running them the wrong way produces failures that have nothing to do with the code.
  3. Discover what the suite needs to be present — an environment file, a database, a migration applied, a seed set loaded. A missing prerequisite produces failures that look like defects.
  4. Run the suite once before changing anything, to establish which failures were already there. A pre-existing failure attributed to the current change wastes the whole session.
  5. Size the run to the machine, not to its listed specifications. Most runners execute test files in parallel workers — one per core by default — and each worker is a full process using its own memory. That default assumes an idle machine; a real one is running an editor, a browser, a local database, and sometimes a full E2E stack, all using memory before the suite starts. Before a full run, account for what else is resident and how much memory and CPU are actually free — not how much is installed. When the machine is constrained, dial the parallelism down (the runner's max-workers lever, halved and re-run) or run serially (the runner's in-band / single- worker mode) rather than letting the operating system kill a worker — or another process — under the load. A serial run that finishes beats a parallel one that dies halfway. The concrete flags and the way to weigh workers against available memory belong to the project's test-running convention; the princip
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • references/failure-triage.md
  • references/prohibited-fixes.md

FAQ

What does the hoc-test-execution skill do?

Run a project's test cases and drive them to green without weakening them — no test skipped, deleted or loosened to make the suite pass. Use this skill whenever tests are run, whenever a test still fails after an implementation was believed finished, and before claiming an implementation is complete. Writing new tests belongs to the project's test-writing convention; reusing a recorded pass over unchanged inputs, to the test-cache convention.

How do I install the hoc-test-execution skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the hoc-test-execution skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare hoc-test-execution with