fix-tests

A workflow that runs tests, investigates failures, applies fixes, and runs the tests again. It supports backend RSpec tests, frontend tests, browser end-to-end tests, or a specific file.

In plain words
What is it for?
Use it to repair failing Ruby RSpec, frontend, or Playwright tests, either for a whole area or for one test file.
Why use it?
It keeps the test-and-fix cycle together instead of making you run commands and diagnose every failure manually. Its loop mode can continue without asking for input.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nodealchemy/powernode-platform/fix-tests
Any agent
npx skills add nodealchemy/powernode-platform --skill fix-tests
Clone the repo
git clone --depth 1 https://github.com/nodealchemy/powernode-platform

Made for: Claude Code, Codex.

Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 681 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00681
Opus 5 $0.00008 $0.00341
Sonnet 5 $0.00003 $0.00136
Haiku 4.5 $0.00002 $0.00068

Measured yesterday against content hash a27c075b62b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fix-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/fix-tests/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fix Tests Workflow

Run the test suite for the given scope, diagnose failures, fix them, and re-run. Follow this process exactly:

Step 1: Determine Scope & Mode

Parse the argument to determine what to run:

  • backend or no argument → cd server && bundle exec rspec --format progress
  • frontendcd frontend && CI=true npm test
  • e2ecd frontend && npx playwright test
  • A specific file path → run that file directly

Loop mode (--loop): Run the full fix cycle autonomously without asking for input. Make best-judgment fixes. Suitable for headless/unattended runs via claude -p "/fix-tests backend --loop".

Step 2: Run Tests

Execute the test command and capture output. Note all failures.

Step 3: Fix Loop (max 3 attempts per failure)

For each failing test:

  1. Read the failing spec file and the source file it tests
  2. Diagnose the root cause — check for:
    • Missing factory traits (check spec/factories/ and spec/factories/ai/)
    • Wrong test helpers (use user_with_permissions, auth_headers_for, json_response)
    • Missing shared examples (spec/support/shared_examples/)
    • Missing mocks or stubs for external services
    • Stale selectors in E2E tests (prefer data-testid)
    • Import path issues (use @/shared/, @/features/)
  3. Fix the issue using Edit
  4. Re-run just the failing file to verify the fix
  5. If still failing after 3 attempts on the same test, stop and report — do not keep iterating

Step 4: TypeScript Check (frontend/e2e only)

If any TypeScript files were modified:

cd frontend && npx tsc --noEmit

Fix any type errors found (same 3-attempt limit).

Step 5: Final Run

Re-run the full suite for the original scope to confirm everything passes.

Step 6: Loop Mode Continuation (--loop only)

If --loop flag was provided and Step 5 still has failures:

  1. Return to Step 3 with the NEW set of failures (not the originals)
  2. Repeat the full cycle up to 3 total loop iterations
  3. If failures persist after 3 full loops, stop and report

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 72 lines · 0 tokens per session scan A a27c075b62b1

Subscribe to this mod's changes

fix-tests is a skill published in the GitHub repository nodealchemy/powernode-platform (2 stars, last pushed 3d ago), licensed MIT. It adds 15 tokens to every session and 681 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

good-first-issue-batch

File a batch of contributor-ready GitHub issues from the seeds backlog, re-verifying every candidate against HEAD first so no dead issue reaches a contributor. Activate for prompts like "file some good first issues", "open a batch of GFIs", "publish backlog issues to GitHub", "find contributor-ready work", or after an…

jayminwest/warren · 80 tokens

seeds-issue-audit

Audit and triage open Seeds (sd) issues — find which can be closed, auto-close high-confidence completed ones, and report borderline cases. Activate for prompts like "audit open issues", "which seeds issues can be closed", "clean up the issue tracker", "triage the seeds backlog".

jayminwest/warren · 67 tokens

os-eco-dep-sync

Bump warren onto the latest published @os-eco/ versions across package.json + bun.lock and the Dockerfile CLI pins, then run the gates and open a PR. Use when checking if warren is on the newest burrow/plot/canopy/seeds/mulch/sapling.

jayminwest/warren · 69 tokens

release

Prepare, cut, and verify a warren release — tracker audits, version bump, CHANGELOG curation, ROADMAP update, push, then watch the pipeline through to published artifacts.

jayminwest/warren · 39 tokens

warren-dogfood-pipeline

Full prioritize → dispatch → shepherd → track pipeline against the live warren instance. Audits the seeds backlog around a focus theme, dispatches the surviving issues to warren agents one at a time, babysits the resulting PRs to merge (update-branch, conflict-repair runs, auto-merge), and closes the loop in the…

jayminwest/warren · 116 tokens

canvas

Display HTML content on connected Mayros nodes (Mac app, iOS, Android).

ApiliumCode/mayros · 0 tokens