test-scope
Skill16 starsChanged 3 days agoApache-2.0View on GitHub
Detect affected scopes from git changes and run their tests in dependency order. Use when user says 'run tests', 'test my changes', 'check what broke', 'verify scopes', 'test affected packages', or 'make sure tests pass'. Supports explicit scope names or auto-detection from git diff. Reports PASS/FAIL per scope. Do NOT use for linting or formatting (use /lint), full PR preparation (use /create-pr), or debugging test failures (use /debug-agent or /debug-pipeline).
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Run tests only for scopes affected by current changes.
- Very specific: line 26
If $ARGUMENTS specifies scope names (e.g., packages/api packages/agent), use those directly.
- Distinctive: line 28
Run git diff --name-only HEAD to list staged + unstaged changed files
- Distinctive: line 38
Add downstream scopes that depend on any changed scope:
- Distinctive: line 77
"No changes detected": Ensure you have uncommitted changes.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Smart Scoped Test Runner
Run tests only for scopes affected by current changes. Scope names can be provided via $ARGUMENTS or auto-detected
from git diff.
Scope Dependency Graph
packages/core ──→ packages/agent ──→ packages/process
│ │
├──→ packages/api ┘
├──→ packages/bot
├──→ packages/sysadmin-api
├──→ packages/backup
└──→ packages/pipelineStep 1: Detect Affected Scopes
If $ARGUMENTS specifies scope names (e.g., packages/api packages/agent), use those directly. Otherwise auto-detect:
- Run
git diff --name-only HEADto list staged + unstaged changed files - Map each changed file to its scope by extracting the first path component
- Valid scopes:
packages/core,packages/agent,packages/api,packages/bot,packages/pipeline,packages/process,packages/sysadmin-api,packages/backup,packages/web,packages/sysadmin-web - Ignore files not in a valid scope (e.g., root configs, docs)
Expected output: A list like Detected affected scopes: packages/core, packages/api
Step 2: Expand Downstream Dependencies
Add downstream scopes that depend on any changed scope:
packages/corechanged → add ALL other scopes (it is the foundation)packages/agentchanged → also addpackages/process(process depends on agent)
Step 3: Run Tests in Dependency Order
Execute make test in each affected scope's directory, following this order:
packages/core(foundation — test first)packages/agentpackages/pipelinepackages/process(depends on agent)packages/apipackages/botpackages/sysadmin-api,packages/backuppackages/web/packages/sysadmin-web— runmake -C <scope> pr-ready(ESLint, no pytest for frontend)
Skip scopes not in the affected set. If a scope fails, continue running remaining scopes to collect all failures.
Step 4: Report Results
Produce a summary table:
| Scope | Status | Details |
| packages/core | PASS | 42 tests passed |
| packages/api | FAIL | 2 failures in test_auth.py |
| packages/web | SKIP | Not affected |
Examples
/test-scope— Auto-detect from git diff and run all affected/test-scope packages/api— Run tests only for packages/api/test-scope packages/core— Run tests for packages/core AND all downstream scopes/test-scope packages/agent packages/api— Run tests for both specified scopes
Troubleshooting
- "No changes detected": Ensure you have uncommitted changes. Run
git statusto verify. - "make test fails with ModuleNotFoundError": Dependencies may not be installed. Run
uv sync --all-packagesfrom the workspace root. - Root
make testruns every Python scope pluscheck-env; this skill runs only the affected scopes viamake -C <scope> test. - Agent/API tests that need NATS or the API require the Docker dev stack, and no locally running agent of the same class (it shares the test runner's queue group and eats its events).
- Frontend scopes:
packages/webandpackages/sysadmin-webhave no tests —make -C <scope> pr-readyruns ESLint instead.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- GlitterKill/sdl-mcp★ 492same name
- nikhilw/structured-agentic-workflow★ 6same name
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 repository50 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- .github/actions/CLAUDE.mdCLAUDE.md
- arc42Skill
- audit-frontendSkill
- bot-frameworkSkill
- create-or-audit-claude-mdSkill
- create-or-audit-skillSkill
- create-or-audit-subagentSkill
- create-prSkill
- dagster-pipelinesSkill
- debug-agentSkill
- debug-frontendSkill
- debug-pipelineSkill
- design-systemSkill
- docker-devSkill
- document-decisionSkill
- document-featureSkill
- explainSkill
- generate-sdkSkill
- i18nSkill
- implement-feedback-from-prSkill
- likec4-dslSkill
- lintSkill
- merge-mainSkill
- nats-eventsSkill
- plan-issueSkill
- pr-demo-videoSkill
- primevue-lookupSkill
- rclone-guideSkill
- reflectSkill
- review-diffSkill
- scaffold-agentSkill
- scaffold-api-endpointSkill
- scaffold-api-repositorySkill
- scaffold-api-serviceSkill
- scaffold-bot-handlerSkill
- scaffold-composableSkill
- scaffold-event-displaySkill
- scaffold-frontend-componentSkill
- scaffold-frontend-pageSkill
- scaffold-frontend-subpageSkill
- scaffold-pipelineSkill
- setup-bot-connectionSkill
- splice-issueSkill
- sync-agent-docsSkill
- update-docSkill
- verify-sdk-syncSkill
- write-docSkill
- write-issueSkill
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.

