nathan13888/nice-skills/doc-n-fix
- community
Checking that the SKILL.md file is still in the repository.
Processes PR review feedback into a prioritized checklist, documents it to a user-chosen destination, then fixes issues one by one with progress tracking. Use when user says "doc-n-fix", "fix review comments", "address feedback", "work through PR review", or "fix PR comments".
Install
npx vskill@latest install nathan13888/nice-skills/doc-n-fixSKILL.md
Doc-n-Fix
Gather PR review feedback, document it as a prioritized checklist, then fix issues one by one -- checking them off as you go.
Workflow
Follow all 7 steps sequentially.
Step 1: Identify the PR
- Parse the invocation from everything after
/doc-n-fix:
/doc-n-fix(bare) -- auto-detect from current branch/doc-n-fix 42or/doc-n-fix #42-- specific PR number/doc-n-fix https://github.com/owner/repo/pull/42-- PR URL/doc-n-fix --manual-- user will paste feedback directly (skip GitHub gathering)
- Auto-detect (bare invocation or PR number):
``bash gh pr view --json number,title,url,body,headRefName,state ``
For a specific PR number, append the number: gh pr view {number} --json ...
- PR state gate -- if
stateisMERGEDorCLOSED, report "PR #{number} is {state} -- nothing to fix." and STOP.
- Edge cases:
- Not a git repo -- report "Not a git repository." and stop.
- `gh` not installed or not authenticated -- suggest
gh auth loginand stop. - No open PR for current branch -- use
AskUserQuestionto ask for a PR number, URL, or--manual.
- Store PR metadata:
number,title,url,headRefName,state.
Step 2: Gather Review Feedback
GitHub path
Run a single Bash call to get repo info:
Then run 3 parallel Bash calls to collect all review types:
Error handling -- if any gh command fails, route by error:
| Error | Action | |
|---|---|---|
| 404 Not Found | PR number is wrong or repo mismatch -- report and STOP | |
| Authentication / 401 / 403 | Suggest gh auth login and STOP | |
| Rate limit / 429 | Report "GitHub rate limit hit -- wait and retry" and STOP | |
| Other errors | Print the raw error message and STOP |
Combine all feedback into a single list. Deduplicate using these explicit criteria:
- Same `id` -- exact duplicate, keep one copy
- Same `path` + `line` + `author` -- merge into one item, keep the newest body
- Thread grouping -- comments linked via
in_reply_to_idcollapse to a single item
DO NOT deduplicate based on similar body text alone -- reviewers may intentionally leave similar comments on different locations.
Empty feedback gate -- if all 3 sources return zero comments/reviews, use AskUserQuestion: "No review feedback found. Options: (1) Switch to --manual mode and paste feedback, (2) Stop."
Manual path (--manual)
Use AskUserQuestion to ask the user to paste their review feedback. Parse using these rules:
- Split on numbered lists (
1.,2.), bullet points (-,*), or blank-line-separated paragraphs - Extract file/line references via patterns:
file.ts:42,line 42,in foo.ts,at line N - If the text is completely unstructured with no clear item boundaries, present as a single item and let the user split it during Step 3 validation
Step 3: Build the Deliverables List
Parse all feedback into fix items. For each item, extract:
| Field | Description | |
|---|---|---|
# | Sequential number | |
| Description | What needs to change | |
| Source | @author who left the comment | |
| Location | file:line when available | |
| Priority | P1, P2, or P3 | |
| Effort | S (small), M (medium), or L (large) |
Priority rules
- P1 -- Must Fix -- Correctness, bugs, security, blockers. Signal words: "must", "bug", "broken", "wrong", "blocker", "security", "critical", "fix this"
- P2 -- Should Fix -- Substantive improvements, refactoring, error handling, test gaps. This is the default for most comments.
- P3 -- Nice to Have -- Style, naming, optional suggestions. Signal words: "nit", "consider", "might want to", "optional", "minor", "style", "suggestion"
Grouping
Group related comments into single items:
- Thread replies to the same comment
- Multiple comments about the same logical issue
- Comments on the same code block
User validation
Present the list as a markdown table with columns: #, Description, Source, Location, Priority, Effort. Then use AskUserQuestion with these options:
- Looks good -- proceed as-is
- Adjust priorities -- user specifies which items to re-prioritize
- Add items -- user adds items not captured from review
- Remove items -- user removes items they don't want to fix
- Merge items -- user identifies items that should be combined
After each user edit, re-number items sequentially (no gaps). Repeat until the user confirms "Looks good."
Step 4: Choose Destination & Fix Order
Destination
Use AskUserQuestion to ask where to write the checklist:
- GitHub PR description -- append a
## Review Checklistsection (Recommended) - GitHub PR comment -- post as a new comment
- Local file -- save to
REVIEW-{PR#}.md - Other -- use
AskUserQuestionto get the path, useWriteto create the file, treat subsequent updates like a local file viaEdit
Fix order
Use AskUserQuestion to ask what order to fix items:
- Priority-first -- P1 > P2 > P3 (Recommended)
- Quick wins first -- S > M > L within each priority tier
- File-grouped -- group by file to minimize context switching
Write the initial checklist
Format the checklist using - [ ] items (renders as interactive checkboxes on GitHub):
Write to the chosen destination:
- PR description: Read the current body with
gh pr view {number} --json body --jq '.body'. If## Review Checklistalready exists, find it and replace everything from## Review Checklistto the next##heading or EOF. Otherwise append. UseWriteto create/tmp/pr-body-{number}.md, then rungh pr edit {number} --body-file /tmp/pr-body-{number}.md. - PR comment: Use
Writeto create/tmp/pr-comment-{number}.md, then rungh pr comment {number} --body-file /tmp/pr-comment-{number}.md. Parse the comment URL from the command output, extract the numeric comment ID (last segment of the URL), and store it for Step 6 updates. - Local file: Use
Writeto create the file.
Important: Use Write tool for all temp files -- DO NOT use echo, cat <<EOF, or shell redirects. Always use --body-file or -F body=@file (capital F) for gh write commands.
Step 5: Fix Issues
Work through items in the chosen order, one at a time. For each item:
- Read context -- Read the file(s) referenced in the comment. Use
Grepto find related usages. Understand the surrounding code.
- Apply fix:
- Simple fix (1-2 files, clear intent) -- use
ReadandEditdirectly. - Complex fix (touches 3+ files, requires understanding a call chain across 2+ modules, or reviewer references architectural concerns like refactor/redesign/extract) -- spawn a
Taskagent (subagent_type: general-purpose) with the fix description, relevant file paths, and reviewer comment as context.
- Ambiguity gate -- if the reviewer's intent is unclear, use
AskUserQuestionwith options:
- Interpretation A -- {your best guess}
- Interpretation B -- {alternative reading}
- Skip -- skip this item for now (record
{ item_number, description, reason }-- used in Step 7) - Ask reviewer -- post a clarifying question on the original comment
- Ask reviewer option: Use
Writeto create/tmp/reply-{number}.mdwith the clarifying question, then post a reply:
``bash gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies -F body=@/tmp/reply-{number}.md ``
If this returns 404 (the comment_id may be a top-level PR comment, not a review comment), fall back to:
``bash gh pr comment {number} --body-file /tmp/reply-{number}.md ``
- Error recovery -- if a fix fails (edit produces errors, tests break, etc.): revert the affected files with
git checkout -- {files}, record the item as skipped with reason "fix failed", and proceed to the next item.
Step 6: Update the Checklist
After each fix, immediately update the checklist:
- Toggle the item: Find the line containing
**#{item_number}**and change- [ ]to- [x]. - Update the counter: Find the
**Progress:**line and increment the first number.
Destination-specific update method:
- PR description: Re-read the full body with
gh pr view {number} --json body --jq '.body', find and toggle the item, update the progress counter, useWriteto create/tmp/pr-body-{number}.md, write back viagh pr edit {number} --body-file /tmp/pr-body-{number}.md. - PR comment: Re-read the comment via
gh api repos/{owner}/{repo}/issues/comments/{comment_id} --jq '.body', update, useWriteto create/tmp/pr-comment-{number}.md, write back viagh api repos/{owner}/{repo}/issues/comments/{comment_id} -X PATCH -F body=@/tmp/pr-comment-{number}.md. - Local file: Use
Editto toggle the checkbox and update the counter directly.
Update-failure recovery -- if the write fails (conflict, stale content), re-read the latest content and retry once. If it still fails, log the error and continue fixing remaining items -- bulk-update the checklist at the end.
Print brief progress after each update:
Proceed to the next item automatically -- do NOT ask "continue?" between items.
Step 7: Completion Summary
After all items are processed, output:
Guidelines
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/doc-n-fix/SKILL.md
Popularity
- Repository stars
- 5
- 7-day trend score
- 9
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nathan13888/nice-skills/doc-n-fix)