com um clique
pr
Create Pull Requests with pre-flight checks and proper formatting
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Create Pull Requests with pre-flight checks and proper formatting
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Orchestrate complete issue implementation workflow from branch to PR
Decompose a large GitHub Issue (epic, refactor, or feature) into subtask Issues, each small enough for a single focused PR
Standardized release workflow with version updates and CHANGELOG management
Spawn a Reviewer Agent to evaluate code changes against architecture, design, and quality criteria
Create commits with code quality checks and conventional commit messages
Run all validations before pushing to remote
| name | pr |
| description | Create Pull Requests with pre-flight checks and proper formatting |
Create Pull Requests that pass CI before creation and target the correct branch.
IMPORTANT: All Pull Requests MUST be written in English.
Before creating a PR, ALL of the following checks MUST pass:
cargo fmt --all -- --check
If this fails, run cargo fmt --all to fix and commit the changes.
cargo clippy --all-targets --all-features -- -D warnings
CRITICAL: Zero warnings required. Fix all issues before proceeding.
cargo test --all
All tests must pass.
Execute all three checks above. If any fail:
/commit skillgit diff origin/develop...HEAD | grep -E '^\+.*WIRE\(#[0-9]+\)' | grep -v '^+++'
If the output is non-empty, print:
⚠️ This PR introduces WIRE(#N) annotation(s). Verify that Issue #N is open and will consume these items. The annotation will be auto-detected by /implement Step 4.0 when Issue #N is implemented.
This check is informational only and does not block PR creation.
# Check current branch
git branch --show-current
# Check if up to date with remote
git status
Verify:
main branch (direct commits to main are forbidden)feature/<issue-number>-<description> for featuresbugfix/<issue-number>-<description> for bug fixeshotfix/<issue-number>-<description> for hotfixesdocs/<issue-number>-<description> for documentationrefactor/<issue-number>-<description> for refactoringCRITICAL: This project uses develop as the integration branch.
| Branch Type | Base Branch |
|---|---|
| feature/* | develop |
| bugfix/* | develop |
| docs/* | develop |
| refactor/* | develop |
| hotfix/* | main |
| release/* | main |
Branch Creation Rule: Always create new branches from origin/develop:
git fetch origin
git checkout -b feature/<issue>-<desc> origin/develop
# See all commits that will be in the PR
git log origin/develop..HEAD --oneline
# See the diff
git diff origin/develop...HEAD
Skip this step entirely when the current branch prefix is one of:
refactor/, ci/, test/, chore/, docs/
Detect via:
git branch --show-current
If the prefix is unrecognized or not in the skip list, do not skip (fail-closed).
For all other branch types (feature/, bugfix/, hotfix/, security/):
# For feature/bugfix/refactor branches (base: develop)
git diff origin/develop...HEAD -- CHANGELOG.md
# For hotfix/* branches (base: main)
git diff origin/main...HEAD -- CHANGELOG.md
If this diff is non-empty, CHANGELOG.md was updated — gate passes. Proceed to Step 5.
Check for user-facing changes in the diff:
# New CLI flags (additions of #[arg( or #[clap( lines)
git diff origin/develop...HEAD -G'#\[arg\(|#\[clap\(' -- 'src/cli/'
# Changes to core behavior (application, formatters, config)
git diff origin/develop...HEAD --stat -- src/sbom_generation/ src/application/ src/adapters/outbound/formatters/ src/cli/config_resolver.rs src/config.rs
Also consider:
bugfix/ or hotfix/ → always treat as user-facing (bug fix)security/ or label security → always treat as user-facing (security fix)| User-facing changes? | CHANGELOG updated? | Action |
|---|---|---|
| No | No | ✅ Gate passes — internal-only PR |
| No | Yes | ✅ Gate passes |
| Yes | Yes | ✅ Gate passes |
| Yes | No | ❌ STOP — prompt user |
If user-facing changes are detected and CHANGELOG.md was not updated, output:
⚠️ User-facing changes detected but
CHANGELOG.md [Unreleased]was not updated on this branch.Please add an entry under the appropriate section before pushing:
### Added— new features or CLI flags### Fixed— bug fixes### Security— security fixes### Changed— behavior changesUpdate
CHANGELOG.md, commit the change, then re-run/pr. Type yes to proceed anyway (only if this PR is truly internal), or no to abort.
⚠️ CHANGELOG not updated — author confirmed internal-only.Note: This gate complements
/releaseStep 3.6 — catching missing entries at PR time prevents the empty[Unreleased]scenario that caused the v2.2.0 incident (Issue #491).
Trigger: Run this gate if the current branch added, removed, or renamed
any CLI flag (i.e., any #[arg( or #[clap( annotation was added/changed in src/cli/).
Detect via:
git diff origin/develop...HEAD -G'#\[arg\(|#\[clap\(' -- 'src/cli/'
If the diff is non-empty, verify ALL of the following before proceeding to Step 5:
### subsection exists for the feature (or an existing section is updated)```bash command example demonstrates the new flagexamples/sample-project/config/uv-sbom.config.yml includes the new config key
(commented out with the default value, matching the style of existing entries)If any checkbox is unchecked, output:
⚠️ CLI documentation gap detected. The following items are missing for the new flag
--<flag-name>:
- README.md usage section
- README-JP.md (Japanese translation)
- Example config file entry
- Example project README
Please update the missing documentation and commit the changes before creating the PR. Type yes to proceed anyway (only if all gaps are intentionally deferred with a tracking Issue linked in the PR body), or no to abort.
Do NOT skip this gate even if the implementation plan did not list documentation files.
/implement Step 4.3 | /pr Step 4.6 | |
|---|---|---|
| When it runs | During implementation, before code review | Before PR creation |
| Purpose | Catch gaps early, prompt immediate fix | Backstop if Step 4.3 was skipped or incomplete |
| On failure | Fix now, continue | Block or defer with linked Issue |
git push -u origin $(git branch --show-current)
Use the following template:
gh pr create --base develop --title "TITLE" --body "$(cat <<'EOF'
## Summary
[1-3 bullet points summarizing the changes]
## Related Issue
Closes #XX
## Changes Made
- [Change 1]
- [Change 2]
- [Change 3]
## Test Plan
- [ ] `cargo test --all` passes
- [ ] `cargo clippy --all-targets --all-features -- -D warnings` passes
- [ ] Manual testing performed (if applicable)
## Screenshots (if applicable)
[Add screenshots for UI changes]
---
Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
After creation:
gh pr checksIf any pre-flight check fails:
cargo fmt --all, commit, retryNEVER create a PR if pre-flight checks fail.
If push fails:
If gh pr create fails:
gh auth statusgh pr listUser: "PRを作成して"
Claude executes /pr skill:
cargo fmt --all -- --check (passes)cargo clippy --all-targets --all-features -- -D warnings (passes)cargo test --all (passes)feature/84-agent-skillsdevelop