MCPInstall

grinding-until-pass

Keep iterating on code changes until the tests pass, the build succeeds, or linting is clean. Runs in a tight loop of fix → run → check → repeat. Use when you want the agent to autonomously grind through test failures or build errors.

Installs
551
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill grinding-until-pass
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads grinding-until-pass automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Grind Until Pass

Use this skill when you want the agent to keep working autonomously until a specific goal is met — all tests pass, the build succeeds, or linting is clean. Instead of stopping after one attempt, the agent loops until done.

Steps

  1. Define the goal command — the command whose exit code determines success:

    • Tests: npm test or npx vitest run
    • Build: npm run build
    • Lint: npm run lint
    • Type-check: npx tsc --noEmit
    • All of the above: npm run lint && npx tsc --noEmit && npm test && npm run build
  2. Run the command — execute it and capture the output.

  3. If it fails — analyze and fix:

    • Read the error output carefully.
    • Identify the root cause: failing test assertion, type error, lint violation, import error, etc.
    • Make the minimal fix. Don't refactor — just fix the error.
    • Go back to step 2.
  4. If it passes — stop and report:

    • Report what was fixed and how many iterations it took.
    • Summarize the changes made.

Rules for the Loop

  • Maximum 10 iterations — if after 10 attempts the command still fails, stop and report what's blocking progress. Something fundamental is wrong and needs human input.
  • Fix one thing at a time — don't try to fix all errors at once. Fix the first error, re-run, and see if the fix resolves downstream errors too.
  • Don't delete tests — if a test is failing, fix the code to make it pass. Don't modify the test unless the test itself is clearly wrong (testing old behavior that was intentionally changed).
  • Don't suppress errors — don't add @ts-ignore, eslint-disable, or any types to silence errors. Fix the actual problem.
  • Track progress — if the number of errors is increasing instead of decreasing, stop and reassess the approach.

When to Use This

  • After a large refactor that broke multiple tests
  • After upgrading a dependency that introduced type errors
  • After merging a branch with conflicts that need resolution
  • When you want to "just make it green" and trust the agent to grind through it

Advanced: Cursor Hooks Integration

You can automate this with a Cursor hook in .cursor/hooks.json that triggers after the agent's turn ends, checks if tests pass, and sends a follow-up message if they don't:

{
  "hooks": [
    {
      "event": "stop",
      "command": "bash .cursor/scripts/check-tests.sh",
      "description": "Re-run tests after agent stops and send follow-up if failing"
    }
  ]
}

The script checks the exit code and returns a followup_message if tests are still failing.

Notes

  • This works best with fast test suites. If your tests take 5+ minutes, the loop will be slow.
  • Use --bail or --fail-fast flags to stop at the first failure for faster iteration.
  • The agent will be thorough but not creative — if the fix requires a design change, it'll need human guidance.

FAQ

What does the grinding-until-pass skill do?

Keep iterating on code changes until the tests pass, the build succeeds, or linting is clean. Runs in a tight loop of fix → run → check → repeat. Use when you want the agent to autonomously grind through test failures or build errors.

How do I install grinding-until-pass?

Run npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill grinding-until-pass in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/grinding-until-pass/ (personal) or .claude/skills/grinding-until-pass/ (project).

Which AI agents can use grinding-until-pass?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is grinding-until-pass safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains grinding-until-pass?

It is published by spencerpauly in spencerpauly/awesome-cursor-skills. It has 551 recorded installs.

More from spencerpauly/awesome-cursor-skills

View all →

visual-qa-testing

spencerpauly/awesome-cursor-skills

Visually QA a web application by launching it in Cursor's built-in browser, taking screenshots, checking console errors, and auditing network requests. Use after making UI changes to verify they look correct.

Testing & QA648 installs

auditing-security

spencerpauly/awesome-cursor-skills

Perform a systematic security audit of a codebase, checking for OWASP Top 10 vulnerabilities, secrets exposure, and insecure patterns.

Security598 installs

responsive-testing

spencerpauly/awesome-cursor-skills

Open the app in Cursor's browser at multiple viewport sizes, screenshot each, and report any layout breakage.

Testing & QA569 installs

suggesting-cursor-rules

spencerpauly/awesome-cursor-skills

When the user repeats the same correction or convention multiple times, suggest a Cursor rule to encode it permanently.

559 installs

systematic-debugging

spencerpauly/awesome-cursor-skills

Structured debugging methodology — reproduce, isolate, hypothesize, verify. Covers git bisect, binary search, logging, and minimal reproduction.

verifying-in-browser

spencerpauly/awesome-cursor-skills

After making code changes, start the dev server, open the app in Cursor's built-in browser, and verify everything works — check rendering, console errors, and network health. Use proactively after any UI or API change.

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs