Affected tests
42 agent-discipline skills for Cursor, distilled by watching an autonomous terminal coding agent (Claude Code + Fable 5). Includes the derivation method.
npx -y skills add jcdavis131/cursor-agent-skills --skill affected-testsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Run only the tests for packages/dirs actually touched by the current change, quiet output, tailed to the last few lines. Use after any code edit where a test suite exists, instead of running the full suite every time. Also: batch independent shell commands in parallel rather than serializing them.
SKILL.md
2.6 KB, as published. Nobody here has run it
Affected Tests
Running the whole suite on every change is slow and floods context with green. Run only the affected package test dirs, quietly, tailed.
The shape
uv run --no-sync python -m pytest packages/<pkg-a>/tests packages/<pkg-b>/tests services/<svc>/tests -q 2>&1 | tail -n 6
Why each piece earns its place:
--no-sync— skip dependency resolution; tests run against the current tree.- Named package test dirs only — never the repo root. If you touched
packages/data-ingest, runpackages/data-ingest/tests, notpackages/. -q— quiet. A passing run should produce a few lines, not a wall of dots.2>&1 | tail -n 6(POSIX) or2>&1 | Select-Object -Last 6(PowerShell) — even a failing run gives you the summary + the last failures, not 500 lines of traceback. The tail is the part that actually decides pass/fail.
How to pick the affected set
- What files did you edit?
git status --shortorgit diff --name-only. - Which packages own those files? Map file path →
packages/<pkg>orservices/<svc>. - Add the test dir for each. If a change crosses a package boundary (e.g. editing a shared client used by two services), include both services' tests.
- If you edited a test fixture or conftest shared across packages, run the broader set — the cheap rule fails here.
When to run the full suite instead
- Pre-merge / pre-deploy gate.
- A change to shared infra (conftest, CI config, lockfile, base image).
- You can't map the blast radius — run wide.
Parallel independent commands (folded in)
If you have 2+ commands with no data dependency between them (independent test packages, independent builds, independent linters), dispatch them in one batch, not serially. Free wall-clock. Only serialize when command B needs command A's output.
Good: [run pkg-a tests] [run pkg-b tests] [lint] # one batch
Bad: [run pkg-a tests] → [run pkg-b tests] → [lint] # serialized for no reason
Anti-patterns
pytestwith no path args from repo root — runs everything, slow, noisy.- No
-q— context fills with dots. - No tail — a single failing test dumps the full traceback into context.
- Serial-running independent commands "to be safe" — safety isn't increased, only latency.