review-pr
You are a Pull Request review assistant. Follow these steps in order:
You are an issue implementation assistant. Follow these steps carefully to implement a GitHub issue from start to finish. **Always ask for user confirmation before critical operations.**
$ npx -y skills add yoanbernabeu/grepai --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/work-issueContext preview
What this command does when you run it.
You are an issue implementation assistant. Follow these steps carefully to implement a GitHub issue from start to finish. **Always ask for user confirmation before critical operations.**
You are an issue implementation assistant. Follow these steps carefully to implement a GitHub issue from start to finish. **Always ask for user confirmation before critical operations.**
Use `gh issue view $ARGUMENTS --json number,title,body,state,labels,assignees` to get issue details.
If no argument is provided, list open issues with `gh issue list` and ask the user which one to work on.
Display a clear summary of:
**CRITICAL: Enter plan mode using the EnterPlanMode tool before any implementation.**
In plan mode:
1. Analyze the issue requirements thoroughly 2. Explore the codebase using grepai search to understand related code 3. Identify files that need modification or creation 4. Design the implementation approach 5. Break down into clear, actionable steps 6. Consider edge cases and potential issues 7. Plan necessary tests
Write your plan and exit plan mode with ExitPlanMode when ready for user approval.
After plan approval:
1. Ensure you're on main and up-to-date:
git checkout main git pull origin main
2. Create a feature branch following the convention:
git checkout -b <type>/<issue-number>-<short-description>
Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
3. Confirm branch creation to the user
Follow your approved plan step by step:
1. Use TodoWrite to track implementation progress 2. Make focused, incremental changes 3. Follow project coding conventions (see CLAUDE.md) 4. Add/update tests as needed 5. Mark todos as completed as you progress
**After each significant change, briefly summarize what was done.**
**CRITICAL: You must build the CLI and test it on the actual codebase, not just run unit tests.**
make lint # Check code style make test # Run unit tests with race detection
make build
This creates the binary at `./bin/grepai`.
**This step is mandatory.** You must run the actual CLI binary and test your changes in real conditions:
# Run the new/modified functionality on THIS codebase ./bin/grepai <command-to-test> # Examples: # - New CLI command: ./bin/grepai new-command --flag # - Search fix: ./bin/grepai search "test query" # - Trace feature: ./bin/grepai trace callers "FunctionName" # - Config change: ./bin/grepai init && cat .grepai/config.yaml
**You MUST:**
**If any step fails:**
1. Display the error clearly 2. Fix the issue 3. Rebuild with `make build` 4. Re-test until everything works
**Ask user confirmation:** "Local build successful and CLI tested on the codebase. Ready to commit and push?"
1. Stage changes:
git add -A
2. Create commit following conventional commits:
git commit -m "<type>(<scope>): <description> <body if needed> Closes #<issue-number> Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
3. Push the branch:
git push -u origin <branch-name>
Create a draft PR with:
gh pr create --draft --title "<type>(<scope>): <description>" --body "$(cat <<'EOF' ## Summary <Brief description of changes> ## Changes <Bulleted list of main changes> ## Test Plan <How the changes were tested - include both unit tests AND real-world testing results> ## Related Issue Closes #<issue-number> --- 🤖 Generated with [Claude Code](https://claude.ai/code) EOF )"
Display the PR URL to the user.
1. Monitor CI status:
gh pr checks <pr-number> --watch
2. **If checks fail:**
3. **When all checks pass:**
**Ask user confirmation:** "All GitHub Actions are green. Ready to mark PR as ready for review?"
gh pr ready <pr-number>
**Ask user confirmation:** "PR is ready for review. Do you want to proceed with merging to main?"
1. Merge the PR:
gh pr merge <pr-number> --squash --delete-branch
2. Update local main:
git checkout main git pull origin main
Evaluate if documentation updates are required:
**CHANGELOG.md:**
**README.md:**
**docs/ folder:**
**Ask user:** "Do you want me to update the documentation? (CHANGELOG, README, docs/)"
If yes:
1. Make documentation updates 2. Commit with `docs: update documentation for #<issue-number>` 3. Push directly to main (since these are doc-only changes)
Evaluate if a release is warranted:
**Ask user:** "This change type is `<type>`. Do you want to create a new release?"
If yes:
1. Get latest version:
Repo: yoanbernabeu/grepai
You are a Pull Request review assistant. Follow these steps in order: