Agent Skills › mermaid-js/zenuml-core › submit-branch

submit-branch

GitHub

将当前分支推送至 mermaid-js/zenuml-core 仓库并创建或复用 PR。处理工作区状态检查、提交、推送及 PR 创建,并自动调用 babysit-pr 监控 CI。

.claude/skills/submit-branch/SKILL.md mermaid-js/zenuml-core

Trigger Scenarios

submit create PR push and PR open a pull request submit branch

Install

npx skills add mermaid-js/zenuml-core --skill submit-branch -g -y
More Options

Non-standard path

npx skills add https://github.com/mermaid-js/zenuml-core/tree/main/.claude/skills/submit-branch -g -y

Use without installing

npx skills use mermaid-js/zenuml-core@submit-branch

指定 Agent (Claude Code)

npx skills add mermaid-js/zenuml-core --skill submit-branch -a claude-code -g -y

安装 repo 全部 skill

npx skills add mermaid-js/zenuml-core --all -g -y

预览 repo 内 skill

npx skills add mermaid-js/zenuml-core --list

SKILL.md

Frontmatter
{
    "name": "submit-branch",
    "description": "Push the current branch and create or reuse a PR on mermaid-js\/zenuml-core. Use when the user says \"submit\", \"create PR\", \"push and PR\", \"open a pull request\", \"submit branch\", or wants to publish their work as a PR without merging. Does not fix CI or merge — those are separate skills."
}

Submit Branch

Publish the current branch as a pull request on mermaid-js/zenuml-core. Reuses an existing PR if one already exists for this branch.

Preconditions

The worktree must be in a committable state:

  • Clean worktree — nothing to commit, just push. This is the ideal case.
  • Scoped changes — all modified files relate to the current work. Stage and commit them.
  • Mixed/unrelated changes — modified files include unrelated work. Stop and ask the user which files to include. Never auto-commit a mixed worktree.

To check: git status and review the file list. If in doubt, ask.

Steps

1. Check worktree state

git status

If dirty, evaluate whether changes are scoped (all related to the branch's purpose) or mixed. If mixed, stop and ask.

If scoped, stage the relevant files and commit with a descriptive message. Follow the repo's commit conventions (one-line message, Co-Authored-By trailer).

2. Push

git push -u origin <branch-name>

Use regular push — never force-push. If push fails due to upstream changes, report the conflict and stop.

3. Create or reuse PR

Check if a PR already exists:

gh pr view --json number,title,url 2>/dev/null

If a PR exists, report its URL and stop — nothing more to do.

If no PR exists, create one:

gh pr create --title "<concise title>" --body "$(cat <<'EOF'
## Summary
<bullet points>

## Test plan
<what was tested>
EOF
)"

The PR targets main on mermaid-js/zenuml-core.

4. Hand off to babysit-pr — always

A push starts a CI run. Invoke /babysit-pr with the PR number immediately, in the same turn, without asking first. Reporting the PR URL and stopping is not finishing this skill: it leaves a run nobody is watching, and the user then has to type "babysit pr" to get what the push already implied.

This applies to every push, including one that only adds a commit to an existing PR. The one exception is /ship-branch, which invokes babysit-pr itself as its next step — do not run it twice.

Output

Report:

  • SUBMITTED — PR number, URL, and branch name, then the babysit-pr result
  • FAILED — what went wrong (dirty worktree, push conflict, gh error)

Does NOT

  • Run tests or lint (use /validate-branch for that)
  • Merge the PR (use /land-pr for that)

Version History

  • 8c049b0 Current 2026-09-23 06:16

    新增逻辑:在每次推送后自动调用 /babysit-pr 技能以监控 CI 运行,无需用户再次手动触发。

  • 377f600 2026-08-20 15:11

Same Skill Collection

.agents/skills/babysit-pr/SKILL.md
.agents/skills/dia-scoring/SKILL.md
.agents/skills/propagate-core-release/SKILL.md
.agents/skills/ship-branch/SKILL.md
.agents/skills/submit-branch/SKILL.md
.agents/skills/validate-branch/SKILL.md
.claude/skills/babysit-pr/SKILL.md
.claude/skills/dia-scoring/SKILL.md
.claude/skills/emoji-eval/SKILL.md
.claude/skills/propagate-core-release/SKILL.md
.claude/skills/ship-branch/SKILL.md
.claude/skills/validate-branch/SKILL.md
.claude/skills/zenuml-ux-research/SKILL.md
skills/dia-scoring/SKILL.md
.claude/skills/snapshot-visual-check/SKILL.md

Metadata

Files
0
Version
fb11b8e
Hash
5963cd10
Indexed
2026-08-20 15:11

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