Install
$ agentstack add skill-reflexioai-claude-smart-create-pr ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
PR Creator
Create well-structured, reviewer-friendly pull requests following best practices.
CRITICAL: This skill MUST always result in a PR being created. Do NOT stop early, do NOT ask the user to run another command first. Handle all prerequisites (committing, branching, pushing) inline and proceed to gh pr create.
Workflow
Step 1: Pre-flight Checks
Run these checks before anything else:
- Verify GitHub CLI authentication — run
gh api user --jq '.login'to confirm the CLI is authenticated. If this fails, tell the user to rungh auth loginfirst and stop. - Determine the base branch — default to
main. If the user specifies a different base, use that. Capture as$BASE_BRANCH.
Step 2: Commit Uncommitted Changes
Run git status to check for uncommitted changes. If there are uncommitted changes, commit them directly — do NOT delegate to another skill or tell the user to commit first.
- Stage changes — run
git addfor relevant modified/untracked files. Do not stage.envor gitignored files. - Lint and format — if Python files are staged, run:
``bash ruff check --fix && ruff format `` Re-stage any modified files.
- Commit — write a conventional commit message based on the staged diff:
``bash git commit -m ": " ` If precommit hooks modify files, re-stage with git add -u` and retry (up to 3 times).
Step 3: Ensure Feature Branch
- Check current branch — run
git branch --show-current. - If on
$BASE_BRANCH, create a feature branch:
- Analyze the commits/changes to pick a descriptive name (e.g.,
feat/add-auth,fix/login-bug) - Run
git checkout -b
- If on a different branch, check whether the branch has PR-worthy commits vs
$BASE_BRANCH:
- Run
git log $BASE_BRANCH..HEAD --oneline - If there are commits, use the current branch as-is
- If there are NO commits (branch is at same point as base), this means something went wrong — investigate and fix
Step 4: Sync with Base Branch
- Fetch latest — run
git fetch origin $BASE_BRANCH - Check for divergence — run
git log HEAD..origin/$BASE_BRANCH --oneline - Rebase if needed — if the base branch has new commits:
a. Run git rebase origin/$BASE_BRANCH b. If conflicts arise, surface them to the user — show both sides and ask which to keep. Do not silently resolve. c. After resolving, git add and git rebase --continue
Step 5: Push
Push the branch to remote:
git push -u origin HEAD
If the push is rejected (e.g., diverged history after rebase), use git push --force-with-lease -u origin HEAD.
Step 6: Analyze Changes and Draft PR
- Analyze — run these in parallel:
git log $BASE_BRANCH..HEAD --oneline— all commitsgit diff $BASE_BRANCH...HEAD --stat— files changed summarygit diff $BASE_BRANCH...HEAD— full diff
- Check PR size — if >500 lines changed, warn the user but continue.
- Draft title — under 70 characters, conventional prefix (
feat:,fix:,refactor:,docs:,chore:). - Draft body using this template:
## Summary
## Changes
## Diagrams
## Test Plan
Guidelines:
- Explain why, not just what
- For WIP PRs, use the
--draftflag instead of[WIP]prefix - Include Mermaid diagrams when they clarify workflows or architecture
- Do NOT include any "Generated with Claude Code" footer or bot attribution
- Do NOT include
Co-Authored-Bylines
Step 7: Create the PR
Write body to a temp file and create the PR:
cat > /tmp/pr_body.md `
- Assignees: add `--assignee `
**Do NOT add:**
- `--author` flag (gh uses the authenticated user automatically)
- Any `Co-Authored-By` trailer
- Any "Generated with Claude Code" footer
### Step 8: Report
- Return the PR URL so the user can review it
- If `gh pr create` fails, diagnose the error and retry with fixes
---
## Best Practices
**Commit History:** If the commit history is messy, suggest rebasing to clean it up before creating the PR.
**Feedback Requests:** If the user mentions wanting specific feedback, add a "Feedback Requested" section to the body.
**Screenshots:** For frontend changes, remind the user to add screenshots or recordings to the PR after creation.
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [ReflexioAI](https://github.com/ReflexioAI)
- **Source:** [ReflexioAI/claude-smart](https://github.com/ReflexioAI/claude-smart)
- **License:** Apache-2.0
- **Homepage:** https://www.reflexio.ai/docs/claude-smart
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.