一键导入
git-workflow
Perform git operations following a clean commit workflow
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Perform git operations following a clean commit workflow
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | git-workflow |
| description | Perform git operations following a clean commit workflow |
Follow these steps when committing or managing git history:
Check the current state first: run git status to see staged, unstaged, and untracked files before doing anything else.
Review the diff before staging: run git diff (unstaged) and git diff --cached (staged) to confirm you know exactly what will be committed.
Stage selectively: prefer git add <file> over git add . to avoid accidentally including build artifacts, secrets, or unrelated changes.
Never commit secrets — check for .env, API keys, tokens, and passwords. If found, remove them from the diff and add the file to .gitignore.
Write a clear commit message:
<type>: <short imperative summary> (max 72 chars). Types: feat, fix, refactor, docs, test, chore.feat: add steering queue to agent loopRun tests before committing if a test command exists (npm test, pnpm test, etc.). Do not commit if tests fail.
Check for lint errors before committing: run the project's lint command (pnpm lint, eslint ., etc.) if available.
Use git commit -m "$(cat <<'EOF' ... EOF)" syntax for multi-line commit messages to avoid shell escaping issues.
After committing, run git log --oneline -5 to confirm the commit looks correct.
For branch operations: create feature branches with git checkout -b <type>/<short-description>. Never force-push to main or master.