Agent skill

PR Watch Fix

by nvuillam in nvuillam/npm-groovy-lint

Watch the GitHub PR for the current branch, wait for CI to finish, and autonomously fix failing jobs by reading logs, editing sources, and pushing.

MITAuto-check: notesDevelopment

Install PR Watch Fix

skills CLI
$ npx skills add nvuillam/npm-groovy-lint --skill pr-watch-fix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nvuillam/npm-groovy-lint pr-watch-fix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nvuillam/npm-groovy-lint.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pr-watch-fix .claude/skills/pr-watch-fix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-watch-fix
GitHub stars
248
Used in
1 other repo
Token cost
~1.8k tokens
SKILL.md length
866 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Watch the GitHub PR for the current branch, wait for CI to finish, and autonomously fix failing jobs by reading logs, editing sources, and pushing.

  • Works in 7 steps: Stop any prior PR-watch Monitor → Find the PR → Collect CI state (delegate to pr-watch) → …
  • Development work in your project
  • SKILL.md covers Loop, Reporting and Safety
  • Calls jq, npm and gh

What it does

PR Watch Fix is an agent skill from nvuillam/npm-groovy-lint. Watch the GitHub PR for the current branch, wait for CI to finish, and autonomously fix failing jobs by reading logs, editing sources, and pushing. Stops cleanly when stuck.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with GitHub. The repository describes itself as: Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files using command line. The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/pr-watch-fix”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Grep, Glob, Edit, Write, AskUserQuestion, Agent

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Stop any prior PR-watch Monitor
  2. Find the PR
  3. Collect CI state (delegate to pr-watch)
  4. Act on the state
  5. Wait for running jobs
  6. Fix the failures (delegate to pr-fix)
  7. Loop

What it can do on your machine

Read from SKILL.md and the folder at commit 2080dff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Grep
    • Glob
    • Edit
    • Write
    • AskUserQuestion
    • Agent

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq
    • npm
    • gh
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR Watch Fix loads about 1.8k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 866 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Grep, Glob, Edit, Write, AskUserQuestion, Agent

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nvuillam/npm-groovy-lint at commit 2080dff, republished under its MIT licence (© nvuillam). 866 words, ~1,807 tokens.

