Agent Skillsdartsim/dart › dart-pr

dart-pr

GitHub

用于在 DART 项目中创建分支、提交代码并发起 Pull Request。支持自动化工作流,遵循项目规范的 PR 标题与模板格式,并可参考近期合并的 PR 以保持风格一致。

.codex/skills/dart-pr/SKILL.md dartsim/dart

Trigger Scenarios

用户请求创建 DART 项目的 Pull Request 需要按照特定规范提交代码变更

Install

npx skills add dartsim/dart --skill dart-pr -g -y
More Options

Non-standard path

npx skills add https://github.com/dartsim/dart/tree/main/.codex/skills/dart-pr -g -y

Use without installing

npx skills use dartsim/dart@dart-pr

指定 Agent (Claude Code)

npx skills add dartsim/dart --skill dart-pr -a claude-code -g -y

安装 repo 全部 skill

npx skills add dartsim/dart --all -g -y

预览 repo 内 skill

npx skills add dartsim/dart --list

SKILL.md

Frontmatter
{
    "name": "dart-pr",
    "description": "DART PR: create a branch, commit, push, and open a DART pull request"
}

dart-pr

Use this skill in Codex to run the DART dart-pr workflow. The editable workflow source currently lives in .claude/commands/, and this generated Codex skill is a first-class Codex entrypoint.

Invocation

  • Claude Code/OpenCode: /dart-pr <arguments>
  • Codex: $dart-pr <arguments>

Treat the text after the skill name as $ARGUMENTS. When the workflow references $1, $2, etc., map those to the positional values supplied by the user.

Command Body

Prepare or open a DART pull request after explicit maintainer/user approval: $ARGUMENTS

Required Reading

@AGENTS.md @docs/onboarding/contributing.md @docs/onboarding/ai-tools.md @docs/onboarding/changelog.md @.github/PULL_REQUEST_TEMPLATE.md

Recent PR Patterns

When the expected PR style is unclear, inspect recently merged PRs before drafting the title or body:

gh pr list --repo dartsim/dart --state merged --base main --limit 10 \
  --json number,title,body,mergedAt

Use these practices:

  • Keep titles plain, scoped, and outcome-focused. Do not add agent prefixes.
  • Fill the PR template in DART's default order: Summary, Motivation / Problem, Changes / Key Changes, optional Before / After, Testing, Breaking Changes, and Related Issues / PRs. Keep Summary first because reviewers need the skimmable outcome before the rationale. If the motivation is necessary to understand the outcome, make the first Summary sentence problem-oriented, then keep the fuller why in Motivation / Problem rather than moving it above Summary.
  • Write Summary and Motivation for a user or downstream maintainer unfamiliar with the implementation: lead with what changes for them, what stays compatible, how they opt in or migrate, and why the evidence matters. Keep implementation mechanics in Changes unless they explain a user-visible outcome or risk.
  • When the change has user-facing API, workflow, behavior, or performance impact, add a concise ## Before / After section before Testing covering only relevant dimensions (public API, commands/workflows, behavior, migration, performance baseline). Phrase each row as a user-visible before/after, then name the mechanism as supporting context. For performance claims, name the baseline explicitly (CPU path, parent commit, main, or prior implementation) plus workload, metric, and limitations.
  • In Testing, list exact commands, targets, or test names that ran. For CI, performance, or infrastructure work, include evidence such as CI observations, timing, reruns, benchmark output, or why a skipped check is expected.
  • For rendering, model, mesh, texture, GUI, or visual-example changes, include a before/after visual comparison when practical:
    • Prefer an existing headless example path (--headless, --frames, --width, --height, --screenshot) over manual screenshots. Capture before and after with the same camera, dimensions, frame count, and renderer; restore the replaced sample/assets or use the base branch to capture the before image. Inspect the images yourself and include the commands and any software-rendering flags in the PR body.
    • Upload transient comparison images, GIFs, and videos through the GitHub PR/issue Markdown attachment flow so the body contains GitHub-hosted https://github.com/user-attachments/assets/... URLs. Do not commit transient visual evidence; commit visual files only when they are durable documentation, fixtures, or source assets.
    • The supported attachment flow is the web PR/issue editor; gh pr edit, gh pr comment, and the REST API do not provide a generic upload, and any command that edits or comments on a PR still requires explicit maintainer/user approval. If the current tool cannot upload attachments, keep the local artifact paths in the working note, ask a maintainer to upload them, then update the PR body with the returned URL after explicit maintainer/user approval. Do not fall back to committing evidence into docs/assets/.
    • If no headless path exists, add a narrowly scoped capture mode when it fits the example or document why visual comparison is not practical.
  • Mark non-applicable checklist items as "N/A" with a short reason, and mention related PRs, issues, backports, and follow-ups explicitly, including "None".

