From Dev10x
Implements code fixes for validated GitHub PR review comments: analyzes comment, applies fix, creates targeted fixup! commit, pushes it, and replies with commit reference. One commit per comment.
npx claudepluginhub dev10x-guru/dev10x-claude --plugin Dev10xThis skill is limited to using the following tools:
This skill handles implementing a fix for a PR review comment that has
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
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.
Entry point rule: Dev10x: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: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:gh-pr-respond after Dev10x:gh-pr-triage returns VALIDThis skill follows references/task-orchestration.md patterns.
Auto-advance: Complete each step, immediately start the next. 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: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: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: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: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: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:git-fixup skill.
# Stage the changes
git add {file_path}
# Delegate to Dev10x:git-fixup skill (handles message format)
Fixup commit format:
fixup! {original_commit_subject}
Addresses review comment:
https://github.com/{owner}/{repo}/pull/{pr}#discussion_r{comment_id}
Primary (MCP tool): mcp__plugin_Dev10x_cli__push_safe(args=["origin", "HEAD"])
Fallback: Skill(Dev10x:git) for safe push with protected branch checks.
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 — shows diff within PR context (becomes 404 after groom)
pr_commit_url="https://github.com/{owner}/{repo}/pull/{pr_number}/commits/${full_hash}"
# Absolute repo link — survives grooming, useful for post-groom audit
repo_commit_url="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]({repo_commit_url}) - {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]({repo_commit_url}) - {brief_explanation}"
Reply format (GH-777):
Fixed in [`{short_hash}`]({pr_commit_url}) · [permalink]({repo_commit_url}) - {brief explanation}.
Both links are included because:
/pull/N/commits/HASH): shows diff within PR
context, allows reviewers to comment on the change/commit/HASH): survives grooming (rebase
rewrites SHAs, breaking PR-relative links)When reusing a fixup for another comment:
If the fix breaks tests:
git checkout -- {file_path}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:gh-pr-monitor → Dev10x:gh-pr-respond (orchestrator)
├── Dev10x:gh-pr-triage
└── Dev10x:gh-pr-fixup ← this skill
└── Dev10x:git-fixup
Standalone usage:
/Dev10x:gh-pr-fixup https://github.com/owner/repo/pull/123#discussion_r456
Called by Dev10x:gh-pr-respond:
Dev10x:gh-pr-respond receives comment URL
→ delegates to Dev10x:gh-pr-triage → verdict: VALID
→ delegates to Dev10x: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.