跳到主要内容
知仓学习社ZHICANG

branch-pr

Create Gentle AI pull requests with issue-first checks. Trigger: creating, opening, or preparing PRs for review.

不碰外部(只输出文字)无严重或高危命中Gentleman-Programming/gentle-ai

它会碰到什么

扫了多少1 个文本文件,5 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

When to Use

Use this skill when:

  • Creating a pull request for any change
  • Preparing a branch for submission
  • Helping a contributor open a PR

Critical Rules

  1. Every PR MUST link an approved issue — no exceptions
  2. **Every PR MUST have exactly one type: label*
  3. Automated checks must pass before merge is possible
  4. Blank PRs without issue linkage will be blocked by GitHub Actions

Workflow

1. Verify issue has `status:approved` label
2. Create branch: type/description (see Branch Naming below)
3. Implement changes with conventional commits
4. Run shellcheck on modified scripts
5. Open PR using the template
6. Add exactly one type:* label
7. Wait for automated checks to pass

Branch Naming

Branch names MUST match this regex:

^(feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)\/[a-z0-9._-]+$

Format: type/description — lowercase, no spaces, only a-z0-9._- in description.

| Type | Branch pattern | Example |

|------|---------------|---------|

| Feature | feat/<description> | feat/user-login |

| Bug fix | fix/<description> | fix/zsh-glob-error |

| Chore | chore/<description> | chore/update-ci-actions |

| Docs | docs/<description> | docs/installation-guide |

| Style | style/<description> | style/format-scripts |

| Refactor | refactor/<description> | refactor/extract-shared-logic |

| Performance | perf/<description> | perf/reduce-startup-time |

| Test | test/<description> | test/add-setup-coverage |

| Build | build/<description> | build/update-shellcheck |

| CI | ci/<description> | ci/add-branch-validation |

| Revert | revert/<description> | revert/broken-setup-change |


PR Body Format

The PR template is at .github/PULL_REQUEST_TEMPLATE.md. Every PR body MUST contain:

1. Linked Issue (REQUIRED)

Closes #<issue-number>

Valid keywords: Closes #N, Fixes #N, Resolves #N (case insensitive).

The linked issue MUST have the status:approved label.

2. PR Type (REQUIRED)

Check exactly ONE in the template and add the matching label:

| Checkbox | Label to add |

|----------|-------------|

| Bug fix | type:bug |

| New feature | type:feature |

| Documentation only | type:docs |

| Code refactoring | type:refactor |

| Maintenance/tooling | type:chore |

| Breaking change | type:breaking-change |

3. Summary

1-3 bullet points of what the PR does.

4. Changes Table

| File | Change |
|------|--------|
| `path/to/file` | What changed |

5. Test Plan

- [x] Scripts run without errors: `shellcheck scripts/*.sh`
- [x] Manually tested the affected functionality
- [x] Skills load correctly in target agent

6. Contributor Checklist

All boxes must be checked:

  • Linked an approved issue
  • Added exactly one type:* label
  • Ran shellcheck on modified scripts
  • Skills tested in at least one agent
  • Docs updated if behavior changed
  • Conventional commit format
  • No Co-Authored-By trailers

Automated Checks (all must pass)

| Check | Job name | What it verifies |

|-------|----------|-----------------|

| PR Validation | Check Issue Reference | Body contains Closes/Fixes/Resolves #N |

| PR Validation | Check Issue Has status:approved | Linked issue has status:approved |

| PR Validation | Check PR Has type: Label | PR has exactly one type: label |

| CI | Shellcheck | Shell scripts pass shellcheck |


Conventional Commits

Commit messages MUST match this regex:

^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([a-z0-9\._-]+\))?!?: .+

Format: type(scope): description or type: description

  • type — required, one of: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
  • (scope) — optional, lowercase with a-z0-9._-
  • ! — optional, indicates breaking change
  • description — required, starts after :

Type-to-label mapping:

| Commit type | PR label |

|-------------|----------|

| feat | type:feature |

| fix | type:bug |

| docs | type:docs |

| refactor | type:refactor |

| chore | type:chore |

| style | type:chore |

| perf | type:feature |

| test | type:chore |

| build | type:chore |

| ci | type:chore |

| revert | type:bug |

| feat! / fix! | type:breaking-change |

Examples:

feat(scripts): add Codex support to setup.sh
fix(skills): correct topic key format in sdd-apply
docs(readme): update multi-model configuration guide
refactor(skills): extract shared persistence logic
chore(ci): add shellcheck to PR validation workflow
perf(scripts): reduce setup.sh execution time
style(skills): fix markdown formatting
test(scripts): add setup.sh integration tests
ci(workflows): add branch name validation
revert: undo broken setup change
feat!: redesign skill loading system

Commands

# Create branch
git checkout -b feat/my-feature main

# Run shellcheck before pushing
shellcheck scripts/*.sh

# Push and create PR
git push -u origin feat/my-feature
gh pr create --title "feat(scope): description" --body "Closes #N"

# Add type label to PR
gh pr edit <pr-number> --add-label "type:feature"

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 6,884
本站分层T1
该仓技能数37
原文件路径internal/assets/skills/branch-pr/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 37 个技能