跳到正文
cccskills
免费在 GitHub 公开

pr-create

Proactively draft and create pull requests by inferring title, refs, and body from git context, then confirm and open via gh CLI.

中文简介正在准备中。当前显示原文说明。

集成工具JiraGitHub
查看安装方法

包含的文件(2)

  • SKILL.md5.4 KB
  • assets/pr-description.template1.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

What I do

I take ownership of PR authoring end-to-end:

  1. Auto-draft a semantic PR title from branch name, commit history, and diff intent.
  2. Auto-extract issue references from branch name and commit messages (Jira, GitHub issues, and common refs patterns).
  3. Auto-generate a complete PR body with summary, grouped changes, test plan, and risk/rollout notes.
  4. Ask for confirmation only (or ask only for missing issue ID when no reference is detected).
  5. Create the PR with gh pr create after explicit user approval.

The default outcome is an opened GitHub PR (not just a draft message), unless you choose to edit before creation.

Supporting files in this skill:

  • assets/pr-description.template — Markdown structure used when composing the final body

When to use me

Use when you want to:

  • Open a PR quickly with minimal back-and-forth prompts
  • Let the agent propose title/body instead of asking you to write sections manually
  • Reuse issue references already present in branch names or commits
  • Keep PRs consistent with semantic/conventional title style and clear test plans

PR lifecycle focus

Stage: Authoring and opening a PR (before review starts).

Use Instead [if available]

  • Use pr-self-review when the PR draft is ready and you want an author checklist before requesting review.
  • Use pr-split when the main question is PR size/scope and whether to split.
  • Use github-pull-request-handling when review threads already exist and you need to resolve/reply to comments.

Example usage

"Help me write a PR for this feature" "Create the PR from this branch, you choose title/body" "Open a PR and infer ticket refs from commits" "Draft everything, show me once, then create with gh if I approve"


Workflow

Here is the default execution flow (agent-led, low-friction):

Step 1: Collect git context automatically

Gather context without asking the user for manual inputs first:

  • Current branch name
  • Commit list since base branch (main/master or configured default)
  • Diff summary (key files or areas changed)
  • Existing remote tracking state

Step 2: Extract issue refs from branch and commits

Parse issue identifiers from branch names and commit messages. Prefer existing refs over asking the user.

Common patterns to detect:

[A-Z][A-Z0-9]+-\d+        # Jira style, e.g. PROJ-123
#\d+                      # GitHub issue shorthand, e.g. #456
(?:fixes|closes|refs)\s+#?\d+   # commit trailer style refs

Examples:

  • PROJ-123-feature-name -> PROJ-123
  • commit message fix(auth): handle timeout (refs #812) -> #812
  • commit message closes #991 -> #991

If no reference is found, ask one focused question:

  • "No issue reference found in branch/commits. Add one now (e.g., PROJ-123 or #456), or continue without refs?"

Step 3: Propose PR title automatically

Generate one best-guess semantic title using:

<type>(<scope>): <subject>

Where:

  • type is one of: feat, fix, chore, ci, deploy, docs, improvement, refactor, test
  • scope (optional) describes the area affected (e.g., auth, api, ui)
  • subject is imperative and concise (<72 chars preferred)

Step 4: Build complete PR body automatically

Produce a ready-to-submit body with:

  • ## Summary (1-3 outcome-focused bullets)
  • ## Changes (grouped by area or subsystem)
  • ## Test plan (actual commands run and/or manual verification steps)
  • ## Risk / rollout (risks, migration notes, rollback hints when relevant)
  • Refs: ... line when an issue reference is available

Do not ask the user to write these sections first. Draft them from repository context, then let the user edit/approve.

Step 5: Ask for confirmation (single checkpoint)

Show the proposed title + body and ask:

  • "Create this PR now with gh pr create?"

Only ask additional questions if required information is truly missing (for example, no issue ref found and project requires one).

Step 6: Create PR via gh on explicit approval

After clear approval:

  1. Ensure branch is pushed (push with upstream if needed)
  2. Run gh pr create --title ... --body ... (use HEREDOC for body)
  3. Return PR URL immediately

If the user does not approve, stop after sharing the draft and wait for edits.


Behavior rules (important)

  • Default to proactive drafting, not questionnaires.
  • Ask the fewest possible follow-up questions.
  • Never create remote artifacts (PR) without explicit user confirmation.
  • Prefer repository evidence (branch, commits, diff) over user memory.
  • Keep output concise but complete enough for reviewer handoff.

PR description structure

Use this structure for the generated body:

## Summary
- (1–3 bullets describing what changed and why)

## Changes
- (group by area: `python/`, `infra/`, `service/`, etc.)

## Test plan
- [ ] (exact commands you ran or manual steps you completed)

## Risk / rollout
- (optional) Risks, staging notes, rollback instructions

Always include Refs: <ticket> when possible (Jira, Linear, GitHub issue). If there are breaking changes, include migration notes in Risk / rollout.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Implement comprehensive error handling for Python code paths to keep services resilient and user-friendly. Use when failures are currently silent or exceptions leak through.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月19日 更新

Tabular and numerical data analysis with descriptive statistics and insights. Use when the user provides data, tables, CSVs, or numbers and wants analysis.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月19日 更新

Financial factsheet analysis with key metrics extraction and investment rationale

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月19日 更新

ci-fix

免费

Diagnose and fix CI failures without leaving your editor.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月19日 更新

Reproduce ai-repo PR checks locally with Poe and CI scripts, including per-package typecheck and coverage behavior. Use when validating changes before push or when user asks which local commands match CI.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月19日 更新

Ask clarifying questions before implementing to ensure Python requirements are understood. Use when a task lacks detail, dependencies are unclear, or multiple interpretations are possible.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月19日 更新

查看 Unique-AG 的全部技能

报告此技能的问题