oss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-07-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- oss-pr
- description
- Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
03 SKILL.md 正文
OSS PR
Smart commit + PR workflow: branch management → quality checks → tests → commit → push → PR.
Announce at start: "Using oss-pr skill to commit and open a pull request."
Workflow
Step 0: Gather Info
git branch --show-current
git diff --name-only HEAD
git status --short
git config user.name
Branch rules:
- If already on a feature branch: proceed directly
- If on
mainormaster: auto-generate a branch name, create and switch immediately — no confirmation needed
Auto-generating a branch name:
Analyze the changed files from git diff --name-only HEAD to infer:
- type — pick one:
feat/fix/refactor/chorefeat: new user-facing functionalityfix: bug fixrefactor: restructuring without behavior changechore: config, scripts, skills, docs, deps
- slug — 2–3 lowercase words derived from the most relevant changed paths, joined by hyphens. Keep it short and specific.
Create branch {username}/{type}/{slug} directly and announce the name chosen.
Branch naming reference:
| Type | Example |
|---|---|
| feat | {prefix}/feat/dark-mode |
| fix | {prefix}/fix/crash-on-open |
| refactor | {prefix}/refactor/settings |
| chore | {prefix}/chore/update-deps |
Step 1: Quality Checks
| Command | Scope | Skip when |
|---|---|---|
bun run format |
.ts/.tsx/.css/.json/.md |
Never — always run |
bun run lint |
.ts/.tsx only |
No .ts/.tsx files changed |
bunx tsc --noEmit |
.ts/.tsx only |
No .ts/.tsx files changed |
Run in this order: format → lint → tsc.
- format → Auto-fixes silently (must run even for non-code files like
.md). - lint fails → Stop, report errors. Do not proceed.
- tsc fails → Stop, report errors. Do not proceed.
- All pass → Proceed to i18n check below.
i18n check (run if any src/renderer/, locales/, or src/common/config/i18n files are modified):
bun run i18n:types
node scripts/check-i18n.js
- i18n:types fails → Stop, report errors. Do not proceed.
- check-i18n exits 1 (errors) → Stop, report errors. Do not proceed.
- check-i18n exits 0 (warnings only) → Continue silently.
- No i18n-sensitive files changed → Skip both commands.
Step 2: Run Tests
bunx vitest run
- Fails → Stop, report failing tests. Do not proceed.
- Passes → Proceed silently.
Step 3: Commit
git status
git diff
Stage all modified files — including any files auto-fixed by format in Step 1:
git add -u
Generate commit message in English using conventional commits format: <type>(<scope>): <subject>.
NEVER include Co-authored-by or any AI attribution.
Step 4: Push Branch
git push -u origin <branch-name>
If push fails due to remote rejection, inform user. NEVER force-push without explicit approval.
Step 5: Create Pull Request
Run git log main..HEAD --oneline and git diff main...HEAD to understand all changes, then:
gh pr create --title "<pr-title>" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>
## Test plan
- [ ] <verification steps>
EOF
)"
PR title: under 70 characters, <type>(<scope>): <description> format. Reuse commit message if single commit.
NEVER add AI-generated signatures, Generated with, or Co-Authored-By lines.
Step 6: Post-PR
Output the PR URL when done.
Quick Reference
0. Check branch (create if on main)
1. bun run format (ALWAYS) && bun run lint && bunx tsc --noEmit (skip lint/tsc if no .ts/.tsx)
(if i18n files changed: bun run i18n:types && node scripts/check-i18n.js)
2. bunx vitest run
3. Commit (conventional commits, no AI attribution)
4. git push -u origin <branch>
5. gh pr create
6. Output PR URL
04 同仓库更多 Skills
团队周报
Use when generating structured weekly team reports from git commits, task boards, and meeting notes. Auto-aggregates work done, work planned, blockers, and metrics. Chinese output by default. Trigger on: weekly report, 周报, sprint review, 本周总结, team update, status report.
中英互译
Use when translating content between Chinese and English for business, technical, or marketing purposes. Handles docs, emails, UI strings, marketing copy, and technical documentation with domain-aware terminology. Trigger on: 翻译, translate, 中译英, 英译中, i18n, localization, English version, 中文版.
社媒规划
Use when planning, drafting, or scheduling social media content for WeChat Official Account, Twitter/X, and Xiaohongshu. Generates content calendars with platform-adapted copy, publishing schedules, and performance tracking. Trigger on: social media, 公众号, 推文, content calendar, 社媒, 发布计划.
项目任务看板
Use when managing team projects, tasks, or sprint tracking with a lightweight markdown kanban board. Create, update, assign, and track tasks across team members without external tools. Trigger on: task board, kanban, sprint planning, assign task, task status, project progress.
新人入职
Use when onboarding a new team member to the company, project, or development environment. Covers environment setup, account provisioning, access permissions, first-day tasks, and knowledge base orientation. Trigger on: onboarding, 入职, new employee, 新人, setup workstation, 环境配置, first day.
会议纪要
Use when recording, structuring, or extracting action items from team meetings. Creates standardized meeting minutes with decisions, action items with owners and deadlines, and follow-up tracking. Trigger on: meeting notes, 会议纪要, meeting minutes, 开会记录, standup notes, decision log, 会议记录.