用 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. |
Two modes: Commit (daily, ~90% of use) and Setup (one-time config). Detect which one the user needs from context and jump straight in.
Run in parallel:
git status --short
git diff HEAD
git log --oneline -5
Group changed files by concern. For each group:
Split decision:
| Single commit | Split into multiple |
|---|---|
| Same type AND scope | Mixed types (feat + fix) |
| ≤3 files | Mixed scopes (auth + billing) |
| ≤50 lines total diff | >10 files across unrelated areas |
| Splitting would break intermediate state | Deps mixed with code changes |
| Formatting mixed with logic changes |
Format: emoji type(scope): subject
Type → Emoji mapping:
| Type | Emoji | When to use |
|---|---|---|
init | 🎉 | Project kickoff |
feat | ✨ | New user-facing feature |
fix | 🐛 | Bug fix |
hotfix | 🚑️ | Critical production fix |
docs | 📝 | Documentation only |
style | 💄 | CSS/visual changes, formatting |
refactor | ♻️ | Code restructure, no behavior change |
perf | ⚡️ | Performance improvement |
test | ✅ | Add or update tests only |
update-deps | ⬆️ | Dependency upgrades |
configs | 🔧 | Config file changes |
chore | 🔨 | Maintenance, tooling, other |
breaking | 💥 | Breaking changes |
deploy | 🚀 | Deployment |
Pick the highest-priority type that matches. Priority: feat > fix > refactor > perf > test > docs > chore.
Scope rules:
auth, user-profile, apisrc/auth/ → scope authSubject rules:
Body — include when subject alone doesn't explain why:
Footer — for issue/ticket references:
Closes: #123 or Refs: ELWB-1234Never include:
Display the full message in a code block:
✨ feat(auth): add OAuth2 PKCE flow
- Implement authorization code flow for mobile clients
- Add token exchange using oauth2-client library
Closes: #214
Ask: "Stage and commit with this message? (yes / edit / cancel)"
Staging rules:
git add src/auth/login.ts src/auth/login.test.tsgit add ., git add -A, or git add *.env or any secrets/env filesbun.lock (only if commit is specifically a deps update)worker-configuration.d.ts (generated file).gitignore patternsCommit using HEREDOC to preserve multi-line formatting:
git commit -m "$(cat <<'EOF'
✨ feat(scope): subject
- Bullet one
- Bullet two
Closes: #123
EOF
)"
After committing, run git log --oneline -3 and show the result.
When splitting into multiple commits:
git restore --staged . — unstage everythinggit add <specific files>git diff --cached --stat — verify what's stagedFor partial file staging (one file has changes for different commits):
git add -p src/api/handler.ts # stage only relevant hunks
git commit -m "🐛 fix(api): validate request body"
git add -p src/api/handler.ts # stage remaining hunks
git commit -m "✨ feat(api): add rate limiting headers"
When user asks about setting up git workflow tooling, read the appropriate reference file:
references/hooks-and-tools.md — lefthook, commitlint, cz-git setup
and configuration. Read when user asks to setup hooks, configure commit
linting, or initialize git workflow for a new project.
references/security.md — gitleaks configuration, secret scanning,
what to do when secrets are found, commit signing, CODEOWNERS.
Read when user asks about security scanning or secret management.
references/commit-conventions.md — detailed rules on types, scopes,
breaking changes, body/footer format, good/bad examples.
Read when user asks about commit message conventions or wants examples.
references/commit-workflow.md — manual staging strategies, hunk-level
staging with git add -p, interactive workflow without Claude Code.
Read when user asks about the manual commit process.
Source: anIcedAntFA/goshort — distributed by TomeVault.