‹ 首页

commit-staged

@fcakyon · 收录于 1 周前 · 上游提交 6 天前

This skill should be used when user asks to "commit these changes", "write commit message", "stage and commit", "create a commit", "commit staged files", or explicitly invokes "commit-staged".

适合你,如果经常需要快速提交代码并写好规范的提交信息

/ 下载安装
commit-staged.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add fcakyon/claude-codex-settings/commit-staged
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- fcakyon/claude-codex-settings/commit-staged
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify fcakyon/claude-codex-settings/commit-staged
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
773GitHub stars
~497上下文体积 · 单文件
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · Apache-2.0 · 44b7c00

Commit Staged

Complete workflow for creating commits following project standards.

When explicitly invoked with extra text, treat that text as additional context about the changes and include it in commit planning and commit messages. When session history includes findings, motivation, or rationale, include the strongest points in the commit message body instead of relying on the diff alone.

Process
  1. Preferred execution
  2. If subagents are available, use github-dev:commit-creator for the full workflow.
  3. Pass along any extra invocation text as additional context.
  4. Otherwise follow the manual steps below.
  1. Analyze staged files only
  2. Check all staged files: git diff --cached --name-only
  3. Read diffs: git diff --cached
  4. Completely ignore unstaged changes
  1. Commit message format
  2. First line: {type}: brief description (max 50 chars)
  3. Types: feat, fix, refactor, docs, style, test, build
  4. Use plain language. Avoid jargon, buzzwords, and repo shorthand unless an exact command or tool name is needed.
  5. Use findings and motivation from session history when available.
  6. Focus on 'why' not 'what'
  7. 1 sentence conventional style + 1-2 short motivation/findings sentences if possible
  8. For complex changes, add bullet points after blank line
  1. Message examples
  2. feat: add sign-in flow
  3. fix: stop duplicate jobs on save
  4. docs: add skills install snippets
  1. Documentation update
  2. Check README.md for:
  3. New features that should be documented
  4. Outdated descriptions no longer matching implementation
  5. Missing setup instructions for new dependencies
  6. Update as needed based on staged changes
  1. Execution
  2. Commit uses HEREDOC syntax for proper formatting
  3. Verify commit message has correct format
  4. Don't add test plans to commit messages
Best Practices
  • Analyze staged files before writing message
  • Keep first line under 50 chars
  • Use active voice in message
  • Use simple words that still stay accurate
  • Prefer session findings over repeating raw diff details
  • One logical change per commit
  • Ensure README reflects implementation
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。