跳到正文
cccskills
免费在 GitHub 公开

create-pr

Create or update a GitHub PR for this Flutter repository using gh CLI. Verifies the work with build-verify and pr-review, generates an inline PR description, commits pending changes when approved, pushes, and opens or updates the PR. Supports stacked PRs by asking for the base branch when detection is ambiguous. Use when the user says "create PR", "open PR", "push PR", or wants to submit their work for review.

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

集成工具GitHub
查看安装方法

包含的文件(1)

  • SKILL.md6.2 KB

SKILL.md(原文)

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

Flutter Template Create Pull Request

Create or update a GitHub PR for the current branch. This workflow may commit and push, so ask before changing branches, committing, or pushing unless the user's request already clearly authorizes those actions.

Read First

  • AGENTS.md
  • docs/PROJECT_OVERVIEW.md
  • docs/PROJECT_GUIDELINES.md
  • git status
  • relevant task docs under .claude/tasks/, when present

Step 1: Collect PR Metadata

If the user did not provide these when invoking the skill, ask before proceeding:

  1. Type of work: one of chore, feat, fix, refactor
  2. Ticket number: e.g. MOB-120, or confirm that there is no ticket
  3. Short description: plain-English summary for the commit and PR title

Step 2: Decide Branch And Base

This repo may use stacked PRs. The PR base is the branch the current branch should merge into, which is not always the default branch.

Try to detect the parent branch:

git show-branch --all 2>/dev/null \
  | grep '\*' \
  | grep -v "$(git rev-parse --abbrev-ref HEAD)" \
  | head -1 \
  | sed 's/.*\[\(.*\)\].*/\1/' \
  | sed 's/[\^~].*//'

Alternative: use git log --format=%D HEAD --decorate and pick the nearest branch that is not HEAD.

If detection fails or is ambiguous, ask the user which branch this PR should target.

Ask whether to create a new branch or push the current branch unless the user already made that clear:

Should I create a new branch for these changes, or push to the current branch <current>? The PR will target <detected-or-confirmed-base>.

If creating a new branch, ask for the branch name or derive one from <type>/<ticket>/<slug>.

Step 3: Verify Build And Review

Run the build-verify skill:

.claude/skills/build-verify/scripts/verify.sh

It runs the Flutter verification suite for this repo: dependency sync, code generation when needed, analyzer, tests, iOS and Android native builds when in scope, and formatting. If it fails, fix the root cause and re-run before continuing.

After build verification passes, run pr-review uncommitted if it has not already been run for the current diff. Address IMPORTANT findings before continuing. If addressing findings changes code, rerun build-verify before continuing to the commit step.

Step 4: Include Task Documentation

Stage and commit relevant files under .claude/tasks/ when they describe the implemented feature, including prd.md, techspec.md, tasks.md, and individual task files. These are part of the deliverable and should not be left untracked when they document the PR's work.

If the implementation diverged from the original plan, update task docs only if the user or project workflow expects docs to reflect the final implementation. Do not rewrite PRD or tech spec casually during PR creation.

Step 5: Generate PR Description Inline

Compose the PR body in memory and pass it directly to gh. Never write pr_description.md or any other temporary PR body file to disk.

Analyze the changes against the confirmed base branch:

git diff --stat <base>...HEAD
git log <base>..HEAD --oneline

Use this format when sections apply:

## New Features
- <one short, plain-English bullet describing a user-visible capability>

## Improvements
- <one short bullet per user-visible improvement>

## Refactor
- <one short bullet per architectural or internal cleanup>

## Fixes
- <one short bullet per fixed issue>

## Chores
- <one short bullet per non-user-facing maintenance change>

## Screenshot
<TODO: paste screenshot or remove the section>

For small PRs, skip section headers and write 1-3 concise bullets plus ## Screenshot when appropriate.

Style:

  • One sentence per bullet.
  • High-level, not file-by-file.
  • Light on jargon. Type names, file paths, provider names, generated route names, and DTO names belong in the diff, not the PR body.
  • Keep it to roughly 3-6 bullets.
  • Do not include test plans, checklists, screenshots, or architecture deep dives.

