skills/commit/SKILL.md
Generate conventional commit messages with emoji prefixes from staged changes. Use when you need to draft, refine, or execute standardized commit messages quickly.
npx skillsauth add adonis0123/adonis-skills commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
根据暂存的代码变更自动生成符合 Conventional Commits 规范的提交信息,并自动添加对应的 emoji 前缀。
/commit 命令执行 git status 查看当前暂存的文件变更。如果没有暂存的文件,提示用户先使用 git add 添加文件。
执行 git diff --cached 获取暂存的代码差异,分析变更内容:
根据分析结果生成符合规范的提交信息。
消息格式:
type(scope): subject
允许的类型和对应 emoji:
| 类型 | Emoji | 说明 | 示例 |
|------|-------|------|------|
| feat | ✨ | 新功能 | ✨ feat: add user authentication |
| fix | 🐛 | Bug 修复 | 🐛 fix: resolve login timeout |
| docs | 📝 | 文档变更 | 📝 docs: update API documentation |
| style | 🎨 | 代码风格 | 🎨 style: format code with prettier |
| refactor | ♻️ | 代码重构 | ♻️ refactor: extract common utils |
| perf | ⚡️ | 性能优化 | ⚡️ perf: optimize database queries |
| test | ✅ | 测试相关 | ✅ test: add unit tests for auth |
| build | 🏗️ | 构建系统 | 🏗️ build: update webpack config |
| ci | 👷 | CI 配置 | 👷 ci: add GitHub Actions workflow |
| chore | 🔧 | 其他变更 | 🔧 chore: update dependencies |
使用 HEREDOC 格式执行 git commit:
git commit -m "$(cat <<'EOF'
✨ feat(auth): add user login feature
EOF
)"
emoji type(scope): subject根据项目结构选择合适的 scope:
auth、api、ui、dblogin、payment、searchcomponents、hooks、utils详细的提交规范和项目配置,参考:
references/commit-convention.md - 完整的提交规范文档references/commit-examples.md - 提交信息示例tools
Use when the user's pain is "adding/removing one more X means editing N files" and X is a recurring variant kind: popup, banner, modal, ad slot, payment method, AI model/tool, form field type, connector, sub-site, command, menu item, agent, extension point, or data source. Use when they want to design, refactor, review, name, or explain a pluggable mechanism using registry, interface/trait contract, runtime core, and convention folders; mention pluginize, pluggable, plugin architecture, extension point, registry pattern, or extensibility. Use when explaining the first-principles rationale, DDD/SOLID/OCP mapping, or industry analogies behind that structure. Use for cross-stack mapping to VSCode contributes, Webpack/Vite plugins, Rust/Tauri connectors, Python entry_points, or cargo features. Skip one variant's internals/styles/hooks/copy/bugs, and skip register/registry meaning DI container, user signup, or package registry.
development
Use BEFORE heavier workflow skills when route choice matters. Route creative work without a design doc/spec to Brainstorm; destructive or hard-to-reverse work to Discuss; unresolved decisions, Plan/Full fan-out, ship checks, unclear bugs, and fresh-eyes fix-then-re-review need this gate. Skip single-line read-only lookups, pure typo/formatting edits, trivial safe one-line fixes, and clearly safe named-skill requests. Outputs Route, Runtime skill, Fallback alias, and Execution path.
development
Cross-agent code review handoff and review-fix-re-review loop with persistent packet artifacts. Requires a git repo because packet addressing uses git rev-parse --show-toplevel. Use when the user asks for an independent, read-only second pair of eyes on a diff/branch/PR another agent or teammate implemented; asks to verify reviewer feedback before fixing; says a fix is done and wants scoped re-review; asks to continue the latest review packet; or asks for first-principles, DDD, high-cohesion/low-coupling review. Persists each loop under $repo_root/.review-handoff/active/ so agents can resume without copy-paste. Do NOT use for ordinary implementation, generic staged-change review, review-comment copy editing, non-git folders/zips/tarballs/temp dirs, or when the user names a different review skill.
testing
Enforces 'decide then plan' discipline - the pre-planning decision gate. Use when the user asks for a plan or starts a change while key decisions are unresolved: architecture tradeoffs, data flow, public interfaces, unclear requirements, multi-module scope, or roughly 5+ files affected. Also triggers when the user explicitly wants to discuss, compare options, or review architecture before committing. Core job: reduce incorrect-execution cost by confirming decisions before producing executable plans.