pr-fix
Bring a PR to mergeable — fix CI failures, address review comments, and resolve merge conflicts.
Skill by ronaknnathani
Chalk Labs
Need help deploying pr-fix?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ronaknnathani-pr-fix
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pr-fix
What's inside
- Skill name
pr-fix- Description
- 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.
- License
- MIT
- Instructions
- 189 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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
| Task | Command |
|------|---------|
| PR + check status | `gh pr view --json number,title,state,statusCheckRollup,mergeable` |
| CI checks | `gh pr checks` |
| Failed run logs | `gh run view <RUN_ID> --log-failed` |
| Inline review comments | `gh api "repos/$REPO/pulls/$PR/comments" --jq '.[] \| {id,user:.user.login,path,line,body}'` |
| Reply to an inline comment | `gh api "repos/$REPO/pulls/comments/<ID>/replies" -f body="$BODY"` |
| Reply to a conversation comment | `gh pr comment "$PR" --body "$BODY"` |
| Reply to a review body | `gh 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:
| Item | Reply with | Marker |
|---|---|---|
| `new-comment` | `gh pr comment` — the pull request conversation | `answers=comment:200` |
| `new-review` | `gh pr review --comment` — a review, not a conversation comment | `answers=review:100` |
| `new-inline-comment` | the inline replies endpoint on that comment | `answers=inline-comment:300` |
| `unresolved-thread` | the inline replies endpoint on that thread | `answers=review-thread:<thread-id>:<comment-id>` |
| `changes-requested` | `gh pr review --comment` on the review that requested them | `answers=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.
| Category | Tell | Route |
|---|---|---|
| Type | type/compile error, signature mismatch | fix the type or the call site at the root |
| Import | unresolved/circular import, missing symbol | fix the path/export; do not stub it out |From ronaknnathani/relay, MIT.
More from ronaknnathani/relay
- 0.604score
review
ronaknnathani
Review a change for correctness, quality, and guideline compliance using a library of specialized reviewer roles.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
simplify
ronaknnathani
Reduce complexity in recently changed code — cut needless abstraction, dead code, and duplication; improve names and structure — WITHOUT changing behavior.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
review-pr
ronaknnathani
Review someone else's pull request (a PR URL or owner/repo#N) and leave a pending (draft) GitHub review in the user's voice, checked against their AGENTS.md…
SkillAFreshness: A★ 3Claude Code +9 - 0.566score
stack-ship
ronaknnathani
Use only for a standalone stack explicitly launched with `relay --workflow stack-ship`; never invoke inside a tech-lead-managed Relay program.
SkillBFreshness: B★ 3Claude Code +9 - 0.564score
deliver-pr
ronaknnathani
Deliver one change end to end as a single pull request — clarify → plan → implement → simplify → review → validate → open-pr — resuming from wherever it left…
SkillBFreshness: B★ 3Claude Code +9 - 0.564score
pr-monitor
ronaknnathani
Handle one pull request attention event end to end — read the watcher digest, triage it, delegate the fixing to pr-fix, re-observe the pull request, and exit.
SkillBFreshness: B★ 3Claude Code +9 - 0.561score
tl
ronaknnathani
Manage a Relay program as the CEO-facing tech lead: shape goals and contracts, prioritize dependency-aware work, dispatch senior worker agents, and surface…
SkillBFreshness: B★ 3Claude Code +9 - 0.544score
build-write-like-me
ronaknnathani
Use this skill whenever the user wants to capture, clone, or codify their own (or someone's) writing voice into a reusable skill.
SkillBFreshness: B★ 3Claude Code +9 - 0.519score
open-pr
ronaknnathani
Stage, commit, push, and open a pull request following the author's repository and AGENTS.md conventions — repo-style commit messages, a prose PR summary, and…
SkillCFreshness: C★ 3Claude Code +9 - 0.514score
commit
ronaknnathani
Create a single well-formed git commit from the working changes, following the repo's AGENTS.md and recent commit-message conventions.
SkillCFreshness: C★ 3Claude Code +9 - 0.514score
validate
ronaknnathani
Verify a change is ready to ship by checking it against its acceptance criteria and running the repo's own quality gates in order, then report a pass/fail…
SkillCFreshness: C★ 3Claude Code +9 - 0.514score
clarify
ronaknnathani
Turn a vague or underspecified task into a crisp requirements + testable acceptance-criteria document by closing the gap between what was asked and what is…
SkillCFreshness: C★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ronaknnathani/relay
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ronaknnathani
- 0.604score
simplify
ronaknnathani
Reduce complexity in recently changed code — cut needless abstraction, dead code, and duplication; improve names and structure — WITHOUT changing behavior.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
review-pr
ronaknnathani
Review someone else's pull request (a PR URL or owner/repo#N) and leave a pending (draft) GitHub review in the user's voice, checked against their AGENTS.md…
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
review
ronaknnathani
Review a change for correctness, quality, and guideline compliance using a library of specialized reviewer roles.
SkillAFreshness: A★ 3Claude Code +9 - 0.566score
stack-ship
ronaknnathani
Use only for a standalone stack explicitly launched with `relay --workflow stack-ship`; never invoke inside a tech-lead-managed Relay program.
SkillBFreshness: B★ 3Claude Code +9 - 0.564score
pr-monitor
ronaknnathani
Handle one pull request attention event end to end — read the watcher digest, triage it, delegate the fixing to pr-fix, re-observe the pull request, and exit.
SkillBFreshness: B★ 3Claude Code +9 - 0.564score
deliver-pr
ronaknnathani
Deliver one change end to end as a single pull request — clarify → plan → implement → simplify → review → validate → open-pr — resuming from wherever it left…
SkillBFreshness: B★ 3Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get pr-fix running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
pr-fix skill. Agent Mart. https://agentmart.dev/skills/ronaknnathani-pr-fix (last updated 2026-10-24)