test-loop — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited test-loop (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
The core insight: if the agent is going in circles, it needs a test — not more prompts. Write the test. Let the agent iterate against it. Walk away.
Every project should have a testing.md at the root (or in relevant submodule folders) containing EVERYTHING the agent needs to run tests autonomously:
# Testing Guide
## Environment Setup
- Required env vars: [list with descriptions]
- Database: [commands to start/seed test DB]
- Services: [docker-compose, external APIs]
- Test user: [how to create/seed test data]
## Running Tests
### Unit Tests
Command: `npm test`
Location: `tests/unit/`
### Integration Tests
Command: `npm run test:integration`
Env vars needed: [list]
What they test: [scope description]
### E2E Tests (Playwright)
Command: `npx playwright test`
Setup: `npx playwright install chromium`
Base URL: [how it's configured]
Auth: [how test auth works]
Location: `tests/e2e/`
## Debugging Failed Tests
- Single test: `npm test -- -t "test name"`
- Headed browser: `npx playwright test --headed`
- Traces: `npx playwright show-trace test-results/*/trace.zip`
- Verbose: `npm test -- --verbose`Create this file FIRST if it doesn't exist. The agent cannot iterate autonomously without it.
1. Read testing.md
2. Set up the test environment (DB, env vars, services)
3. Ensure screenshot capture is enabled:
- Verify playwright.config.ts has screenshot: 'on'
- Verify video: 'retain-on-failure' is set
- Verify trace: 'on-first-retry' is set
4. Run the relevant test suite
5. If tests fail:
a. Analyze failure output carefully (Phase 1 of /debug)
b. Check screenshot/trace artifacts in test-results/:
- Screenshots: what does the page look like at the failure point?
- Trace: open with `npx playwright show-trace` for DOM + network + console
- Diff images (*-diff.png): for visual regression failures, what changed?
c. Form hypothesis about root cause
d. Fix the code (using /tdd — failing test → fix → verify)
e. Run tests again
f. Repeat until ALL tests pass
6. If tests pass:
a. Run visual regression suite if project uses toHaveScreenshot():
npx playwright test --grep @visual --repeat-each=3
b. Run full suite MULTIPLE TIMES to catch flakiness
c. Use /verify-done before claiming success # E2E stability check
npx playwright test --repeat-each=3 --reporter=line
# Unit/integration stability
for i in 1 2 3; do npm test; done console.log('[DEBUG] State before action:', JSON.stringify(state));
console.log('[DEBUG] API response:', JSON.stringify(response));
console.log('[DEBUG] Element visible:', await element.isVisible());Run with logs → analyze output → THEN fix. Remove debug logs after.
When adding a new API, agent, service, or integration:
/e2e-playwright)This entire cycle can run without human intervention if testing.md and the plan are well-specified.
When a bug is found (manually or reported):
This test permanently prevents the bug from returning.
When test output alone isn't enough to diagnose a failure, use artifacts:
# Re-run failing test with full capture
npx playwright test tests/e2e/failing.spec.ts --trace on --screenshot on --video on
# View the trace (richest artifact — DOM snapshots, network, console)
npx playwright show-trace test-results/failing-chromium/trace.zip
# List all screenshots from last run
ls test-results/*/test-*.png
# List all visual regression diffs
ls test-results/*/*-diff.pngWhen a toHaveScreenshot() assertion fails, Playwright generates three images:
| File | Content |
|---|---|
*-expected.png | Committed baseline |
*-actual.png | Current render |
*-diff.png | Red overlay showing differences |
Diagnosis steps:
npx playwright test --update-snapshots → commit baselines| Situation | Action |
|---|---|
| Test fails, error message is clear | No extra capture needed |
| Test fails, unclear why element isn't visible | Check screenshot at failure point |
| Test intermittently fails | Enable trace: 'on', run with --repeat-each=10 |
| Visual regression diff is confusing | Compare trace DOM snapshots at the assertion step |
| Test fails only in CI | Download CI trace artifact, compare with local trace |
| Situation | Skill |
|---|---|
| Agent keeps going in circles | Use this — write a test, iterate against it |
| Single bug to fix | /debug → /tdd → /verify-done |
| New feature from scratch | /brainstorm-and-plan → /tdd |
| Need E2E tests written | /e2e-playwright |
| Full integration with no human | Use this — the full autonomous cycle |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.