do-pr
Create a pull request with proper formatting and pre-merge checks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a pull request with proper formatting and pre-merge checks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement a GitHub issue in aurora_uix, an Elixir/Phoenix low-code UI generation library with Ash and Ecto backends, following an enriched spec produced by improve-issue. Use this skill when the user says "implement the issue", "code this up", "start coding", or provides an enriched spec from improve-issue. Also triggers on "fix the gaps", "address the review findings", or "retry with these requirements" — in those cases the gaps live in the review-gaps marker block of the issue body. Always write tests alongside implementation.
Evaluate an already-enriched GitHub issue and recommend whether to keep it as-is (with a model-tier recommendation), declare it already completed, or split it into smaller children. Use when the user says "evaluate this issue", "is this issue too big", "should we split this", "size this issue", "which model should code this", or before kicking off orchestrate-issue on a heavy spec. Requires improve-issue to have been run first — this skill does NOT enrich specs and does NOT modify code. Read-mostly: the only write is an idempotent issue-evaluation marker block on the issue body.
Run `mix consistency` and fix issues. Mechanical issues are fixed in place; refactor-class issues produce a plan for user approval instead of being attempted.
Enrich and clarify a GitHub issue before any coding begins. Use this skill whenever a user says "work on issue", "implement issue", "fix issue", "start from a GitHub issue", or pastes issue text/URL. Always run this FIRST before code-issue — it produces the structured spec that code-issue consumes. Also trigger when the user says "improve issue description" or "clarify requirements".
Review and score the implementation produced by code-issue against the enriched spec from improve-issue. Use this skill when the user says "review the implementation", "check completeness", "validate coverage", or after code-issue finishes. Runs the project quality gate (mix consistency + mix test), produces a scored report, and writes outstanding gaps into the issue body marker block so code-issue Mode B can pick them up. Always run after code-issue, before deciding the issue is done.
Rules to use when documenting elixir code
| name | do-pr |
| description | Create a pull request with proper formatting and pre-merge checks |
Create a pull request for the current branch. Run every step in order. If a step fails, stop and report — do NOT proceed to later steps.
main:
git rev-parse --abbrev-ref HEAD must NOT print main. Stop if it does.Do NOT require a clean working tree here — Step 2's gate commits any remaining
working-tree changes into conventional commits.
Invoke the gate skill via the Skill tool. If it stops with unresolved errors, do NOT continue — report the errors to the user and stop.
Run 'mix test' if any error, report the errors and ask the user if the task should continue
Push is mandatory on every invocation, including re-runs where the PR already exists — the PR description is built from local commits, so origin must carry them first.
git push -u origin <current-branch>
Then confirm the branch is fully pushed — these two SHAs must be equal:
git rev-parse HEAD
git rev-parse origin/<current-branch>
If push fails or the SHAs differ, stop and report. Never use --force or
--no-verify.
Apply these rules to the current branch name:
<username>/ or <username>- prefix (everything up to and including the first / or -).365/…), strip it too — including its trailing / or -.- or _). If it matches one of feat|fix|build|refactor|docs|chore|test|perf, use it as <type> and remove it. Otherwise default <type> to feat.- and _ with spaces. This is <description>.<type>: <description>.Examples:
federico/365/name-fields-components → feat: name fields componentsfederico/338/refactor-rename-table → refactor: rename tablefederico/implement_user_profile → feat: implement user profilefedericoalcantara-fix-login-bug → fix: login bugfederico/refactor_auth → refactor: authWrite a prose Summary that describes the change — not the commit log. Do NOT copy commit subjects verbatim; a reviewer who has not seen the commits must be able to understand the PR from the body alone.
Gather context from the diff, not just the subjects:
git log main..HEAD --pretty=format:"%s" — commit subjects, for orientation only.git diff main...HEAD --stat — files touched and overall scope.ai: update skill files tells a reviewer nothing).Write the Summary as 3–6 bullets:
Good vs. bad bullets:
❌ - ai: update do-pr and pr-from-issue skill files
✅ - Rewrites `do-pr` Step 6 so PR summaries are prose derived from the diff
instead of copied commit subjects, and drops the boilerplate Test plan section
Wrap the generated content in the managed-region markers. These two visible
blockquote lines delimit the block do-pr owns; reviewers add their own notes
outside them and a later re-run refreshes only what is between them (see
Step 7). Compose the whole block into a body file (git status is clean, so use
the scratchpad or a temp file):
> 🤖 **GENERATED-DESCRIPTION:START** — auto-generated; edit above or below, never inside.
## Summary
- <prose bullet 1>
- <prose bullet 2>
- ...
> 🤖 **GENERATED-DESCRIPTION:END**
Optional issue reference. If a caller (e.g. the pr-from-issue skill) invokes
this skill with an issue number <n>, add a blank line and Closes #<n> inside
the block, right before the GENERATED-DESCRIPTION:END marker. When no issue
number is passed, do not add a Closes line.
Sync guard (both paths). The PR body describes local commits, so the branch
must be fully pushed before it is written. Run git push -u origin <current-branch>, then verify git rev-parse HEAD equals git rev-parse origin/<current-branch>. If they differ, stop — do NOT create or update the PR.
Check whether the branch already has a PR: gh pr view --json url.
The body is the marker-wrapped block from Step 6 (the whole body file). Then:
gh pr create --base main --title "<title>" --body-file <body-file>
Print the PR URL returned by gh.
Refresh only the text between the markers, preserving everything a reviewer
wrote above GENERATED-DESCRIPTION:START or below GENERATED-DESCRIPTION:END.
gh injects):
gh pr view --json body --jq .body | tr -d '\r' > live_body
grep -qF 'GENERATED-DESCRIPTION:START' live_body \
&& grep -qF 'GENERATED-DESCRIPTION:END' live_body
awk '/GENERATED-DESCRIPTION:START/{exit} {print}' live_body > prefix # before START
awk 'p{print} /GENERATED-DESCRIPTION:END/{p=1}' live_body > suffix # after END
block (fresh Summary from the
current commits, wrapped in both markers).cat prefix block suffix > new_body
gh pr edit --body-file new_body
Report "description refreshed" and print the PR URL.git push --force / --force-with-lease--no-verify on any git commandmix consistency failGENERATED-DESCRIPTION marker is absentGENERATED-DESCRIPTION markers, or the PR titleHEAD is ahead of
origin/<current-branch> (unpushed commits)