Step 6: Commit Pending Changes

Run git status to check for uncommitted changes. If there are pending changes and the user approved committing, stage the intended files and create a commit.

Commit message format:

<type>(<ticket>): <short description>

If there is no ticket:

<type>: <short description>

Example:

feat(MOB-120): add profile detail screen

Add co-author trailers only when the project or user explicitly asks for them.

Step 7: Push Branch

Push the current branch to remote when the user approved pushing:

git push -u origin HEAD

Step 8: Create Or Update PR

Create the PR with the confirmed base branch:

gh pr create --title "<title>" --body "$(cat <<'EOF'
<pr body here>
EOF
)" --base "<base-branch>" --assignee @me

If a PR already exists for this branch, update it:

gh pr edit --title "<title>" --body "$(cat <<'EOF'
<pr body here>
EOF
)" --base "<base-branch>"

Title format:

<type>: <ticket> <short description>

Example:

feat: MOB-120 add profile detail screen

If there is no ticket, omit it from the title.

Step 9: Report Result

Output:

  • PR URL
  • base branch
  • verification summary
  • commit hash, if a commit was created
  • push status

Rules

  • Use fvm, make gen, build-verify, and pr-review; do not run KMP, Gradle, Spotless, Detekt, Tuist, SwiftLint, or SwiftFormat checks from this workflow.
  • Do not write a PR description file to disk.
  • Do not hand-edit generated files to make verification pass.
  • Do not omit .claude/tasks/ docs when they describe the implemented feature.
  • Do not push or create a PR if verification or IMPORTANT review findings remain unresolved, unless the user explicitly asks to publish a draft with known issues.

评价

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

评论

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

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

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

0 / 1000 字

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

同一仓库的技能

Build/test/lint verification pass for this Flutter app — runs codegen, analyze, test, then iOS + Android native builds in parallel, then `dart format`. Does NOT commit anything; leaves the working tree dirty so the user can review and commit on demand. Used at the end of the prd → techspec → tasks → implement-tasks-sequence flow before `pr-review`, and can also be invoked manually when the user says "verify build", "run full verification", or "check everything".

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

strvcom/flutter-template242026年6月18日 更新

Build a full feature in this Flutter repository that includes backend or storage data flow: read API schema, create DTOs, map DTOs to entities, add Riverpod use cases, connect feature state, and render UI data. Use when a task goes beyond a screen and needs real data integration.

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

strvcom/flutter-template242026年6月18日 更新

Create a new Flutter screen in this repository using the existing feature structure, AutoRoute setup, Riverpod state pattern, and code generation workflow. Use when adding a new page, route, stateful screen, or feature folder in this template.

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

strvcom/flutter-template242026年6月18日 更新

implement

免费

Implement a single Flutter task following this repository's Riverpod, Freezed, AutoRoute, DTO/entity, codegen, and verification conventions. Reads the task definition, PRD, and tech spec, then executes the implementation. When invoked standalone, verifies the change; when invoked by implement-tasks-sequence, writes code only and leaves verification to start-job/build-verify. Use when the user says "implement task X", "work on task X", or wants to execute a specific task from the task list.

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

strvcom/flutter-template242026年6月18日 更新

Orchestrates implementation of all tasks for a feature using an agent team. Respects task dependencies, runs tasks in correct order, parallelizes independent tasks. Does NOT build, run tests, or commit at any point — verification is delegated to the caller (typically `/start-job`, which runs `build-verify` and `pr-review uncommitted` afterwards). Use when the user says "implement all tasks", "run the task sequence", "implement the feature", or wants to execute multiple tasks from a task list end-to-end.

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

strvcom/flutter-template242026年6月18日 更新

Diagnose and fix Flutter layout, overflow, unbounded constraint, scroll, and responsive rendering issues in this repository while preserving the template's existing feature, theme, localization, and shared widget patterns. Use when UI overflows, text clips, widgets disappear, layouts fail on mobile/tablet/desktop, or a feature needs responsive behavior.

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

strvcom/flutter-template242026年6月18日 更新

查看 strvcom 的全部技能

报告此技能的问题