oprogramadorreal/optimus-claude / skills/pr
pr
VerifiedCreates or updates a pull request (GitHub) or merge request (GitLab) for the current branch in the Conventional PR format — intent, summary, changes, rationale, and test plan. Pushes the branch if needed (asks before any force-push) and captures the implementation conversation's intent into the PR description. Use when a feature branch is ready for review or to refresh an existing PR/MR description.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 3.9 KB |
| SKILL.md | skill md | 10.7 KB |
| agents/openai.yaml | config | 198 B |
| references/default-branch-detection.md | markdown | 709 B |
| references/platform-detection.md | markdown | 1.5 KB |
| references/pr-template.md | markdown | 2.6 KB |
README.md
View on GitHub# optimus:pr
A [Claude Code](https://docs.anthropic.com/en/docs/claude-code) skill that creates or updates pull requests (GitHub) and merge requests (GitLab) using the **Conventional PR** format — a structured body with optional intent, summary, changes, rationale, and test plan sections.
## Why structured PRs
A well-structured description serves human reviewers and `/optimus:code-review` alike: the `## Intent` section records the problem, scope, non-goals, and key decisions from the implementation conversation, and code review later reads it back as author intent to check what was built against what was supposed to be built.
## Recommended workflow
`/optimus:pr` produces the highest-fidelity description when run in the same conversation as the implementation — that's where the decisions, non-goals, and trade-offs live.
1. Implement your changes (TDD, brainstorm-driven, or freeform).
2. In the same conversation, run `/optimus:commit` to land the commits (a `/optimus:tdd` run commits and pushes for you).
3. Still in the same conversation, run `/optimus:pr`.
4. In a fresh conversation, run `/optimus:code-review` — it reads the PR description you just wrote.
Standalone updates are fine from a fresh conversation: the Update Flow preserves the existing `## Intent` verbatim while regenerating the diff-derived sections.
## Prerequisites
- Git repository on a feature branch with at least one commit
- `gh` (GitHub CLI) or `glab` (GitLab CLI) — the skill offers to install if missing and verifies authentication
No `/optimus:init` required — this skill works standalone.
## Usage
- `/optimus:pr` — create or update the PR/MR for the current branch
The skill detects the hosting platform, pushes the branch if needed (asking before any force-push after a rebase), and checks for an existing open PR/MR. With none, it generates a Conventional PR, previews it for confirmation, and creates it ready for review (not draft). With an existing one, it offers to regenerate the title, the description, or just the `## Intent` section — always preserving manually-added content (issue references, deployment notes) that can't be derived from the diff, while re-deriving everything that can.
In a multi-repo workspace it filters to repos with branches ready for a PR and offers to process all of them or just one.
### Example
```
> /optimus:pr
## PR Preview
**Title:** feat(auth): add password reset endpoint
---
## Summary
Adds a password reset endpoint that sends a reset email with a time-limited token. ...
[full body: Intent / Summary / Changes / Test plan]
Review the PR/MR title and description above. Proceed or adjust?
[Create PR / Adjust]
> Create PR
## PR/MR Created
- URL: https://github.com/owner/repo/pull/42
- Title: feat(auth): add password reset endpoint
- Target: main
```
## Conventional PR format
| Section | Required | Content |
|---------|----------|---------|
| Title | Yes | `type(scope): description` — Conventional Commits |
| `## Intent` | When context available | Problem, scope, non-goals, key decisions — read back by `/optimus:code-review` as author intent; omitted entirely when no context exists |
| `## Summary` | Yes | 2–4 sentences on what and why |
| `## Changes` | Yes | Bulleted file list with descriptions |
| `## Rationale` | No | Design decisions; omitted for straightforward changes |
| `## Test plan` | Yes | Verification checklist |
## When to run
- After finishing work on a feature branch, before requesting review
- After a `/optimus:tdd` run, in the same conversation — the PR body is populated from the `## TDD Summary` block (behaviors, coverage delta, deferred work)
- After new commits or a rebase, to refresh an existing PR/MR description
## When not to run
- On the default branch, or with no commits — commit to a feature branch first
- To open a draft PR — this skill creates non-draft PRs only (it can still refresh an existing draft's description)
## License
[MIT](../../LICENSE)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |