Logo van Pr Fix

Pr Fix

Community
ronaknnathani
pr-fix

Bring a PR to mergeable — fix CI failures, address review comments, and resolve merge conflicts. Runs either from a supplied watcher worklist (delegated mode, one pass) or from its own assessment (direct mode, looping until clear). Use after opening a PR when CI is red, reviewers have left comments, or the branch conflicts with its base.

Overzicht

Uitgeverronaknnathani
Repositoryrelay
Skillnaampr-fix
Sterren
43
Forks
4
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door ronaknnathani op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Pr Fix in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/ronaknnathani/relay/tree/main/skills/pr-fix
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ronaknnathani/relay.git /tmp/relay
mkdir -p .claude/skills
cp -r /tmp/relay/skills/pr-fix .claude/skills/pr-fix
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Pr Fix in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Pr Fix automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Pr Fix niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

PR Fix

Drive a PR to a mergeable state: a green CI, every review comment fixed-and-resolved or replied-and-flagged, and no merge conflicts with the base. Work the three fronts — CI, comments, conflicts — and loop until all are clear. Fix root causes, never silence failures or guess an author's intent. Use review's shared severity vocabulary (Critical / Important / Suggestion). Run independent investigations as sub-agents when available; otherwise do them inline.

Two modes — check your input first

Delegated mode — a caller supplied a watcher worklist. pr-monitor hands you items taken from a relay pr watch digest: each carries reason, source, id, answers, updatedAt, body, thread_id, path, line, and for checks the check_name and check_run_id. That worklist is complete and authoritative:

  • Skip step 1's broad assessment. Do not re-run the PR/comment/thread/check sweep and do not build a full context bundle — the watcher already observed all of it. Bind REPO and PR and go straight to the work.
  • Fetch only what the specific item needs: the failed run's log for a check_run_id, git log/git blame for a conflicting hunk, the file under an inline comment.
  • Fix once, then return — no reassessment loop. The watcher re-observes after your push, and the next attention event carries whatever is left.
  • Return a structured result, one entry per supplied item: the item id, what you did, fixed, replied, escalated, ignored_non_actionable, or failed, and the reason when it is not fixed. Report pushed commits and the new head SHA. ignored_non_actionable means no reply, reaction, resolution, or other GitHub mutation was made for that item.
  • Never run relay pr watch tick or status, and never schedule anything. The caller owns the watcher record.

Direct mode — no worklist was supplied. Assess the PR yourself and loop until clear, exactly as described below. This is the manual path and it is unchanged.

Quick commands

TaskCommand
PR + check statusgh pr view --json number,title,state,statusCheckRollup,mergeable
CI checksgh pr checks
Failed run logsgh run view <RUN_ID> --log-failed
Inline review commentsgh api "repos/$REPO/pulls/$PR/comments" --jq '.[] | {id,user:.user.login,path,line,body}'
Reply to an inline commentgh api "repos/$REPO/pulls/comments/<ID>/replies" -f body="$BODY"
Reply to a conversation commentgh pr comment "$PR" --body "$BODY"
Reply to a review bodygh pr review "$PR" --comment --body "$BODY"
Resolve a thread (after fixing)gh api graphql -f query='mutation($t:ID!){resolveReviewThread(input:{threadId:$t}){thread{isResolved}}}' -F t=<THREAD_ID>

<RUN_ID> comes from a delegated item's check_run_id, or from gh pr checks / statusCheckRollup; a <THREAD_ID> comes from a delegated item's thread_id, or from the GraphQL reviewThreads query. gh has no native thread-resolve — resolving requires the GraphQL mutation above.

Every automated reply — exact marker, visible disclosure, same source

Every reply you post to a pull request starts with these two lines, then a blank line, then the reply:

<!-- relay-agent-reply answers=<item answers token> -->
🤖 <agent> on behalf of <author>

The HTML comment is invisible on GitHub and is the only thing that tells the relay pr watch runtime an agent wrote a reply. A reply without it is read as fresh human feedback and will wake the owner again forever; the emoji line alone is not enough, because a human can type an emoji. The disclosure line is the human-visible half of the same promise: never write as if you were the author.

