create-pr
Create a pull request for the current branch. Handles uncommitted changes, generates a PR title matching the `[{modules}] {type}: {description}` format enforced by CI, and fills in the PR description template. Trigger: 'create pr', 'open pr', 'submit pr', 'make pr'.
Best use case
create-pr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create a pull request for the current branch. Handles uncommitted changes, generates a PR title matching the `[{modules}] {type}: {description}` format enforced by CI, and fills in the PR description template. Trigger: 'create pr', 'open pr', 'submit pr', 'make pr'.
Teams using create-pr should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/create-pr/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How create-pr Compares
| Feature / Agent | create-pr | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create a pull request for the current branch. Handles uncommitted changes, generates a PR title matching the `[{modules}] {type}: {description}` format enforced by CI, and fills in the PR description template. Trigger: 'create pr', 'open pr', 'submit pr', 'make pr'.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## Interaction Principle
**Minimize confirmations.** The only user confirmation is for uncommitted changes (Step 1.3). Everything after that — drafting, writing file, pushing, creating PR — runs automatically. Tool-level permission prompts (file write, git push) serve as implicit confirmation; do not add extra "are you sure?" pauses on top.
## Steps
### Step 1: Pre-flight Checks
1. **Identify current branch**:
```bash
git branch --show-current
```
If on `main` — stop and ask the user to create a feature branch first.
2. **Determine base branch**: use `main` unless the user specifies otherwise.
3. **Check for uncommitted changes** (only confirmation point):
```bash
git status
git diff --stat
```
If there are staged or unstaged changes, show a summary and ask the user:
> "There are uncommitted changes. Commit them before creating the PR?"
- If yes: run `make quality`, stage relevant files (skip `.env`, credentials, large binaries), commit.
- If no: proceed with what's already committed.
- If `make quality` fails: stop and report errors.
4. **Check for existing PR** on this branch:
```bash
gh pr view --json number,title,body 2>/dev/null
```
Note the PR number if one exists.
5. **Check commits ahead of base**:
```bash
git log origin/main..HEAD --oneline
```
If the branch has no commits ahead of `main`, stop — nothing to open a PR for.
### Step 2: Analyze Changes (automatic)
1. Collect the full diff against the base branch:
```bash
git diff main...HEAD
git log main..HEAD --oneline
```
2. Identify **affected modules** by mapping changed file paths to allowed module names:
| Path prefix | Module |
|------------|--------|
| `veomni/models/` | `model` |
| `veomni/trainer/` | `trainer` |
| `veomni/data/` | `data` |
| `veomni/distributed/` | `dist` |
| `veomni/parallel/` | `parallel` |
| `veomni/ops/` | `ops` |
| `veomni/checkpoint/` | `ckpt` |
| `veomni/optim/` | `optim` |
| `veomni/logging/` | `logging` |
| `configs/` | `config` |
| `docs/` | `docs` |
| `tests/`, `.github/workflows/` | `ci` |
| `docker/` | `docker` |
| `tasks/` | `task` |
| `veomni/omni/` | `omni` |
| `.agents/` | `agent` |
| other / mixed | `misc` |
Allowed modules: `misc`, `ci`, `config`, `docs`, `data`, `dist`, `omni`, `logging`, `model`, `optim`, `ckpt`, `release`, `task`, `perf`, `ops`, `parallel`, `docker`, `trainer`, `agent`
3. Determine **change type**:
| Type | When |
|------|------|
| `feat` | New functionality or capability |
| `fix` | Bug fix |
| `refactor` | Same behavior, better structure |
| `chore` | Maintenance, cleanup, config changes |
| `test` | Test-only changes |
### Step 3: Generate Draft File and Push (automatic)
1. Draft PR title in `[{modules}] {type}: {description}` format:
- Multiple modules separated by comma: `[model, data] feat: ...`
- Description: concise, lowercase start, no period, under 60 chars
- Breaking changes: prepend `[BREAKING]`
- Must pass the regex in `.github/workflows/check_pr_title.yml`
2. Draft PR description following `.github/PULL_REQUEST_TEMPLATE.md`.
3. **Write to `.pr-drafts/`** (already in `.gitignore`):
```bash
mkdir -p .pr-drafts
```
**Filename convention**:
- Existing PR: `.pr-drafts/<pr-number>.md` (e.g. `.pr-drafts/123.md`)
- New PR: `.pr-drafts/<branch-name>.md` — renamed to PR# after creation.
**File format** — first line is the PR title, blank line, then the description body:
```markdown
[model] feat: add support for Qwen4
### What does this PR do?
> Summary here.
### Checklist Before Starting
- Search for relative PRs/issues and link here: ...
- PR title follows `[{modules}] {type}: {description}` format
### Test
> Test description here.
### API and Usage Example
> N/A
### Design & Code Changes
> - Change 1
> - Change 2
### Checklist Before Submitting
- [ ] Read the [Contribute Guide](https://github.com/ByteDance-Seed/VeOmni/blob/main/CONTRIBUTING.md)
- [ ] Applied pre-commit checks
- [ ] Added/updated documentation
- [ ] Added tests to CI workflow (or explained why not feasible)
```
4. Tell the user the draft file path (so they know where to find it if they want to review later).
### Step 4: Push and Create/Update PR (automatic, immediately after Step 3)
1. Push the branch:
```bash
git push -u origin HEAD
```
2. **Create or update**:
- New PR (use `--body-file` to avoid shell escaping issues):
```bash
# Extract body from draft file (everything after the first blank line)
tail -n +3 .pr-drafts/<branch-name>.md > /tmp/pr-body.md
gh pr create --base <base-branch> --title "<title>" --body-file /tmp/pr-body.md
```
After creation, rename the draft file from `<branch-name>.md` to `<pr-number>.md`.
- Existing PR:
```bash
tail -n +3 .pr-drafts/<pr-number>.md > /tmp/pr-body.md
gh pr edit <pr-number> --title "<title>" --body-file /tmp/pr-body.md
```
3. Output the PR URL and the draft file path.
## Common Pitfalls
- **Title format is enforced by CI** — a malformed title will block the PR. Always validate against the allowed modules and types listed above.
- **Don't force-push** unless the user explicitly asks.
- **Check for sensitive files** before committing — skip `.env`, credentials, large binaries and warn the user.Related Skills
veomni-uv-update
Use this skill when updating dependencies managed by uv: bumping a package version, upgrading the uv tool itself, updating torch/CUDA stack, switching transformers version, or regenerating the lockfile. Trigger: 'update dependency', 'bump version', 'upgrade uv', 'update torch', 'update lockfile', 'uv sync fails'.
veomni-review
Use this skill before committing ANY code change — this is a mandatory gate in the commit flow. Also trigger proactively when: you've made changes across multiple files and want to check consistency, you're unsure if a fix is safe, a change touches shared infrastructure (BaseTrainer, distributed, model loading, data pipeline), or a change is larger than a few lines. The review launches a subagent that checks implementation quality, multi-file consistency, and known constraint violations, then rates the change as safe/needs-attention/risky.
veomni-new-op
Use this skill when adding a new optimized kernel or operator to veomni/ops/. Covers the full lifecycle: understanding VeOmni's ops architecture (monkey-patch + global function pointer pattern), implementing the kernel, registering it, adding tests, and documenting it. Trigger: 'add op', 'new kernel', 'add attention variant', 'new fused op', 'add triton kernel', 'optimize operator'.
veomni-new-model
Use this skill when adding support for a new model to VeOmni. Covers the full lifecycle: analyzing the HuggingFace model, creating model patches, defining parallel plans, writing configs, integrating with the trainer, and testing. Trigger: 'add model', 'support new model', 'integrate <model_name>', 'new model support'.
veomni-develop
VeOmni-specific checklist for feature development and refactoring. Covers impact analysis across modalities, trainer hierarchy, data pipeline, and distributed code. Use before implementing any non-trivial change. For model-specific or ops-specific work, use veomni-new-model or veomni-new-op instead. Trigger: 'add feature', 'implement', 'refactor', 'reorganize', 'new capability'.
veomni-debug
Use this skill for ANY bug, error, crash, wrong output, loss divergence, gradient explosion, test failure, CUDA error, distributed training hang, checkpoint load failure, or unexpected behavior. Covers both quick fixes (clear root cause) and complex debugging (unclear cause). Trigger: 'fix bug', 'fix error', 'broken', 'crash', 'doesn't work', 'fails with', 'loss NaN', 'training hangs', 'FSDP error', 'OOM'.
create-pr
Alias for sentry-skills:pr-writer. Use when users explicitly ask for "create-pr" or reference the legacy skill name. Redirects to the canonical PR writing workflow.
create-issue-gate
Use when starting a new implementation task and an issue must be created with strict acceptance criteria gating before execution.
create-branch
Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.
create-tldr-page
Create a tldr page from documentation URLs and command examples, requiring both URL and command name.
create-spring-boot-kotlin-project
Create Spring Boot Kotlin Project Skeleton
create-specification
Create a new specification file for the solution, optimized for Generative AI consumption.