Download SKILL.mdSave it as .claude/skills/pr-watch-fix/SKILL.md (or your agent's skills folder).
name
pr-watch-fix
description
Watch the GitHub PR for the current branch, wait for CI to finish, and autonomously fix failing jobs by reading logs, editing sources, and pushing. Stops cleanly when stuck.
allowed-tools
Bash, Read, Grep, Glob, Edit, Write, AskUserQuestion, Agent
user-invocable
true
model
sonnet

Watch the open PR for the current branch, wait for CI, and fix failures.

You are the orchestrator. You run on Sonnet and stay light: you coordinate, wait, ask the user when needed, and report. You delegate the two heavy parts to subagents (this is what keeps token usage down):

  • Collecting PR state and failing logs -> the pr-watch agent (Haiku). Cheap, mechanical gh/jq/log work. Spawn it via the Agent tool each time you need a fresh snapshot.
  • Analyzing and fixing failures -> the pr-fix agent (Opus). It diagnoses, edits sources, validates, commits and pushes. Spawn it via the Agent tool when there are failures.

The waiting between cycles uses a persistent Monitor (cheap bash polling, no model cost). Interactive questions to the user happen here in the orchestrator, because a subagent cannot talk back to the user - pr-fix returns a NEEDS-USER-INPUT block and you turn that into an AskUserQuestion.

Loop

Repeat until the PR is fully green or you stop intentionally.

0. Stop any prior PR-watch Monitor

Re-invoking /pr-watch-fix always wins. Use TaskList to find Monitors whose description starts with PR watch: and call TaskStop on each. Do not stop tasks that don't start with this prefix - they belong to other work.

1. Find the PR
bash
BRANCH="$(git branch --show-current)"
PR_JSON="$(gh pr list --head "$BRANCH" --state open --json number,url,headRefOid --limit 1)"
PR_NUMBER="$(printf '%s' "$PR_JSON" | jq -r '.[0].number // empty')"

If PR_NUMBER is empty -> STOP. Tell the user there is no open PR for the branch. Save the PR URL and headRefOid.

2. Collect CI state (delegate to pr-watch)

Spawn the pr-watch agent (Haiku) via the Agent tool, passing the PR number and branch. It returns a structured snapshot: state (green / failures / running / no-pr), the still-running count, and for each failure the job, workflow, errorType, and key log lines.

Trust its state, but remember the rule it encodes: "done" requires BOTH zero pending checks AND zero still-running runs for the current HEAD SHA (a fresh run can lag 30-90s before registering as a check).

3. Act on the state
  • green -> STOP. Report success and the PR URL.
  • failures -> go to step 5 (fix).
  • running -> go to step 4 (wait).
4. Wait for running jobs

Poll every 5 minutes, fixed interval, no backoff - the user wants a 5-minute cadence so failures surface fast. Use a persistent Monitor with a description starting with PR watch: so step 0 of a future invocation can find and stop it. The Monitor does plain gh/jq polling (no model) and emits only on state changes (new failures or completion), not every 5 minutes.

Monitor:
  description: "PR watch: PR #576 CI"
  persistent: true
  command: |
    while true; do
      checks="$(gh pr checks 576 --json name,bucket 2>/dev/null || echo '[]')"
      runs="$(gh run list --branch BRANCH --limit 30 --json status,conclusion,name 2>/dev/null || echo '[]')"

      counts="$(jq -r '[.[] | .bucket] | group_by(.) | map("\(.[0])=\(length)") | join(" ")' <<<"$checks")"
      pending_checks="$(jq -r '[.[] | select(.bucket=="pending")] | length' <<<"$checks")"
      pending_runs="$(jq -r '[.[] | select(.status=="in_progress" or .status=="queued" or .status=="requested" or .status=="waiting" or .status=="pending")] | length' <<<"$runs")"
      fail_now="$(jq -r '[.[] | select(.bucket=="fail" or .bucket=="cancel") | .name] | sort | join(",")' <<<"$checks")"

      if [ -n "$fail_now" ] && [ "$fail_now" != "${prev_fail:-}" ]; then
        echo "[failures] $fail_now ($counts)"
        prev_fail="$fail_now"
      fi

      if [ "$pending_checks" = "0" ] && [ "$pending_runs" = "0" ]; then
        echo "[final] checks: $counts | runs: 0 in-progress"
        break
      fi
      sleep 300
    done

Replace BRANCH and the PR number when instantiating. When the Monitor wakes you (state change or completion), go back to step 2 and re-collect with pr-watch.

If the same check has been pending more than 30 minutes without a state change, the Monitor must emit a [stalled] event and you should ask the user whether to keep waiting. (The test matrix is large - node x java x OS, with each leg installing a JDK and running CodeNarc; the Windows legs especially can take 10-15 min, and MegaLinter a few more. Don't panic early.) Do not poll faster than 5 minutes.

Show full SKILL.md (364 more words)Show less
5. Fix the failures (delegate to pr-fix)

Spawn the pr-fix agent (Opus) via the Agent tool. Pass it the branch, PR number, current HEAD SHA, and the failure list from pr-watch (job names, error types, key log lines). pr-fix owns the diagnosis, the fix, local validation (npm test / npm run lint:fix / npm run dev:pre-commit), and the commit + push (including the Mega-Linter --force-with-lease reconcile and all the git-safety rules).

pr-fix returns one of:

  • A fix report (job fixed, root cause, files changed, new HEAD SHA pushed) -> note the new SHA, sleep ~60s for GitHub to register new runs, then go back to step 2.
  • A NEEDS-USER-INPUT block (ambiguous cause, likely flake, fork-PR error, generated-artifact edit, non-bot commits on origin, more than 3 cycles without progress) -> do not loop. Turn it into an AskUserQuestion: show the failing job, the key error line, the agent's hypothesis, and offer its 2-3 options plus "stop and let me investigate". Wait for the user.
6. Loop

Go back to step 1. The loop ends when:

  • All checks pass -> success report.
  • You asked the user a question (loop pauses until they answer).
  • pr-fix reported it hit the 3-cycle cap without progress -> ask before continuing.
  • The user interrupts.

Reporting

Each time you wake from a poll or finish a fix cycle, give the user one short line:

Cycle 2: Test (windows-latest, 22, 11) failed (assertion in test/format.test.js:42), pushed e0a44f1. Waiting 5m.

Do not paste full job logs into the conversation. Summarize and link to the run.

Safety

The detailed git-safety rules live in the pr-fix agent (it owns commit/push). As orchestrator, hold these invariants:

  • git push is the only network-mutating action - never push to main/master.
  • Force-push is authorized in exactly one case: rebasing onto a landed [Mega-Linter] Apply linters fixes commit, with --force-with-lease. Any other force-push needs explicit user permission - if pr-fix reports it needs one, ask the user.
  • If gh is not authenticated or the repo isn't a GitHub repo, STOP and tell the user.
  • Never edit generated files (the docs/ mirror, built config, and the CodeNarc server jar are regenerated by npm run dev:pre-commit), use npm not yarn (CI runs npm ci and package-lock.json is the source of truth). pr-fix enforces these; if it reports a violation it could not avoid, stop and ask.

© nvuillam, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/pr-watch-fix of nvuillam/npm-groovy-lint.

Open the folder on GitHubat commit 2080dff

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in nvuillam/npm-groovy-lint, which our catalogue first saw on October 7, 2026.

Compare with similar skills

PR Watch Fix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR Watch Fix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Watch Fix this skillnvuillam/npm-groovy-lint2481 repos~1.8kAutomated safety check: NotesMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Setup Matt Pocock Skillsbestofjs/bestofjs3.1k20 repos~1.7kAutomated safety check: PassMIT
Summarise Ecosystem Resultsastral-sh/ruff50k1 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Setup Matt Pocock Skills

    bestofjs/bestofjs

    Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout.

    3.1k GitHub starsUsed in 20 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "summarise ecosystem results", "summarize this ty ecosystem report", "what changed in this ecosystem run?", or asks to summarise or summarize ty ecosystem…

    50k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed

More from nvuillam/npm-groovy-lint

  • Megalinter Check

    nvuillam/npm-groovy-lint

    Collect MegaLinter lint errors for the current repository. An agent skill from nvuillam/npm-groovy-lint.

    248 GitHub starsUsed in 1 repo~3.9k tokens
    Auto-check: notes
  • Megalinter Setup

    nvuillam/npm-groovy-lint

    Install or upgrade MegaLinter on a repository. An agent skill from nvuillam/npm-groovy-lint.

    248 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check: notes
  • Megalinter

    nvuillam/npm-groovy-lint

    Entry point for everything MegaLinter. An agent skill from nvuillam/npm-groovy-lint.

    248 GitHub starsUsed in 1 repo~915 tokens
    Auto-check: notes
  • Upgrade Java Deps

    nvuillam/npm-groovy-lint

    Upgrade CodeNarc and the bundled Java dependencies (jackson, logback, slf4j, janino, GMetrics, Groovy libs) that ship inside lib/java/, rebuild the deterministic CodeNarcServer.jar, and verify…

    248 GitHub stars~1.9k tokensUpdated 5 days ago
    Auto-check: notes
  • Megalinter Fix

    nvuillam/npm-groovy-lint

    Fix the errors reported by MegaLinter. An agent skill from nvuillam/npm-groovy-lint.

    248 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check: notes

Works with

Categories

Questions about PR Watch Fix

What does PR Watch Fix do?

Watch the GitHub PR for the current branch, wait for CI to finish, and autonomously fix failing jobs by reading logs, editing sources, and pushing. PR Watch Fix is an agent skill from nvuillam/npm-groovy-lint. Watch the GitHub PR for the current branch, wait for CI to finish, and autonomously fix failing jobs by reading logs, editing sources, and pushing.

When should I use PR Watch Fix?

PR Watch Fix fits situations like: development work in your project.

How do I install PR Watch Fix in Claude Code?

Run `npx skills add nvuillam/npm-groovy-lint --skill pr-watch-fix -a claude-code`. Or copy the skill folder (.claude/skills/pr-watch-fix in nvuillam/npm-groovy-lint) into .claude/skills/pr-watch-fix in your project. Claude Code loads it when a task matches its description.

How do I install PR Watch Fix in Codex?

Run `npx skills add nvuillam/npm-groovy-lint --skill pr-watch-fix -a codex`. Or copy the skill folder (.claude/skills/pr-watch-fix in nvuillam/npm-groovy-lint) into .agents/skills/pr-watch-fix in your project. Codex loads it when a task matches its description.

Can I use PR Watch Fix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nvuillam/npm-groovy-lint --skill pr-watch-fix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-watch-fix, .gemini/skills/pr-watch-fix, .github/skills/pr-watch-fix and .opencode/skills/pr-watch-fix in your project.

What does PR Watch Fix need to run?

Going by SKILL.md and its folder, PR Watch Fix needs the command-line tools its instructions call (jq, npm, gh and git). Its frontmatter pre-approves these tools: Bash, Read, Grep, Glob, Edit, Write, AskUserQuestion, Agent.

Does PR Watch Fix access the network?

SKILL.md contains no URLs. Its commands use npm, gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR Watch Fix safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does PR Watch Fix use?

PR Watch Fix is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Watch Fix use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR Watch Fix?

Skills that share tags, products or a category with PR Watch Fix: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Greploop (onyx-dot-app/onyx, 32k stars), Check PR (onyx-dot-app/onyx, 32k stars) and Setup Matt Pocock Skills (bestofjs/bestofjs, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Watch Fix?

nvuillam (a GitHub user) maintains it in nvuillam/npm-groovy-lint, which has 248 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 4, 2026.

Source: nvuillam/npm-groovy-lint on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.