/dev10x-coding:gh-pr-fixupfrom dev10x-coding
Implements code fixes for validated PR review comments by creating fixup commits, pushing them, and replying with commit references. Creates one fixup per comment for traceability.
Ships in dev10x-coding. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill handles implementing a fix for a PR review comment that has already been validated as needing a code change. It:
fixup! commit targeting the original commitCritical rule: ONE fixup commit per PR comment — unless the fix
spans hunks owned by multiple branch commits. "One fixup per
comment" is a traceability floor (so reviewers can match comment to
commit), not a cap on commit count. When dev10x-coding:git-fixup reports
multi-owner staged changes (status: multi), create one fixup per
owning commit, all referencing the same review comment URL.
Bundling cross-commit hunks into a single fixup creates conflicts on
autosquash that git rerere then silently re-applies — see GH-299.
Entry point rule: dev10x-coding:gh-pr-respond is the recommended
entry point for all PR review comments. It orchestrates triage,
fixup, reply, and thread resolution as a pipeline. Calling
dev10x-coding:gh-pr-fixup directly skips triage, reply formatting,
and thread resolution — use it only when you have already
validated the comment and will handle reply/resolution yourself.
When to use this skill:
dev10x-coding:gh-pr-respond after dev10x-coding:gh-pr-triage returns VALIDThis skill follows references/task-orchestration.md patterns.
Auto-advance: Complete each step, immediately start the next — no checkpoints the resolver did not ask for. Never pause to ask "should I continue?" between steps.
REQUIRED: Create tasks before ANY work. Execute these
TaskCreate calls at startup:
TaskCreate(subject="Validate review comment", activeForm="Validating comment")TaskCreate(subject="Implement fix", activeForm="Implementing fix")TaskCreate(subject="Create fixup commit", activeForm="Creating fixup commit")TaskCreate(subject="Push and reply", activeForm="Pushing and replying")Set dependencies: implement blocked by validate, commit blocked by implement, push blocked by commit.
https://github.com/owner/repo/pull/123#discussion_r456)Optional additional context:
/dev10x-coding:gh-pr-fixup https://...#discussion_r456 The API now provides customer_urlParse the comment URL:
URL format: https://github.com/{owner}/{repo}/pull/{pr_number}#discussion_r{comment_id}
Fetch the comment:
mcp__plugin_dev10x_cli__pr_comments(action="get", comment_id={comment_id})
Extract:
body — The comment text (the requested change)path — File path the comment is online — Line number in the difforiginal_line — Original line numberdiff_hunk — The code context around the commentcommit_id — The commit this comment refers touser.login — Who left the commenthtml_url — Direct link to commentParse the comment to understand:
Type of change requested:
Scope of change:
Before implementing, check if a previous fixup commit already addresses this comment:
Reuse existing fixup commit if:
Create new fixup commit if:
When reusing a fixup:
Read the affected file(s):
Read tool with file_path and relevant line range
Make the change:
REQUIRED: Run tests before committing. Do NOT skip this step, even for single-line fixes. Code changes across bounded contexts can break invariants that only tests catch.
Exception for non-testable files (GH-759 F4): Changes to
infrastructure files that have no applicable test suite may
skip test execution with a note explaining why. Non-testable
file types include: .yml/.yaml (CI workflows, config),
.md (documentation, SKILL.md), .toml (pyproject, config),
Dockerfile, .json (settings, manifests). When skipping,
note: "Tests skipped: non-testable infrastructure file."
REQUIRED: Delegate to Skill(dev10x-coding:py-test) for Python
projects — never run pytest inline. The skill enforces
coverage checks that bare pytest -x commands bypass. This
is a repeat offender: 12 instances across 3 audit sessions
(PAY-762, PAY-735, PAY-592). For non-Python projects, run
the project's test runner directly (npm test, etc.).
LOOP ENFORCEMENT (GH-682): This rule applies to EVERY
test run in the fix-test-fix cycle, not just the first.
When tests fail and you iterate (fix code → re-run tests →
fix code → re-run tests), EACH re-run MUST use
Skill(dev10x-coding:py-test). The pattern of "first run uses
skill, subsequent runs use raw pytest" is the #1 skill
routing violation. Before running any test command, check:
am I about to type pytest or uv run pytest? If yes,
STOP and use Skill(dev10x-coding:py-test) instead.
Note: ruff format and ruff check --fix run automatically via PostToolUse hook.
If tests fail: Fix the test failure before proceeding to
Step 5. Re-run tests via Skill(dev10x-coding:py-test) — not raw
pytest. If the fix itself is wrong, revert and reply asking
for clarification (see Error Handling).
IMPORTANT: Delegate to the dev10x-coding:git-fixup skill. It resolves
the fixup target by blaming the staged hunks (GH-299), so each fixup
lands adjacent to the commit that actually owns the touched lines.
# Stage the changes
git add {file_path}
# Delegate to dev10x-coding:git-fixup skill (handles target resolution + message format)
When the fix spans multiple owning commits, dev10x-coding:git-fixup
returns a multi status and refuses to create a cross-commit fixup.
In that case:
git restore --staged . then
git add -p for each owner's files/hunks)dev10x-coding:git-fixup once per owning commitabc1234
and def5678 — payments service + regression tests")Multiple fixups for one review comment are allowed and correct here — they preserve traceability while keeping each fixup foldable.
Fixup commit format:
fixup! {original_commit_subject}
Addresses review comment:
https://github.com/{owner}/{repo}/pull/{pr}#discussion_r{comment_id}
Before pushing, read isDraft with
mcp__plugin_dev10x_cli__pr_get(number={pr_number}) and remember it.
Primary (MCP tool): mcp__plugin_dev10x_cli__push_safe(args=["origin", "HEAD"])
Fallback: Skill(dev10x-coding:git) for safe push with protected branch checks.
Re-ready a PR the push drafted (GH-1731). A push to a ready PR can
convert it to draft (pr-draft-on-push.yml, GH-1694), and a draft gets
no CI. After the push, re-read pr_get. If the PR was ready before the
push and is a draft now, call
mcp__plugin_dev10x_cli__pr_ready(pr_number={pr_number}) and confirm
isDraft: false from its payload. A PR that was already a draft stays
one — readiness was not this push's to grant. Full rule:
.claude/rules/mcp-tools.md § pr_ready after a push.
Get the commit hash and build both link types for the reply:
commit_hash=$(git rev-parse --short HEAD)
full_hash=$(git rev-parse HEAD)
# PR-relative link — most useful while the PR is in flight: clicks
# land in the inline-diff view inside the PR and reviewers can comment
# on the change without leaving the page. Becomes 404 once the commit
# vanishes (after groom, after merge with squash strategy).
pr_commit_url="https://github.com/{owner}/{repo}/pull/{pr_number}/commits/${full_hash}"
# Absolute repo permalink — survives grooming and merge: rebase
# rewrites the SHA on the branch but the original commit remains
# reachable in the repo, so the permalink stays valid post-merge.
permalink="https://github.com/{owner}/{repo}/commit/${full_hash}"
Reply in the review comment thread (not as a top-level PR comment).
Preferred: MCP tool (no Bash permission friction):
mcp__plugin_dev10x_cli__pr_comment_reply(
pr_number={pr_number},
comment_id={comment_id},
body="Fixed in [`{short_hash}`]({pr_commit_url}) · [permalink]({permalink}) - {brief_explanation}"
)
Fallback (raw CLI):
gh api --method POST \
repos/{owner}/{repo}/pulls/{pr_number}/comments/{comment_id}/replies \
-f body="Fixed in [\`{short_hash}\`]({pr_commit_url}) · [permalink]({permalink}) - {brief_explanation}"
Reply format (GH-777, GH-52):
Fixed in [`{short_hash}`]({pr_commit_url}) · [permalink]({permalink}) - {brief explanation}.
Both links are intentional:
{short_hash} link points at the PR-relative URL
(/pull/N/commits/HASH) so a click during review lands inside
the PR's inline-diff view — reviewers can comment on the change
without navigating away. This URL 404s after groom or squash-
merge, but that's after the review is done.[permalink] points at the absolute repo URL
(/commit/HASH) which survives grooming and merge: useful as a
long-lived audit trail and the only one that still resolves
after the SHA leaves the branch tip.When reusing a fixup for another comment:
If the fix breaks tests:
git checkout -- {file_path} is commonly
denied by a standing rail against agents discarding uncommitted work
(GH-972 F4), and re-spelling it as git restore is explicitly the
wrong instinct — see
skills/diag-friction/references/deny-rail-vs-approval-gate.md. If
the revert is refused, hand the exact command to the supervisor and
continue with step 2; the reply below is the actual deliverable.The suggested change causes test failures in `test_xyz`.
Could you clarify the expected behavior?
Error: {brief_error_message}
If the comment is unclear:
Could you clarify what change you'd like here?
I see a few possible interpretations:
1. {interpretation_1}
2. {interpretation_2}
If the file has changed since the comment was made:
git pull --rebasegh api to reply in thread, never
gh pr commentMakefile, package.json,
or repo root for project-specific scriptsdev10x-coding:gh-pr-monitor → dev10x-coding:gh-pr-respond (orchestrator)
├── dev10x-coding:gh-pr-triage
└── dev10x-coding:gh-pr-fixup ← this skill
└── dev10x-coding:git-fixup
Standalone usage:
/dev10x-coding:gh-pr-fixup https://github.com/owner/repo/pull/123#discussion_r456
Called by dev10x-coding:gh-pr-respond:
dev10x-coding:gh-pr-respond receives comment URL
→ delegates to dev10x-coding:gh-pr-triage → verdict: VALID
→ delegates to dev10x-coding:gh-pr-fixup (this skill)
→ fix implemented, pushed, replied
GitHub comment operations use gh api for REST calls and gh api graphql
for thread resolution. See references/github_api.md for full reference.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pr-review, fixup-commit, github-actions, code-review-workflow
npx claudepluginhub dev10x-guru/dev10x-claude --plugin dev10x-coding40 skills in this plugin
/ci-reviewdev10x-coding:ci-reviewUse when a change to a Claude CI review prompt, args file, reviewer agent or CLI pin needs checking before it merges — so you read what the CI code review and PR hygiene check would post on a real PR, with nothing reaching GitHub unless you choose, after reading the report, to share it as one marked replica comment. TRIGGER when: "what would the CI review say", replaying the Claude CI review locally, verifying a review prompt or model change on a PR. DO NOT TRIGGER when: self-reviewing a branch with no PR (use dev10x-coding:review), or reviewing someone's PR and posting (use dev10x-coding:gh-pr-review).
/fanoutdev10x-coding:fanoutProcess multiple independent work items as a worktree-isolated swarm — each item runs the full dev10x-coding:work-on lifecycle inside its own background Agent with isolation="worktree" (under Herdr, its own Herdr workspace and agent). Honors dependencies, minimizes conflicts, auto-advances by default. TRIGGER when: 2+ independent work items need parallel processing (PRs, issues, tickets). DO NOT TRIGGER when: single task or sequential dependency chain (use dev10x-coding:work-on); already running as a swarm child (see recursive-fanout guard).