Agent skill
refine-plan
Refines an existing implementation plan through discussion with the user. Takes a GitHub issue number. Use when the user wants to refine a plan, discuss a plan, change a plan, or says "refine plan X" or "let's discuss the plan for issue
Install this agent skill to your Project
npx add-skill https://github.com/josh-gree/my-claude-skills/tree/main/skills/refine-plan
SKILL.md
Refine Plan
Purpose
Iteratively refine an existing implementation plan through discussion with the user. Allows asking questions, requesting changes, and approving the final plan.
Prerequisites
The ticket MUST have an implementation plan. If no plan exists, tell the user to run /plan-ticket first.
Workflow
Step 1: Verify Environment
Check we have a GitHub remote:
git remote -v
STOP if:
- No remote exists → "This skill requires a GitHub remote. Please add one with
git remote add origin <url>first."
Step 2: Identify the Ticket
User will provide a GitHub issue number (e.g., #12 or 12).
If not clear, ask which ticket to refine.
Step 3: Read Ticket and Plan
gh issue view <number> --comments
Extract:
- The original issue description
- The implementation plan (look for "## Implementation Plan" section)
- The success criteria
If no implementation plan exists, STOP and tell user to run /plan-ticket first.
Step 4: Present Current Plan
Display the current plan to the user clearly, including:
- The implementation steps
- The success criteria
- Any context from the original issue
Step 5: Feedback Loop
Enter an iterative refinement loop:
-
Ask for feedback using AskUserQuestion:
- "Do you have questions about the plan?"
- "Would you like to change anything?"
- "Is the plan ready to approve?"
-
Handle response:
- Questions: Answer based on codebase exploration and plan context
- Change requests: Revise the plan and present the updated version
- Approval: Exit the loop and proceed to posting
-
Loop back if not approved, presenting the revised plan each time
Keep track of what has changed during refinement for the revision notes.
Step 6: Post Revised Plan
Once approved, post the revised plan as a new comment:
gh issue comment <number> --body "$(cat <<'EOF'
## Revised Implementation Plan
### Revision Notes
<Summary of what changed from the original plan>
### Steps
1. **<Action>** - <What this accomplishes>
- Files: `path/to/file.py`
- <Brief description of the change>
...
### Success Criteria
- [ ] <Observable outcome 1>
- [ ] <Observable outcome 2>
EOF
)"
Step 7: Report Back
Tell the user:
- The revised plan has been posted
- Summary of key changes made
- Next step is to run
/implement-ticket <number>
Guidelines
DO:
- Present the plan clearly before asking for feedback
- Answer questions thoroughly, exploring the codebase if needed
- Make requested changes accurately
- Keep revision notes concise but complete
- Allow multiple rounds of refinement
DON'T:
- Include source code in the plan
- Make changes the user didn't request
- Skip the approval step
- Post identical plans (if no changes were made, just confirm and don't post)
Handling Common Scenarios
User asks about a specific step: Explore the codebase to provide context and answer their question.
User wants to add a step: Add it in the appropriate order and explain where it fits.
User wants to remove a step: Remove it and adjust any dependent steps.
User wants to change the approach: Revise affected steps and update success criteria if needed.
No changes needed: If the user approves without changes, confirm and skip posting (no revision needed).
Checklist
- Verify GitHub remote exists
- Identify which issue to refine
- Read issue and extract plan
- Verify plan exists (if not, stop)
- Present current plan to user
- Enter feedback loop
- Handle questions and changes
- Get user approval
- Post revised plan (if changes were made)
- Report back to user
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
implement-ticket
Implements a planned GitHub issue by following the implementation plan. Takes a GitHub issue number. Use when the user wants to implement a ticket, work on an issue, or says "implement ticket X" or "do issue
address-pr-comments
Addresses PR review comments by making code changes and posting replies. Takes a PR number or auto-detects from current branch. Use when the user wants to address review feedback, respond to PR comments, fix PR feedback, or says "address comments on PR X".
create-ticket
Creates GitHub issues to capture work that needs to be done. Records intent with context about the codebase, not implementation plans. Use when the user wants to track work, create a ticket, log a task, or says "we want to do X" or "we need to X".
review
Review code using Google's code review principles. Use for ad-hoc file review or as the foundation for PR and codebase reviews.
setup-python-lib
Sets up a new Python library project using uv in the current directory. Creates project structure, installs dev dependencies, and optionally configures git remote. Use when the user wants to initialise a Python library, package, or project with uv.
review-pr
Review a pull request using Google's code review principles. Takes a PR number or auto-detects from current branch. Use when the user wants to review a PR, check PR changes, or says "/review-pr 123".
Didn't find tool you were looking for?