一键导入
commit-style-enforcer
Use when creating git commits. Learns repository-specific commit style patterns from history, caches them, and enforces consistency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating git commits. Learns repository-specific commit style patterns from history, caches them, and enforces consistency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when systematically implementing LightSpec change proposals through clean, sequential delegation
Use when systematically implementing OpenSpec change proposals through clean, sequential delegation
Recorder CLI skill that captures HTTP payloads during debugging sessions and allows to review and log recent requests quickly.
Start and stop a server with pm2 using `pm2 start ./my-server --name <name> --no-autorestart`, plus common supporting commands for status, logs, restart, and cleanup.
Use when implementing features, refactors, or fixes that affect core functionality, configuration, infrastructure, or integrations. Ensures documentation stays accurate by updating README, operational guides, and reference docs, and verifying links/commands remain correct.
| name | commit-style-enforcer |
| description | Use when creating git commits. Learns repository-specific commit style patterns from history, caches them, and enforces consistency. |
This skill learns and enforces commit message conventions for any git repository. It analyzes commit history to detect patterns, caches the style guide, and helps generate consistent commit messages.
Use this skill when:
digraph commit_style_flow {
"User requests commit" [shape=doublecircle];
"Check for commit-style.md" [shape=diamond];
"Run analyze-commit-style.sh" [shape=box];
"Read commit-style.md" [shape=box];
"Generate commit message" [shape=box];
"Create commit" [shape=doublecircle];
"User requests commit" -> "Check for commit-style.md";
"Check for commit-style.md" -> "Run analyze-commit-style.sh" [label="not found"];
"Check for commit-style.md" -> "Read commit-style.md" [label="exists"];
"Run analyze-commit-style.sh" -> "Read commit-style.md";
"Read commit-style.md" -> "Generate commit message";
"Generate commit message" -> "Create commit";
}
Check for cached style guide:
# Check if commit-style.md exists in skill directory
if [ -f "$HOME/.claude/skills/commit-style-enforcer/commit-style.md" ]; then
echo "Found cached commit style guide"
else
echo "No style guide found, analyzing repository..."
fi
If missing, generate it:
cd </path/to/skill/directory>
./analyze-commit-style.sh 15
This script:
commit-style.md with discovered patternsManual review (optional):
After generation, review and refine commit-style.md if the auto-detection missed nuances.
Analyze staged changes:
git diff --staged --stat
git diff --staged
Read the style guide:
cat commit-style.md
Generate commit message following the guide:
Create the commit:
git commit -m "$(cat <<'EOF'
[tag] Your commit summary
Detailed explanation if needed.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
EOF
)"
Location: Same directory as SKILL.md
Usage:
./analyze-commit-style.sh [number_of_commits]
Default: Analyzes last 15 commits
Output: Creates commit-style.md with:
Re-run when:
Wrong:
# Just guess the format and write commit
git commit -m "Update files"
Right:
# Always check for commit-style.md first
cat commit-style.md || ./analyze-commit-style.sh
# Then write commit following discovered patterns
Wrong:
Update user profile
- Various changes
- Bug fixes
Right:
[frontend] Add OAuth token refresh to user profile
- Implement automatic token refresh logic
- Handle expired token edge cases
- Update AuthConfig interface for refresh settings
This prevents session timeouts during long user sessions
and improves the authentication UX.
Wrong:
Using feat: in a repo that uses [feature] tags
Right:
Match the format detected in commit-style.md
Before creating the commit:
git diff --staged