Claude-skill-registry commit
This skill should be used when the user requests "commit", "git commit", "create commit", or wants to commit staged/unstaged changes following conventional commits format
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/commit-fradser-dotclaude" ~/.claude/skills/majiayu000-claude-skill-registry-commit && rm -rf "$T"
manifest:
skills/data/commit-fradser-dotclaude/SKILL.mdsource content
Background Knowledge
Format:
<type>[scope]: <description> + mandatory body + optional footers
- Title: ALL LOWERCASE, <50 chars, imperative mood, no period. Add
for breaking changes! - Types:
,feat
,fix
,docs
,refactor
,perf
,test
,chore
,build
,cistyle - Body (REQUIRED): Bullet summary (
prefix, imperative verbs) + explanation paragraph. ≤72 chars/line- - Footer:
REQUIRED; optionalCo-Authored-By
,Closes #123BREAKING CHANGE: ...
See
references/format-rules.md for complete specification and examples.
Phase 1: Configuration Verification
Goal: Load project-specific git configuration and valid scopes.
Actions:
- FIRST: Read
to load project configuration.claude/git.local.md - If file not found, load
skill using the Skill tool to create itgit:config-git - Extract valid scopes from
list in YAML frontmatterscopes: - Store these scopes for validation in Phase 3 and Phase 5
Phase 2: Safety Validation
Goal: Perform safety checks before committing.
Actions:
- Detect sensitive files (credentials, secrets, .env files)
- Warn about large files (>1MB) and large commits (>500 lines)
- Use
tool for confirmation if issues foundAskUserQuestion
Phase 3: Change Analysis
Goal: Identify logical units of work and infer commit scopes.
Actions:
- Run
andgit diff --cached
to get code differences (MUST NOT traverse files directly)git diff - Analyze diff to identify coherent logical units
- Infer scope(s) from file paths and changes using the valid scopes loaded in Phase 1
- If inferred scope not in the valid scopes list, load
skill using the Skill tool to update configurationgit:config-git
Phase 4: AI Code Quality Check
Goal: Remove AI-generated slop before committing.
Actions:
- Run
to compare against main branchgit diff main...HEAD - Remove AI patterns: extra comments, unnecessary defensive checks,
casts, inconsistent styleany - Ensure changes follow project's established patterns
Phase 5: Commit Creation
Goal: Create atomic commits following Conventional Commits format.
Actions (repeat for each logical unit):
- Draft commit message per
references/format-rules.md - Validate: title <50 chars lowercase imperative; body has bullets + explanation paragraph; footer has
Co-Authored-By - Stage relevant files and create commit