commit
FreeCreate well-formatted git commits following project conventions with emoji, type, and scope
The English summary is being prepared. Showing the original description.
Create or update a pull request from current branch to origin main with auto-generated title and description
The English summary is being prepared. Showing the original description.
Review the instructions the agent will receive before you install.
/pr # Create or update PR to origin/main (default)
/pr develop # Create or update PR to specified base branch
git status
If there are uncommitted changes:
/commit skill first to commit all pending changes# This is a direct repo (not a fork) — remote is always origin
git remote -v
BRANCH=$(git branch --show-current)
BASE_BRANCH=${1:-main} # Default base is main
# Get repo from origin
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/' | sed 's/.*github.com[:/]\(.*\)/\1/')
# Fetch latest
git fetch origin
# Check for existing PR from current branch
gh pr list --repo $REPO --head $BRANCH --json number,url,title,body
If PR exists: Go to UPDATE MODE (Step 4a) If no PR: Go to CREATE MODE (Step 4b)
git push origin $BRANCH
gh pr view $PR_NUMBER --repo $REPO --json commits
git log origin/$BASE_BRANCH..HEAD --oneline
Update the PR body to:
[x]gh pr edit $PR_NUMBER --repo $REPO --body "$(cat <<'EOF'
<updated-description>
EOF
)"
✅ PR #123 updated successfully!
**URL:** https://github.com/owner/user-agent-parser/pull/123
**New commits pushed:** 2
**Description updated:** Yes
Invoke the /pr-review skill on the PR number.
git push -u origin $BRANCH
origin/main and HEADFormat: <emoji> <type>(<scope>): <subject> (max 70 chars)
Same format as commit messages. If multiple types, use the dominant one. If equal, prioritize: fix > feat > refactor > test > docs > style.
gh pr create --repo $REPO --base $BASE_BRANCH --head $BRANCH \
--title "<emoji> <type>(<scope>): <subject>" \
--body "$(cat <<'EOF'
## Summary
- <emoji> <change 1>
- <emoji> <change 2>
- <emoji> <change 3>
## Changes
### <Category 1>
- **Component**: Description of change
## Testing
- [ ] `poetry run pytest` — all tests pass
- [ ] `poetry run pytest -q --cov=user_agent_parser --cov-report=xml` — coverage not decreased
- [ ] `poetry run ruff check && poetry run ruff format --check` — no lint issues
## Compatibility
- [ ] Python 3.8+ syntax only (no match/case, no X|Y unions)
- [ ] `parse()` returns 7-tuple — backward compatible
- [ ] Public API signatures unchanged (or documented as breaking)
- [ ] `@lru_cache` functions return immutable types
- [ ] CI matrix passes (Python 3.8–3.15)
## Test plan
- [ ] Test item 1
- [ ] Test item 2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Invoke the /pr-review skill on the new PR number.
| Type | Emoji | Use Case |
|---|---|---|
| feat | ✨ | New feature |
| fix | 🐛 | Bug fix |
| docs | 📝 | Documentation |
| style | 💄 | Formatting only |
| refactor | ♻️ | Code restructure |
| perf | ⚡ | Performance |
| test | ✅ | Tests |
| build | 📦 | Dependencies |
| ci | 🌐 | CI/CD |
| chore | 🔧 | Maintenance/mixed changes |
| revert | ⏪ | Revert commit |
| remove | 🔥 | Remove code/files |
| Priority | Scope | File Paths |
|---|---|---|
| 1 | parser | user_agent_parser/parser.py |
| 2 | engine | user_agent_parser/advanced_engine.py |
| 3 | analytics | user_agent_parser/analytics.py |
| 4 | devices | user_agent_parser/modern_devices.py, constants device entries |
| 5 | constants | user_agent_parser/constants.py |
| 6 | api | user_agent_parser/__init__.py |
| 7 | tests | tests/* |
| 8 | ci | .github/workflows/* |
| 9 | deps | pyproject.toml, poetry.lock |
| Rule | Details |
|---|---|
| Uncommitted Changes | Run /commit skill first |
| Existing PR | Detect and switch to UPDATE mode |
| Remote | Always origin (direct repo, not a fork) |
| Base Branch | Default main |
| Push | Push to origin before creating/updating PR |
| Title Format | <emoji> <type>(<scope>): <subject> |
| Title Length | Max 70 chars |
| TODO Updates | Mark completed items with [x] in update mode |
| Review | Invoke /pr-review skill after create/update |
| Error | Action |
|---|---|
| Uncommitted changes | Run /commit skill first |
| On main branch | Ask user to create a feature branch first |
| No commits ahead of origin/main | Report "Nothing to create PR for" |
| Push fails | Report error and stop |
| gh CLI not authenticated | Run gh auth login |
CREATE MODE:
✅ PR created successfully!
**Title:** ✨ feat(parser): add Brave browser detection
**URL:** https://github.com/owner/user-agent-parser/pull/42
**Base:** origin/main
**Head:** feature-branch
**Commits:** 3 commits
**Files changed:** 4 files
Running /pr-review to check PR...
UPDATE MODE:
✅ PR #42 updated successfully!
**URL:** https://github.com/owner/user-agent-parser/pull/42
**New commits pushed:** 2
**Description updated:** Yes
Updates made:
- ✨ Added: "Add parametrized test cases for Brave"
- ✅ Completed: "poetry run pytest passes"
Running /pr-review to check PR...
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Create well-formatted git commits following project conventions with emoji, type, and scope
The English summary is being prepared. Showing the original description.
Review PR changes against project standards and post feedback
The English summary is being prepared. Showing the original description.
Review working changes - code quality, security, library correctness, and standards auto-fix
The English summary is being prepared. Showing the original description.