create-pr
Create Pull Request
Collaborating skills
- Git Commit: skill:
git-commitfor creating well-structured commit messages before opening a PR
Creates GitHub PRs with conventional commit titles and a body that mirrors .github/pull_request_template.md.
PR Title Format
<type>(<scope>): <summary>
Types (required)
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
perf |
Performance improvement |
test |
Adding/correcting tests |
docs |
Documentation only |
refactor |
Code change (no bug fix or feature) |
build |
Build system or dependencies |
ci |
CI configuration |
chore |
Routine tasks, maintenance |
Scopes (optional but recommended)
backend— Backend/API (apps/backendorapps/api)web— Frontend (apps/web)types— Shared TypeScript types (packages/types)api— Public API contract (serializers, endpoints)infra— Deployment, Docker, Kamal, CIdocs— Documentation and strategy files
Summary Rules
- Use imperative present tense: "Add" not "Added"
- Capitalize first letter
- No period at the end
- Add
!before:for breaking changes (e.g.feat(api)!: ...)
Steps
-
Check current state:
git status git diff --stat git log origin/main..HEAD --oneline -
Analyze changes to determine:
- Type: What kind of change is this?
- Scope: Which area is affected?
- Summary: What does the change do?
-
Push branch if needed:
git push -u origin HEAD -
Create PR using gh CLI with title and body. If
.github/pull_request_template.mdexists, use it as the PR body instead of the default template:gh pr create --title "<type>(<scope>): <summary>" --body "<body from template>" -
Assign labels by parsing the PR title:
- Extract
<type>from the title - Extract
<scope>if present in parentheses - Check for
!prefix indicating breaking change - Create labels if they don't exist
- Apply labels using
gh pr edit --add-labels
See
references/labels.mdfor the complete implementation script.gh pr create --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF' ## What <Describe the change concisely. What does this PR do and why?> ## Why <What problem does this solve? Link to issue if applicable.> <!-- Closes #123 / Fixes #123 / Resolves #123 --> ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactor - [ ] Documentation - [ ] Infrastructure / tooling ## Testing <How was this tested? What cases were covered?> ## Checklist - [ ] Tests pass (`<test command>`) - [ ] No new dependencies introduced without justification - [ ] Breaking changes are documented below (if any) ## Breaking changes <!-- List any breaking API contracts, renamed fields, removed endpoints, or behaviour changes. Leave blank if none. --> EOF )" - Extract
Examples
New feature
feat(auth): Add OAuth2 login support
Bug fix
fix(api): Correct pagination offset calculation
Breaking API change
feat(api)!: Rename response field user_name to username
Infra / tooling
chore(infra): Update Docker base image to node:22-alpine
No scope (affects multiple areas)
chore: Upgrade dependencies and synchronise lockfile
Validation
The PR title must match this pattern:
^(feat|fix|perf|test|docs|refactor|build|ci|chore|revert)(\([a-zA-Z0-9 ]+\))?!?: [A-Z].+[^.]$
Key rules:
- Type must be one of the allowed types
- Scope is optional but must be in parentheses if present
!for breaking changes goes before the colon- Summary must start with a capital letter
- Summary must not end with a period
Labels
After creating the PR, assign labels based on the type and scope extracted from the PR title.
Standard labels to apply:
- Type label (from
<type>(<scope>):):feat,fix,perf,test,docs,refactor,build,ci,chore - Scope label (if scope present): derived from the scope in the PR title
- Special labels:
breaking(if!in title),dependencies(for dependency updates),security(for security fixes)
Create labels if they don't exist. See references/labels.md for complete color mapping and implementation script.
Iron Rule
The agentic coding assistant shall never merge to the main branch — create pull requests only. Never use gh pr merge, git merge, or any command that directly merges to main. Pull requests are for human review and merging.
More from mguinada/agent-skills
refactor
TDD-based code refactoring preserving behavior through tests. Use Red-Green-Refactor cycles to apply refactoring patterns one test-verified change at a time. **TRIGGERS**: 'clean up code', 'make code simpler', 'reduce complexity', 'refactor this', 'apply DRY', 'extract method', 'remove duplication'. **DISTINCT FROM**: Adding features (use /tdd) or fixing bugs. **PROACTIVE**: Auto-invoke when test-covered code has complexity (functions >50 lines, high cyclomatic complexity, duplication).
16ai-engineering
Build AI agents and agentic workflows. Use when designing/building/debugging agentic systems: choosing workflows vs agents, implementing prompt patterns (chaining/routing/parallelization/orchestrator-workers/evaluator-optimizer), building autonomous agents with tools, designing ACI/tool specs, or troubleshooting/optimizing implementations. **PROACTIVE ACTIVATION**: Auto-invoke when building agentic applications, designing workflows vs agents, or implementing agent patterns. **DETECTION**: Check for agent code (MCP servers, tool defs, .mcp.json configs), or user mentions of \"agent\", \"workflow\", \"agentic\", \"autonomous\". **USE CASES**: Designing agentic systems, choosing workflows vs agents, implementing prompt patterns, building agents with tools, designing ACI/tool specs, troubleshooting/optimizing agents.
13git-commit
Generate concise, descriptive git commit messages following best practices. Use when creating git commits from staged changes, crafting commit messages, or reviewing commit message quality. Use when the user says /commit or asks to create a git commit. **PROACTIVE ACTIVATION**: Auto-invoke when staged changes detected or user asks to commit/save work. **DETECTION**: Run git status - if staged changes exist, offer to commit. User says \"commit\", \"save\", \"done with feature\". **USE CASES**: Staged changes detected, work completed, user wants to save progress.
12tdd
Guide Test-Driven Development workflow (Red-Green-Refactor) for new features, bug fixes, and refactoring. Supports both Python (pytest) and Ruby (RSpec). Use when writing tests, implementing features, or following TDD methodology. **PROACTIVE ACTIVATION**: Auto-invoke when implementing features or fixing bugs in projects with test infrastructure. **DETECTION**: Check for tests/ directory, pytest.ini, pyproject.toml with pytest config, spec/ directory, .rspec file, or *_spec.rb files. **USE CASES**: Writing production code, fixing bugs, adding features, legacy code characterization.
11prompt-engineering
Creates system prompts, writes tool descriptions, and structures agent instructions for agentic systems. Use when the user asks to create, generate, or design prompts for AI agents, especially for tool-using agents, planning agents, or autonomous systems. **PROACTIVE ACTIVATION**: Auto-invoke when designing prompts for agents, tools, or agentic workflows in AI projects. **DETECTION**: Check for agent/tool-related code, prompt files, or user mentions of \"prompt\", \"agent\", \"LLM\". **USE CASES**: Designing system prompts, tool descriptions, agent instructions, prompt optimization, reducing hallucinations.
10copilot-sdk
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent. **PROACTIVE ACTIVATION**: Auto-invoke when building agentic applications or integrating Copilot SDK. **DETECTION**: Check for @github/copilot-sdk imports, copilot dependencies in package.json/pyproject.toml/go.mod. **USE CASES**: Embedding agents in apps, creating custom tools, implementing streaming, managing sessions, connecting to MCP servers.
9