Workflow

  1. Inspect scope:

    git status --short --branch
    git diff --stat
    git diff --check
    
  2. Exclude unrelated dirty files unless the user explicitly includes them.

  3. Choose the target branch and milestone:

    Target Milestone
    main DART 7.0
    Active DART 6 LTS release-6.* Branch-matching DART 6.x patch
  4. For bug fixes, use the dual-PR flow: fix the active DART 6 LTS branch first, then cherry-pick or reapply to main.

  5. Before every commit, run pixi run lint. Also run pixi run build for C++ or Python changes and focused tests for behavior changes.

  6. Create or update a topic branch when needed:

    git checkout -b <type>/<topic> origin/<target-branch>
    
  7. Commit only intended files with a plain descriptive commit title.

  8. Merge the latest base branch into the PR branch before any push, and follow the base-merge and automated-review rules in docs/onboarding/ai-tools.md (no inline bot replies; @codex review re-triggers are throttled to one per approved review-fix round). Ask for explicit maintainer/user approval before pushing or opening the draft PR. After approval:

    git push -u origin HEAD
    gh pr create --draft --base <target-branch> --milestone "<milestone>" \
      --title "<plain title>" --body-file <filled-template-file>
    
  9. Prefer additive follow-up commits for updates to a published PR. Amend or force-push only after explicit maintainer/user approval and only when the user requests it or a clear reason exists (removing sensitive content, repairing branch history).

  10. Invoke the dart-changelog routine for the changelog decision, entry wording, and PR-link follow-up. If CHANGELOG.md needs the PR number, keep the follow-up changelog commit local until explicit maintainer/user approval is given for the additional push or PR update.

  11. Monitor CI: gh pr checks <PR_NUMBER>.

Output

  • Branch, target base, and milestone used
  • Commit titles and files included
  • PR URL and draft/ready state, or the prepared PR text awaiting approval
  • Changelog decision
  • CI status and any remaining blocker

Version History

  • e0d13fd Current 2026-07-05 10:38

Same Skill Collection

.claude/skills/dart-architecture/SKILL.md
.claude/skills/dart-build/SKILL.md
.claude/skills/dart-ci/SKILL.md
.claude/skills/dart-contribute/SKILL.md
.claude/skills/dart-io/SKILL.md
.claude/skills/dart-python/SKILL.md
.claude/skills/dart-references/SKILL.md
.claude/skills/dart-test/SKILL.md
.codex/skills/dart-analyze/SKILL.md
.codex/skills/dart-architecture/SKILL.md
.codex/skills/dart-audit-agent-compliance/SKILL.md
.codex/skills/dart-backport-pr/SKILL.md
.codex/skills/dart-benchmark-packet/SKILL.md
.codex/skills/dart-branch-cleanup/SKILL.md
.codex/skills/dart-build/SKILL.md
.codex/skills/dart-changelog/SKILL.md
.codex/skills/dart-ci/SKILL.md
.codex/skills/dart-close-issue/SKILL.md
.codex/skills/dart-contribute/SKILL.md
.codex/skills/dart-deps/SKILL.md
.codex/skills/dart-docs-update/SKILL.md
.codex/skills/dart-downstream-fix/SKILL.md
.codex/skills/dart-execute-packet/SKILL.md
.codex/skills/dart-fix-ci/SKILL.md
.codex/skills/dart-fix-issue/SKILL.md
.codex/skills/dart-io/SKILL.md
.codex/skills/dart-manage-pr/SKILL.md
.codex/skills/dart-mechanical-refactor/SKILL.md
.codex/skills/dart-new-task/SKILL.md
.codex/skills/dart-next/SKILL.md
.codex/skills/dart-plan-update/SKILL.md
.codex/skills/dart-python/SKILL.md
.codex/skills/dart-references/SKILL.md
.codex/skills/dart-release-merge-main/SKILL.md
.codex/skills/dart-release-packaging/SKILL.md
.codex/skills/dart-resume/SKILL.md
.codex/skills/dart-retrospect/SKILL.md
.codex/skills/dart-review-pr/SKILL.md
.codex/skills/dart-test/SKILL.md
.codex/skills/dart-triage-issue/SKILL.md

Metadata

Files
0
Version
e0d13fd
Hash
1e39599a
Indexed
2026-07-05 10:38

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-09 05:24
浙ICP备14020137号-1 $Гость$