plugin/skills/run-tests/SKILL.md
Use this skill when verifying code by running tests, analyzing failures, or addressing coverage gaps — to run the test suite, analyze failures, auto-fix obvious issues, and re-run; serves as a sub-workflow for /develop, /bugfix, and /pre-commit and uses the `test-strategy` skill.
npx skillsauth add avav25/ai-assets run-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute the project's test suite, analyze failures, attempt fixes, and re-run. Designed as a reusable sub-workflow called by /develop, /bugfix, and /pre-commit.
Uses test-strategy skill for test writing patterns and coverage targets.
Read TESTING.md (if exists) for test commands, infrastructure, and credentials. Fall back to CLAUDE.md and project config to determine:
| Signal | Stack | Runner |
|---|---|---|
| package.json + vitest/jest | TypeScript/JS | npx vitest run / npx jest |
| pom.xml / build.gradle | Java | mvn test -q / gradle test |
| pyproject.toml / pytest.ini | Python | pytest -x -q |
| go.mod | Go | go test ./... |
| *.csproj | .NET | dotnet test |
Execute the test suite:
// turbo
<test-command>
Capture:
Test runner stdout > 2000 tokens is normalized by the tool-output-normalize.py hook (G2) before injection back into context — large failure dumps get summarized envelope metadata + extracted top-k failures rather than raw dump. This protects context budget on noisy suites.
If tests fail, for each failure:
| Classification | Action | |---|---| | Code bug — test is correct, implementation is wrong | Fix the implementation (Step 4) | | Test bug — test is wrong or outdated | Fix the test (Step 4) | | Environment issue — missing dependency, port conflict, DB down | Report to user (Step 5) | | Flaky test — passes on re-run without changes | Flag for investigation |
For auto-fixable failures:
Agent(frontend-engineer), Agent(java-engineer), Agent(python-engineer), etc.)| Stack | Run Single Test |
|---|---|
| Vitest | npx vitest run <test-file> |
| Jest | npx jest <test-file> |
| pytest | pytest <test-file>::<test-name> -v |
| JUnit/Maven | mvn test -pl <module> -Dtest=<TestClass>#<method> |
| Go | go test -run <TestName> ./path/... |
Run coverage report:
| Stack | Command |
|---|---|
| Vitest | npx vitest run --coverage |
| Jest | npx jest --coverage |
| pytest | pytest --cov=<package> --cov-report=term-missing |
| Go | go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.out |
| JUnit | mvn jacoco:report |
Compare against test-strategy skill targets:
## Test Results
| Metric | Value |
|--------|-------|
| Total tests | X |
| Passed | X |
| Failed | X |
| Skipped | X |
| Duration | Xs |
| Coverage | X% (target: 80%) |
### Failures Fixed
- [test name] — [what was wrong] — [fix applied]
### Remaining Failures (needs attention)
- [test name] — [error] — [classification]
### Coverage Gaps
- [file/module] — [current%] — [uncovered lines]
**Overall**: ✅ PASS / ❌ FAIL — [action needed]
/develop, /bugfix, /pre-committest-strategy skillAgent(qa-engineer) (test strategy), stack-specific role (implementation)tool-output-normalize.py (G2 normalization for test runner stdout per Step 2)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.