The marker must name the exact item it answers — copy the item's answers field verbatim. Every digest item carries one, and the watcher matches replies by that id, never by time. A marker that names nothing (<!-- relay-agent-reply answers= --> or the bare marker) answers nothing on a conversation, a review, or a thread, so the item keeps waking the owner. A marker that names the wrong id answers the wrong thing — and never the one in front of you.

This is not bookkeeping. A reviewer can write a second comment between the watcher's last look and your reply, and the watcher has never shown it to anybody: a reply anchored to the id you were given leaves that comment actionable, while an unanchored one buries it.

Reply on the same source you are answering. The watcher reconciles each source independently, so an answer posted somewhere else does not answer anything:

ItemReply withMarker
new-commentgh pr comment — the pull request conversationanswers=comment:200
new-reviewgh pr review --comment — a review, not a conversation commentanswers=review:100
new-inline-commentthe inline replies endpoint on that commentanswers=inline-comment:300
unresolved-threadthe inline replies endpoint on that threadanswers=review-thread:<thread-id>:<comment-id>
changes-requestedgh pr review --comment on the review that requested themanswers=review:100

The ids in that column are examples; the item's own answers token is the truth. A thread's token names the exact comment the digest reported, because a new reply arriving beside it is a different item the watcher must still be able to surface.

Process

  1. Assess. (Direct mode only — delegated mode skips this entirely and uses the supplied worklist.) REPO=$(gh repo view --json nameWithOwner --jq .nameWithOwner), PR=$(gh pr view --json number --jq .number). Pull check status, the comment list, and mergeable. Triage into the three fronts below. Detect the repo's OWN build/test/lint commands from its Makefile, package.json scripts, or CI config (.github/workflows/*) — never assume a toolchain.

    Before editing, materialize the remote PR context onto the local filesystem so the fix is based on a stable, inspectable record rather than scattered terminal output. Use a non-committed directory under the git metadata dir, e.g. CTX_DIR="$(git rev-parse --git-dir)/relay/pr-fix/$PR", and write at least: PR metadata, statusCheckRollup, gh pr checks, inline review comments, review threads, failed-run logs, the base-vs-head diff, and the discovered build/test commands. Re-read those files to plan the fix. Refresh the bundle after every push before deciding the PR is clear.

  2. CI failures — Stop-the-Line, red-loop-first. Do not blindly do what the error message literally says; diagnose. For each failing check:

    • Reproduce locally first. Run the repo's own failing command to get a tight red loop. If it only fails in CI, line up versions/env before guessing.
    • Localize, then minimize. Find the failing layer (triage table below), then shrink to the smallest failing case — one test, one file.
    • Fix the ROOT cause, not the symptom.
    • Regression test: red before, green after. Add/adjust a test that fails without your fix and passes with it. Re-run the repo's full check command end to end until green.
    • Never silence a failure — no deleting or skipping a test, no lint-suppression, no loosened assertion to go green. A test that now fails means behavior changed: fix the code, not the test.
    CategoryTellRoute
    Typetype/compile error, signature mismatchfix the type or the call site at the root
    Importunresolved/circular import, missing symbolfix the path/export; do not stub it out
    Configfailing lint/format/CI step configmatch the repo's configured rule, don't suppress
    Dependencyversion/lockfile/resolution errorreconcile the manifest + lockfile together
    Environmentpasses locally, fails only in CIalign runtime/version/env vars with CI
  3. Review comments — classify each, then act.

    • Non-actionable (praise, thanks, FYI/status-only notes, approvals, duplicate summaries, automated "no findings" / "no important findings" reports, or any comment with no concrete defect, question, requested change, requested decision, or blocker): do nothing on GitHub. Do not post an acknowledgment such as "Acknowledged", do not react, and do not resolve an unresolved thread merely to clear it. In delegated mode return ignored_non_actionable with a short reason; in direct mode exclude it from the actionable worklist.
    • Obvious gap-fix (a clear bug, a missing test, a style/rule violation, a one-right-answer mechanical change): implement it, reply describing exactly what changed, and resolve the thread (GraphQL resolveReviewThread — see Quick commands). Only mark a thread resolved once the fix is pushed; if you can't resolve it programmatically, say so rather than claiming it's done.
    • Author decision (changes intended behavior, API shape, or scope; two-plus reasonable answers): do NOT guess. Reply asking for input, FLAG it to the author, and leave the thread open.
    • When unsure which it is, treat it as a decision and surface it.
    • Every reply carries the marker naming that item's answers token and the visible 🤖 <agent> on behalf of <author> disclosure, and goes on the same source it answers.
  4. Merge conflicts — research both intents, never abort. Rebase/merge onto the base. For each conflict, research the intent behind BOTH sides before resolving — read the commit messages and the PR that introduced each hunk (git log, git blame, gh pr view). Preserve both intents where feasible. NEVER --abort the rebase/merge; resolve forward. Re-run the repo's validation after resolving and before continuing. Then confirm your work survived — your branch's commits are still in git log and the net diff against the base still contains your intended changes; a resolve-forward can silently drop a hunk even when validation passes.

  5. Loop until clear. (Direct mode only.) Commit and push fixes, then re-assess (step 1). Repeat until CI is green and every actionable comment is addressed — fixed+resolved, or replied+flagged. Non-actionable comments require no acknowledgment and do not block completion. Surface the flagged decisions to the caller as the remaining blockers. In delegated mode, stop after one pass and return the per-item result instead; the watcher re-observes and the caller decides what happens next.

