用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill git-workflow命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | git-workflow |
| description | > Use when this capability is needed. |
Lifecycle: sync main → branch → [worktree if multi-agent] → atomic commits → PR → cleanup
Delegates to specialized skills where they exist. Uses bundled scripts for deterministic steps.
Announce at start: "Using git-workflow skill."
| Resource | Purpose |
|---|---|
scripts/start-work.sh | Sync remote main + create conventional branch |
scripts/pre-commit.sh | Detect test runner, run tests, show staged diff |
scripts/rebase-update.sh | Rebase on origin/main + push with --force-with-lease |
references/branch-naming.md | Prefix table, rules, multi-agent naming patterns |
references/pr-template.md | PR body template + full gh pr create example |
Run the start-work script. It syncs from remote main, stashes if dirty, and creates the branch:
bash scripts/start-work.sh <type> <description>
# e.g.: bash scripts/start-work.sh feat add-user-authentication
# bash scripts/start-work.sh fix token-expiry-check
Read references/branch-naming.md for the full prefix table and naming rules.
Worktree (multi-agent or parallel work): invoke using-git-worktrees skill. It handles isolation, project setup, and baseline tests. One branch per agent, one worktree per branch — never shared.
Rule: one commit = one logical change. If the subject line needs "and" to describe it, split the commit.
Good: "Add UserProfile model with validation" / "Fix null pointer in auth middleware" Bad: "Add profile model and fix auth bug" → split into two commits
"Atomic" ≠ tiny. A feature requiring model + migration + tests is one atomic change if they're inseparable.
Run the pre-commit script — it detects the test runner, runs tests, and shows staged diff:
bash scripts/pre-commit.sh
Then stage exactly what belongs in this commit:
git add <specific-files>
# or for partial file staging:
git add -p
Never git add . without reviewing what you're about to stage.
Invoke caveman-commit skill. Conventional Commits format.
Invoke finishing-a-development-branch skill. It handles the merge/PR decision, environment detection, and worktree cleanup.
For PR descriptions, read references/pr-template.md — it has the template and a full gh pr create heredoc example.
Key: PR summary bullets explain why something changed, not what — the diff already shows what.
Isolation rules:
Rebasing after others merge:
bash scripts/rebase-update.sh
Uses --force-with-lease (safe: rejects push if remote changed unexpectedly since last fetch).
Dependency ordering: if your work depends on another agent's PR, wait for it to merge, then rebase. Signal blocked state explicitly — comment on the blocking PR.
Avoiding conflicts: split work at module/file boundaries. Prefer smaller, focused PRs — they merge faster and conflict less.
Never:
start-work.sh fetches firstpre-commit.sh gates thisgit add . without reviewing staged contentmain or master--force instead of --force-with-lease on shared remotesAlways:
start-work.sh to begin any taskpre-commit.sh before every commitreferences/pr-template.md)Source: andersonbalves/folio — distributed by TomeVault.