qodo-pr-resolver
npx skills add https://github.com/ilchemla/agent-skills --skill qodo-pr-resolver
Agent 安装分布
Skill 文档
Qodo PR Resolver
Efficiently process PR review comments from Qodo PR Agent through a structured 3-phase workflow: Analyze â Confirm â Execute.
Key Features
- ð¯ Severity-based prioritization (CRITICAL â HIGH â MEDIUM â LOW)
- 𧪠Automatic test integration and CI check fixing
- ð¦ Smart commit strategy (functional vs cosmetic separation)
- ð¬ Standardized reply templates
- â Automatic thread resolution via GitHub API
- ð Multi-issue comment detection and verification
- ð Fresh data verification for completion
When to Use
Use this skill when:
- Responding to Qodo PR Agent review comments on GitHub
- Addressing automated code review feedback
- Managing multiple review threads efficiently
- Need to validate comment relevance before acting
- Want structured approach to handling PR feedback with severity prioritization
Prerequisites
GitHub CLI Required:
# Check installation
gh --version
# Authenticate if needed
gh auth login
Critical Constraints
â ï¸ IMPORTANT:
- Only unresolved comments are processed (resolved comments are skipped)
- Phase 2 (Confirm) MUST run in parent process – never use AskUserQuestion in sub-agents
- CRITICAL/HIGH fixes require passing tests – cannot skip
- All sub-issues in multi-issue comments must be addressed
- Fresh verification confirms zero unresolved items before completion
3-Phase Workflow
Phase 1: ANALYZE (Parallel Sub-agents)
Step 1: Fetch Data
- Get current PR number and details
- Fetch both types of Qodo comments:
- General comments: Summary comment with all issues (via
/repos/{owner}/{repo}/issues/{pr}/comments) - Inline comments: Comments on specific lines (via
/repos/{owner}/{repo}/pulls/{pr}/comments)
- General comments: Summary comment with all issues (via
- Parse HTML to extract clean issue descriptions from both formats
- Extract Agent Prompt sections (ready-to-use fix instructions)
- Deduplicate issues that appear in both comment types
- Fetch failing CI checks (lint, tests, format)
Step 2: Deduplicate Issues
- Same issue may appear in both general and inline comments
- Deduplicate by:
file:line:titleordescription_similarity - Prefer inline comment if duplicate (has better metadata)
- Track both comment IDs for thread resolution
Step 3: Parallel Analysis
- Launch Task agent (subagent_type=”general-purpose”) for EACH unique issue/check
- Each agent analyzes:
- Extract Agent Prompt: Parse
<details><summary>Agent Prompt</summary>or<summary>Agent prompt</summary>section from HTML - Severity: Detect from Qodo badges (ð ⨠ð) + keywords (see Severity Guide)
- Multi-issue detection: For general comments, each
<details>block is separate issue - Validity: valid/invalid/partial based on Evidence section
- Context: Read file:line from metadata (inline) or GitHub links (general), understand purpose
- Action: fix/reply/defer/ignore
- Fix proposal: Use Agent Prompt + Fix Focus Areas as primary guidance
- Extract Agent Prompt: Parse
Step 4: Sort Results
- Sort by severity: CRITICAL â HIGH â MEDIUM â LOW
- Group related issues from same file
- Prepare structured summary with both general and inline comment IDs
Phase 2: CONFIRM (Parent Process Only)
Present Analysis:
Display comments grouped by severity:
ð´ CRITICAL Issues (2):
Comment #1 (auth.py:156) [MULTI-ISSUE: 2 items]
- SQL injection AND missing validation
- Action: fix (Recommended)
ð¡ HIGH Issues (1):
Comment #2 (service.py:42)
- Null pointer exception
- Action: fix (Recommended)
ð¢ MEDIUM Issues (1):
Comment #3 (utils.py:18)
- Performance optimization
- Action: defer (Recommended)
⪠LOW Issues (2):
Comments #4-5 - Variable naming, docstrings
- Action: fix (batch together)
CI Checks (2 failing):
- Lint: ESLint errors
- Tests: 2 failing tests
Get Confirmation:
- Use AskUserQuestion for each severity group
- Options: Apply fix, Reply to reviewer, Defer to issue, Ignore, Custom
- CRITICAL/HIGH default to “Apply fix (Recommended)”
- Allow multi-select for similar comments
Phase 3: EXECUTE
Step 1: Detect Configuration
- Auto-detect test/lint/format commands from project config
- See Test Integration Guide
Step 2: Apply Fixes (By Severity)
- Process CRITICAL â HIGH â MEDIUM â LOW
- For each fix:
- Apply code changes
- Verify all sub-issues addressed (for multi-issue comments)
- Commit with appropriate strategy:
- CRITICAL/HIGH: Individual commits
- MEDIUM/LOW: Batch into single commit
- Use Conventional Commits format
- See Commit Strategy Guide
Step 3: Fix CI Checks
- Run lint –fix, formatters
- Commit CI fixes separately
Step 4: Run Tests
- Execute detected test command
- MUST pass for CRITICAL/HIGH fixes
- Handle failures: retry/fix/skip/abort
- See Test Integration Guide
Step 5: Push Changes
- Push all commits at once
- Verify push succeeded
Step 6: Reply to Reviewers
- Reply to all comment locations where issue appears:
- If issue is in general comment: Reply to that comment
- If issue is in inline comment: Reply to that inline thread
- If issue appears in both: Reply to both locations with same message
- Use standard templates for each comment:
- Fixed: “Fixed in [hash]: description”
- Won’t Fix: “Won’t fix: reason”
- By Design: “By design: explanation”
- Deferred: “Deferred to #issue: will address later”
- Acknowledged: “Acknowledged: note”
- See Reply Templates
Step 7: Resolve Threads
- Mark each addressed thread as resolved via GitHub GraphQL API
- For issues in both locations, resolve both threads
- Skip if user selected “Ignore”
Step 8: Fresh Verification
- Re-fetch PR data
- Confirm zero unresolved comments
- Verify all CI checks passing
- Provide completion summary
Severity Classification
| Severity | Qodo Indicators | Keywords | Priority | Commit |
|---|---|---|---|---|
| CRITICAL | ⨠Security, ð Bug (security) | security, vulnerability, injection, XSS, SQL | Must fix first | Individual |
| HIGH | ð Bug, ⯠Reliability | bug, error, crash, fail, memory leak | Should fix | Individual |
| MEDIUM | ð Rule violation, â Correctness | performance, refactor, code smell, rule violation | Recommended | Batch |
| LOW | ð Requirement gaps (minor) | style, nit, formatting, typo | Optional | Batch |
Qodo-Specific Detection:
- Parse HTML for emoji badges:
ð Bug,ð Rule violation,⨠Security - Extract severity from badge combinations
- Security badge (â¨) â Always CRITICAL
- Bug badge (ð) â HIGH (or CRITICAL if security-related)
Processing order: CRITICAL â HIGH â MEDIUM â LOW
See Severity Guide for detailed classification rules.
Qodo-Specific Handling
Two Comment Types:
Qodo posts comments in two locations:
- General Comment (Summary) – Contains all issues in one comment on the PR conversation
- Inline Comments – Individual comments on specific code lines
IMPORTANT: You must fetch both to get all issues. General comment often contains issues not in inline comments.
Fetch General Comments:
# General PR comments (summary with all issues)
gh api repos/{owner}/{repo}/issues/{pr_number}/comments | jq '[.[] |
select(.user.login == "qodo-code-review[bot]" or .user.login == "qodo-merge[bot]")
]'
Fetch Inline Comments:
# Inline code review comments (specific lines)
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments | jq '[.[] |
select(.user.login == "qodo-code-review[bot]" or .user.login == "qodo-merge[bot]") |
select(.in_reply_to_id == null)
]'
Parse General Comments:
- General comment contains multiple issues in nested
<details>blocks - Structure:
<details><summary>1. Title <code>ð Rule violation</code></summary>(collapsed sections) - Each issue has: Description, Code snippet, Evidence, Agent Prompt
- Extract file/line from GitHub links:
[app/file.py[R363-380]](https://github.com/...) - Parse all
<details>sections to get complete issue list
Parse Inline Comments:
- Simpler structure with single issue per comment
- Metadata available:
.path,.line,.body - May contain same issues as general comment (deduplicate by file+line+title)
HTML Parsing:
- Extract clean text from HTML using regex or HTML parser
- Parse
<details><summary>Agent Prompt</summary>or<summary>Agent prompt</summary>for fix instructions - Extract numbered items:
1. Title ð Rule violation â Correctness - Look for Fix Focus Areas section for file:line locations
- For general comments: Parse multiple
<details>blocks to extract all issues
Severity Detection:
- ⨠Security badge â CRITICAL
- ð Bug + Security context â CRITICAL
- ð Bug â HIGH
- ð Rule violation â MEDIUM
- ð Requirement gaps â LOW (or MEDIUM depending on context)
Agent Prompt Usage:
- Qodo provides ready-to-use fix prompts in
<details><summary>Agent Prompt</summary> - Extract these and use as primary fix guidance
- Agent Prompt contains: Issue description, Issue Context, Fix Focus Areas
Response Format:
- Match user’s response pattern:
â **FIXED** in commit [hash]– Descriptionâ **NOT APPLICABLE**– Reasoningð **DEFERRED** to #issue– Will address later
Quick Example
/qodo-pr-resolver
â Fetching general comments... Found 1 (with 2 issues)
â Fetching inline comments... Found 1
â Deduplicating... 2 unique issues total
â Parsing HTML, extracting Agent Prompts...
â Detected severities: 1 HIGH (ð ⯠Reliability), 1 MEDIUM (ð â Correctness)
â Analyzing in parallel...
â Presenting by severity (HIGH first)
â User confirms actions
â Applying fixes using Agent Prompt guidance
â Running tests â
â Posting replies to both general and inline comments
â Resolving threads (2 resolved)
â Fresh verification: 0 unresolved â
â Summary: 1 HIGH fixed, 1 MEDIUM deferred
Reference Documentation
Core Guides:
- Severity Classification Guide – Detailed severity rules and examples
- Reply Templates – Standard professional response templates
- Commit Strategy – Conventional Commits and batching strategy
Technical References:
- GitHub API Reference – All
ghCLI commands used - Test Integration – Test detection, execution, failure handling
Advanced Usage:
- Troubleshooting Guide – Common issues and solutions
- Advanced Usage – Custom filters, batch processing, integrations
Best Practices
Analysis Phase
- Severity first: Classify before recommending action
- Detect multi-issue: Look for “AND”, “also”, “additionally”
- Parallel execution: Launch all agents at once
- Include CI checks: Analyze failing checks alongside comments
Confirmation Phase
- Present by severity: Show CRITICAL first, LOW last
- Smart defaults: CRITICAL/HIGH default to “Apply fix”
- Group similar: Batch related MEDIUM/LOW comments
Execution Phase
- Process by severity: Fix CRITICAL first, LOW last
- Verify multi-issue: Confirm ALL sub-issues addressed
- Test before push: NEVER push failing tests
- Use templates: Consistent professional replies
- Resolve threads: Automate via API
- Fresh verification: Always re-fetch to confirm completion
Important Notes
- This skill is designed specifically for Qodo PR Agent comments
- Can be adapted for other automated review tools by modifying bot username filter
- Always verify changes before pushing to ensure correctness
- Maintain professional tone in all reviewer interactions (no emojis in replies)
- The analyze phase is crucial – thorough exploration prevents incorrect fixes
- Test integration ensures changes don’t break existing functionality
- Fresh verification provides confidence that all work is complete
Integration with Other Skills
Before:
/cleanup– Clean up code before review
After:
/create-ticket– Create tickets for deferred items/commit– Additional commits if needed- Verify:
gh pr checks– All CI passing
See Advanced Usage for complete workflow examples.