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

submit-branch

GitHub

将当前代码分支推送到远程仓库,并为目标仓库创建或复用 Pull Request。支持处理工作区状态检查、提交及 PR 创建流程,但不涉及测试、CI修复或合并操作。

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

Trigger Scenarios

用户要求提交分支 创建或复用 PR 发布工作成果为 PR

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/.agents/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.

Output

Report:

  • SUBMITTED — PR number, URL, and branch name
  • FAILED — what went wrong (dirty worktree, push conflict, gh error)

Does NOT

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

Version History

  • 377f600 Current 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/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/submit-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
74a36bbf
Indexed
2026-08-20 15:11

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