create-pr
Rebase from the latest origin/main, squash branch commits, and create or update a GitHub pull request. Use when asked to prepare or create a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Rebase from the latest origin/main, squash branch commits, and create or update a GitHub pull request. Use when asked to prepare or create a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Capture a multi-step workflow into a timestamped pipeline memory after trial-and-error sessions. The core output is: (1) the final working commands saved as executable scripts (not bare shell commands), and (2) a structured markdown document separating the clean reproducible pipeline from the detours and pitfalls. Timestamped snapshots live in pipeline_memory/; mature pipelines can be promoted to PIPELINE.md and auto-loaded. Fully environment-agnostic — works for any project, any toolset, any domain. Use when the user finishes a multi-step task, says "保存工作流记忆", "save pipeline memory", "记录一下当前进展", or "/save-pipeline-memory". Takes an optional folder path.
Run Claude Code commands (including /insights, /doctor, custom prompts) via system crontab in non-interactive mode. Use when: (1) setting up daily/weekly automated Claude Code tasks, (2) scheduling reports or analysis via cron, (3) running Claude Code with third-party API backends (DeepSeek, Qwen, etc.) in headless environments, (4) "set up a daily report", "automate this in cron", "schedule insights". Covers: cron PATH setup, third-party API env vars for non-interactive mode, nvm/node auto-discovery, and wechat-reminder integration for notification delivery.
Use when the user wants to *learn* or *understand* a technical concept (an algorithm, a math derivation, an ML architecture, a systems internal) rather than just get a one-shot answer — triggers include "explain X", "teach me X", "help me understand X", or being stuck on a concept while reading a paper or code. Probe the user's level with a few questions FIRST, then teach interactively through a runnable Jupyter notebook with LaTeX derivations and small experiments.
Claudeception is a continuous learning system that extracts reusable knowledge from work sessions. Triggers: (1) /claudeception command to review session learnings, (2) "save this as a skill" or "extract a skill from this", (3) "what did we learn?", (4) After any task involving non-obvious debugging, workarounds, or trial-and-error discovery. Creates new Claude Code skills when valuable, reusable knowledge is identified.
Record a debugging session's findings into a timestamped markdown file under debug_experience/. Captures problem, root cause, solution, and key learnings in a structured, reusable format. Use when: you've just resolved a non-obvious bug, found an undocumented edge case, encountered an issue that took multiple attempts to fix, or when you say things like "保存调试经验", "save debug experience", "记录这次调试", "/save-debug-experience". Takes an optional folder path as argument.
MCP Notion工具使用指南,包含常见问题解决方案和最佳实践。使用当: (1) 访问Notion数据库view URL出现"URL type view not currently supported"错误, (2) 需要获取数据库schema和表结构信息, (3) 查询数据库中的条目内容, (4) 创建页面时MULTI_SELECT字段值不存在导致失败, (5) 需要更新数据库schema添加新选项, (6) 开发需要集成Notion数据的自动化工作流, (7) query_data_sources/query-database-view返回Business Plan要求错误, (8) 需要在无Business Plan的情况下枚举数据库所有条目。
| name | create-pr |
| description | Rebase from the latest origin/main, squash branch commits, and create or update a GitHub pull request. Use when asked to prepare or create a PR. |
Rebase from the latest origin/main, squash commits, and create a PR on GitHub with an
intelligent title and description.
$create-pr [--draft] [--base <branch>]
Arguments:
--draft: Create as draft PR--base <branch>: Target branch (default: main)# Check current branch
git branch --show-current
# Check if on main/master (should NOT be)
if [[ $(git branch --show-current) == "main" || $(git branch --show-current) == "master" ]]; then
echo "ERROR: Cannot create PR from main/master branch"
exit 1
fi
# Check for uncommitted changes
git status --short
# Ensure gh CLI is available
gh --version
Action: If there are uncommitted changes, stop, and then ask user to commit or stash them first.
# Check if PR already exists for current branch
gh pr view --json number,title,url 2>/dev/null || echo "No existing PR"
Handle Existing PR:
# Fetch latest from origin
git fetch origin main
# Check divergence
git log --oneline HEAD ^origin/main
# Non-interactive rebase onto origin/main
git rebase origin/main
Handle Conflicts: If rebase fails due to conflicts, abort and let user handle rebase manually:
# On rebase failure, abort automatically
git rebase --abort
# Inform user to resolve conflicts manually
echo "Rebase failed due to conflicts. Please resolve manually and retry $create-pr"
exit 1
After successful rebase, squash all commits since origin/main into a single commit:
# Count commits to squash
git rev-list --count origin/main..HEAD
# Soft reset to origin/main (keeps changes staged)
git reset --soft origin/main
# Generate commit message using $gen-commit-msg logic
# See ../gen-commit-msg/SKILL.md for message generation rules
Generate Commit Message (following $gen-commit-msg format):
Analyze staged changes:
git diff --cached --name-only
git diff --cached
Categorize changes (feat/fix/docs/refactor/test/chore/perf)
Determine scope from changed files (workflow/engine/reward/dataset/api/docs/etc.)
Generate message in format:
<type>(<scope>): <subject>
<body>
[Optional sections:]
Key changes:
- change 1
- change 2
Refs: #123, #456
Commit with generated message:
git commit -m "$(cat <<'EOF'
<generated commit message>
EOF
)"
After squashing into a single commit:
# Get all changes since origin/main
git diff origin/main...HEAD --name-only
# Get full diff content
git diff origin/main...HEAD
# Check commit history
git log --oneline origin/main..HEAD
Categorize Changes:
Follow same categorization as $gen-commit-msg:
| Type | When to Use |
|---|---|
feat | New feature or capability |
fix | Bug fix |
docs | Documentation only |
refactor | Code change without feature/fix |
test | Adding or fixing tests |
chore | Build, deps, config changes |
perf | Performance improvement |
Determine Scope:
Infer from changed files:
src/workflow/ → workflowsrc/engine/ → enginesrc/reward/ → rewardsrc/dataset/ → datasetsrc/api/ → apisrc/utils/ → utilssrc/infra/ → infradocs/ → docsexamples/ → examplesPR Title Format:
<type>(<scope>): <brief description>
Rules:
PR Description Format:
MUST strictly follow the GitHub PR template:
## Description
<!-- Clear and concise description of what this PR does -->
## Related Issue
<!-- Link to the issue this PR addresses -->
Fixes #(issue)
## Type of Change
<!-- Mark the relevant option with an 'x' -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test coverage improvement
## Checklist
<!-- Mark with 'x' what you've done -->
- [ ] I have read the [Contributing Guide](../CONTRIBUTING.md)
- [ ] I have run formatting tools (pre-commit or manual)
- [ ] I have run relevant unit tests and they pass
- [ ] I have added tests for new functionality
- [ ] I have updated documentation if needed
- [ ] My branch is up to date with main
- [ ] This PR introduces breaking changes (if yes, fill out details below)
- [ ] If this PR changes documentation, I have built and previewed it locally with `jb build docs`
- [ ] No critical issues raised by AI reviewers (`/gemini review`)
**Breaking Change Details (if applicable):**
<!-- Describe what breaks and how users should migrate -->
## Additional Context
<!-- Add any other context, screenshots, logs, or explanations here -->
How to Fill the Template:
[x][x], leave uncompleted as [ ]Show preview to user:
─────────────────────────────────────────────────
Branch: feat/vision-rlvr → main
PR Title:
feat(workflow): add vision support to ImageProcessing
PR Description:
## Description
Add ImageProcessingWorkflow for vision-language RL training. Supports image inputs
alongside text prompts and integrates with existing ImageProcessing pipeline.
## Related Issue
Fixes #789
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test coverage improvement
## Checklist
- [x] I have read the [Contributing Guide](../CONTRIBUTING.md)
- [x] I have run formatting tools (pre-commit or manual)
- [ ] I have run relevant unit tests and they pass
- [x] I have added tests for new functionality
- [x] I have updated documentation if needed
- [x] My branch is up to date with main
- [ ] This PR introduces breaking changes (if yes, fill out details below)
- [x] If this PR changes documentation, I have built and previewed it locally with `jb build docs`
- [ ] No critical issues raised by AI reviewers (`/gemini review`)
**Breaking Change Details (if applicable):**
N/A
## Additional Context
Requires Pillow>=10.0.0 for image processing.
Files changed:
- `src/workflow/image_processing.py`: New ImageProcessingWorkflow class
- `src/api/config.py:45`: Add image processing config fields
- `examples/vision_rlvr.py`: Example training script
- `docs/workflows/vision.md`: Documentation
─────────────────────────────────────────────────
Commands to execute:
1. git push -u origin feat/vision-rlvr
2. gh pr create --title "..." --body "..." [--draft]
─────────────────────────────────────────────────
Confirm with user, then execute:
# Force push branch to remote (required after squash)
git push -f -u origin $(git branch --show-current)
# Create or edit PR using gh CLI with GitHub template format
# If PR exists, use 'gh pr edit' instead of 'gh pr create'
if gh pr view &>/dev/null; then
# Update existing PR
gh pr edit \
--title "feat(workflow): add vision support to ImageProcessing" \
--body "$(cat <<'EOF'
[PR description here]
EOF
)"
else
# Create new PR
gh pr create \
--base main \
--title "feat(workflow): add vision support to ImageProcessing" \
--body "$(cat <<'EOF'
## Description
Add ImageProcessingWorkflow for vision-language RL training. Supports image inputs
alongside text prompts and integrates with existing ImageProcessing pipeline.
## Related Issue
Fixes #789
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test coverage improvement
## Checklist
- [x] I have read the [Contributing Guide](../CONTRIBUTING.md)
- [x] I have run formatting tools (pre-commit or manual)
- [ ] I have run relevant unit tests and they pass
- [x] I have added tests for new functionality
- [x] I have updated documentation if needed
- [x] My branch is up to date with main
- [ ] This PR introduces breaking changes (if yes, fill out details below)
- [x] If this PR changes documentation, I have built and previewed it locally with `jb build docs`
- [ ] No critical issues raised by AI reviewers (`/gemini review`)
**Breaking Change Details (if applicable):**
N/A
## Additional Context
Requires Pillow>=10.0.0 for image processing.
Files changed:
- `src/workflow/image_processing.py`: New ImageProcessingWorkflow class
- `src/api/config.py:45`: Add image processing config fields
- `examples/vision_rlvr.py`: Example training script
- `docs/workflows/vision.md`: Documentation
EOF
)"
fi
Add --draft flag if requested.
Capture PR URL and display to user:
✓ PR created/updated successfully!
https://github.com/example/project/pull/123
Changes: New dataset loader for MATH dataset
PR Title:
feat(dataset): add MATH dataset loader
PR Description:
## Description
Add MathDataset loader for mathematics problem solving with LaTeX rendering and
symbolic math parsing. Includes reward function for automatic answer verification
and full test coverage.
## Related Issue
Fixes #456
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test coverage improvement
## Checklist
- [x] I have read the [Contributing Guide](../CONTRIBUTING.md)
- [x] I have run formatting tools (pre-commit or manual)
- [x] I have run relevant unit tests and they pass
- [x] I have added tests for new functionality
- [x] I have updated documentation if needed
- [x] My branch is up to date with main
- [ ] This PR introduces breaking changes (if yes, fill out details below)
- [x] If this PR changes documentation, I have built and previewed it locally with `jb build docs`
- [ ] No critical issues raised by AI reviewers (`/gemini review`)
**Breaking Change Details (if applicable):**
N/A
## Additional Context
Dataset requires ~500MB download on first use. Added comprehensive test suite
covering all 12,500 problems with >95% reward function accuracy.
Files changed:
- `src/dataset/math.py`: New MathDataset class
- `src/scoring/math_scoring.py`: Symbolic math scoring function
- `examples/math_training.py`: Training script
- `docs/datasets/math.md`: Dataset documentation
- `tests/test_math_dataset.py`: Unit tests
Changes: Fix memory leak in ComputeEngine
PR Title:
fix(engine): resolve memory leak in ComputeEngine rollout
PR Description:
## Description
Fix memory leak during ComputeEngine rollout phase by clearing cached activations
after each batch and moving tensors to CPU before deletion. Reduces memory usage
by ~2GB per rollout iteration.
## Related Issue
Fixes #872
## Type of Change
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test coverage improvement
## Checklist
- [x] I have read the [Contributing Guide](../CONTRIBUTING.md)
- [x] I have run formatting tools (pre-commit or manual)
- [x] I have run relevant unit tests and they pass
- [x] I have added tests for new functionality
- [ ] I have updated documentation if needed
- [x] My branch is up to date with main
- [ ] This PR introduces breaking changes (if yes, fill out details below)
- [ ] If this PR changes documentation, I have built and previewed it locally with `jb build docs`
- [ ] No critical issues raised by AI reviewers (`/gemini review`)
**Breaking Change Details (if applicable):**
N/A
## Additional Context
Tested with 100 rollout iterations without OOM. Memory usage stable at 8GB
(previously would grow to 10GB+). Output correctness validated unchanged.
Backported to v0.5.x branch.
Files changed:
- `src/engine/compute.py:234`: Add explicit cache clearing
- `src/engine/compute.py:456`: Move tensor to CPU before deletion
- `tests/test_compute_memory.py`: Add memory leak regression test
Changes: Refactor reward API for better extensibility
PR Title:
refactor(reward): simplify reward function interface
PR Description:
## Description
Simplify reward function API from 4 methods to 2 by consolidating compute and
compute_batch into a single batched interface. Improves type hints and
documentation. All existing reward functions updated.
## Related Issue
Fixes #901
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test coverage improvement
## Checklist
- [x] I have read the [Contributing Guide](../CONTRIBUTING.md)
- [x] I have run formatting tools (pre-commit or manual)
- [x] I have run relevant unit tests and they pass
- [ ] I have added tests for new functionality
- [x] I have updated documentation if needed
- [x] My branch is up to date with main
- [x] This PR introduces breaking changes (if yes, fill out details below)
- [x] If this PR changes documentation, I have built and previewed it locally with `jb build docs`
- [ ] No critical issues raised by AI reviewers (`/gemini review`)
**Breaking Change Details (if applicable):**
Old `compute_batch` method is deprecated and will be removed in v0.7.0.
See migration guide in `docs/migration/reward_api.md` for details.
## Additional Context
All existing tests pass. Performance unchanged at 10k rewards/sec. Backward
compatibility warnings added for deprecated methods.
Files changed:
- `src/api/scoring_api.py:12`: Consolidate compute/compute_batch
- `src/scoring/math_scoring.py`: Update to new API
- `src/scoring/code_scoring.py`: Update to new API
- `src/scoring/geometry_scoring.py`: Update to new API
- `docs/customization/reward.md`: Update documentation
- `docs/migration/reward_api.md`: Migration guide
- `examples/custom_reward.py`: Update example
If rebase fails:
git rebase --abortIf squash/commit fails:
git statusgit diff --cachedIf force push fails:
gh auth statusIf gh pr create or gh pr edit fails:
gh pr viewgh auth statusBefore Starting:
git branch backup/$(git branch --show-current)-$(date +%s)Before Rebase:
Before Squash:
Before Force Push:
Before PR Creation/Update: