Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

commit

verified

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

View on GitHub

Marketplace

frad-dotclaude

FradSer/dotclaude

Plugin

git

development

Repository

FradSer/dotclaude
208stars

git/skills/commit/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/FradSer/dotclaude/blob/main/git/skills/commit/SKILL.md -a claude-code --skill commit

Installation paths:

Claude
.claude/skills/commit/
Powered by add-skill CLI

Instructions

## 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`, `ci`, `style`
- **Body** (REQUIRED): Bullet summary (`- ` prefix, imperative verbs) + explanation paragraph. ≤72 chars/line
- **Footer**: `Co-Authored-By` REQUIRED; optional `Closes #123`, `BREAKING 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**:
1. **FIRST**: Read `.claude/git.local.md` to load project configuration
2. If file not found, **load `git:config-git` skill** using the Skill tool to create it
3. Extract valid scopes from `scopes:` list in YAML frontmatter
4. Store these scopes for validation in Phase 3 and Phase 5

## Phase 2: Safety Validation

**Goal**: Perform safety checks before committing.

**Actions**:
1. Detect sensitive files (credentials, secrets, .env files)
2. Warn about large files (>1MB) and large commits (>500 lines)
3. Use `AskUserQuestion` tool for confirmation if issues found

## Phase 3: Change Analysis

**Goal**: Identify logical units of work and infer commit scopes.

**Actions**:
1. Run `git diff --cached` and `git diff` to get code differences (MUST NOT traverse files directly)
2. Analyze diff to identify coherent logical units
3. Infer scope(s) from file paths and changes using the valid scopes loaded in Phase 1
4. If inferred scope not in the valid scopes list, **load `git:config-git` skill** using the Skill tool to update configuration

## Phase 4: AI Code Quality Check

**Goal**: Remove AI-generated slop before committing.

**Actions**:
1. Run `git diff main...HEAD` to compare against main branch
2. Remove AI patterns: extra comments, unnecessary defensive checks, `any` casts, inconsistent s

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2408 chars