一键导入
commit
Generates commit messages and creates commits. Use when writing commit messages, committing changes, or reviewing staged changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates commit messages and creates commits. Use when writing commit messages, committing changes, or reviewing staged changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | commit |
| description | Generates commit messages and creates commits. Use when writing commit messages, committing changes, or reviewing staged changes. |
Use Conventional Commits format.
<type>(<scope>): <description>
[optional body]
feat: User-facing features or behavior changes (must change production code)fix: Bug fixes (must change production code)docs: Documentation onlystyle: Code style/formatting (no logic changes)refactor: Code restructuring without behavior changetest: Adding or updating testschore: CI/CD, tooling, dependency bumps, configs (no production code)Optional. Use when it adds clarity. Examples: backend, frontend, api, auth, ci.
feat(frontend): add user login page
fix(api): correct CSRF token handling on POST requests
refactor(backend): simplify database URL configuration
chore: add pre-commit hooks
docs: update quickstart instructions
test(api): add health endpoint integration test
git diff --staged to see staged changesPre-commit hooks fail often in this repo (ruff, mypy/dmypy, prettier, markdownlint, detect-secrets, frontend lint+check+test, backend pytest, agent-docs-regen). A failed commit does NOT advance HEAD — but the failure is easy to miss if you only skim git commit output.
After every git commit, run this in the same shell call so the result is unambiguous:
git commit -m "..." ; echo "EXIT=$?" ; git rev-parse --short HEAD
The commit succeeded only if all three hold:
EXIT=0git status is clean afterwardIf any of those fail, the commit did not happen. Read the hook output to classify the failure and recover.
Several hooks rewrite files and then fail the commit, leaving the fixes unstaged in the working tree:
ruff check --fix and ruff format (backend Python)prettier --write (markdown)end-of-file-fixer, trailing-whitespace, mixed-line-endingagent-docs-regen (rewrites CLAUDE.md / AGENTS.md and runs git add on them)Look for "files were modified by this hook" or "Failed" in the output. Recovery: git add the modified paths and create a NEW commit (never --amend after a hook failure — the prior commit didn't happen, so amend would rewrite the wrong commit).
make mypy-restart, then retry.--no-verify.no-commit-to-branch — you're on main. Switch to a feature branch.check-added-large-files — a file exceeds 1000 KB. Don't commit it; reconsider whether it belongs in git.agent-docs-no-direct-edit — you edited CLAUDE.md or AGENTS.md directly. Edit docs/AGENTS.src.md instead.frontend/src/lib/api/schema.d.ts — it is gitignored and should never be committed.Generates commit messages and creates commits. Use when writing commit messages, committing changes, or reviewing staged changes.
Creates pull requests with proper formatting. Use when creating PRs, opening pull requests, or preparing changes for review.
Creates git branches with proper naming. Use when creating branches, starting new work, or switching to feature branches.
Creates pull requests with proper formatting. Use when creating PRs, opening pull requests, or preparing changes for review.
基于 SOC 职业分类