Red flags

  • Doing what the error message literally says without diagnosing the root cause.
  • Deleting/skipping a test, suppressing a lint, or weakening an assertion to turn a check green.
  • Editing a failing test instead of the code it caught — a red test means behavior changed.
  • Guessing an author-decision comment instead of replying and flagging it.
  • Replying to a non-actionable comment just to acknowledge it, including "no findings" or "no important findings" review summaries.
  • A reply that reads as the human author's own words, with no automated-agent disclosure.
  • A reply missing the marker, naming no answers token, naming an id you invented instead of the item's own, or posted on a different source than the one it answers — every one of those either keeps waking the owner or answers something nobody asked about.
  • Running git rebase --abort / git merge --abort instead of resolving the conflict.
  • Resolving a conflict by keeping one side without understanding why the other side exists.
  • Assuming npm/make/etc. instead of the command the repo's own config actually uses.
  • Fixing from transient terminal output instead of a local PR context bundle that can be re-read and refreshed. (Direct mode; in delegated mode the supplied worklist is that record.)
  • Re-fetching the whole PR context, or looping, when a delegated worklist was supplied.
  • Touching the watcher record — relay pr watch tick and status belong to the caller.

Verification checklist

  • In delegated mode: every supplied item has a returned outcome, no broad re-fetch or reassessment loop ran, and the watcher record was left untouched.
  • In direct mode: gh pr checks is fully green; each fix reproduced a local red loop and has a red-before/green-after regression test.
  • Direct mode captured the remote PR context locally before edits and refreshed it after each push.
  • No failure was silenced (no skipped/deleted test, no lint-suppression, no loosened assertion).
  • Every actionable review comment is fixed+resolved, or replied+flagged as an author decision left open; non-actionable comments received no reply, reaction, or resolution.
  • Every agent reply carries the marker with that item's exact answers token and the visible disclosure, and was posted on the same source it answers.
  • All conflicts resolved forward (no abort), both intents researched and preserved, validation re-run after.
  • After any rebase, confirmed my branch's commits survived (still in git log; net diff vs base still carries my changes).
  • Findings reported with the shared severity vocabulary (Critical / Important / Suggestion).

Veelgestelde vragen

Wat doet de AI-skill Pr Fix?

Bring a PR to mergeable — fix CI failures, address review comments, and resolve merge conflicts. Runs either from a supplied watcher worklist (delegated mode, one pass) or from its own assessment (direct mode, looping until clear). Use after opening a PR when CI is red, reviewers have left comments, or the branch conflicts with its base.

Waarom Pr Fix gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Pr Fix bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Pr Fix in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/ronaknnathani/relay/tree/main/skills/pr-fix. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Pr Fix gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Pr Fix gebruiken?

Zoveel als je wilt. Je kunt Pr Fix gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Pr Fix gratis?

Ja. Deze skill is door ronaknnathani op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