skills/git-commit-message/SKILL.md
Auto-generates conventional commit messages from git diffs with tiered format enforcement. Analyzes staged changes to produce meaningful commit messages following Conventional Commits specification.
npx skillsauth add artivilla/agents-config git-commit-messageInstall 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.
Auto-generates conventional commit messages from git diffs with tiered format enforcement
Analyze staged git changes and generate concise, meaningful commit messages following a tiered Conventional Commits specification. This skill examines file modifications, additions, and deletions to infer the type and scope of changes, producing commit messages that match the importance of the change - from detailed documentation for critical features to concise messages for minor updates.
Key Innovation: Three-tier format system that balances thoroughness for critical commits (feat, fix, security) with efficiency for routine changes (docs, chore, style).
/commit-msg command is invokedcommit-msg/prepare-commit-msg hook (if installed)1. Diff Analysis
git diff --staged output2. Change Classification
feat: New features or functionalityfix: Bug fixessecurity: Security fixes or hardeningrefactor: Code restructuring without behavior changedocs: Documentation changesstyle: Formatting, whitespace, code styletest: Adding or modifying testschore: Build process, dependencies, toolingperf: Performance improvementsci: CI/CD configuration changesbuild: Build system changesrevert: Reverting previous commits3. Scope Detection
api, auth, ui)*.test.js → tests)components/, services/)4. Message Generation
type(scope): descriptionThis skill uses a three-tier format system that matches message detail to commit criticality:
Requirements: Detailed documentation with impact statement
Format:
type(scope): summary line (max 50 chars)
- Detailed description point 1
- Detailed description point 2
- Detailed description point 3
This change [impact statement describing user-facing benefit or risk addressed].
Affected files/components:
- path/to/file1
- path/to/file2
Why: Features, fixes, and performance changes affect users directly and need thorough documentation for future reference and changelog generation.
Requirements: Brief context and file list
Format:
type(scope): summary line (max 72 chars)
Brief explanation of what changed and why (1-2 sentences).
Files: path/to/file1, path/to/file2
Why: Internal improvements need context for maintainability but don't require extensive documentation.
Requirements: Summary line, optional description
Format:
type(scope): summary line (max 72 chars)
[Optional: Additional context if helpful]
Why: Documentation and routine maintenance are self-explanatory from the diff; verbose messages add noise.
0. Pre-staging typecheck (if project uses TypeScript):
- Run `tsc --noEmit` on changed files before staging
- Fix type errors before committing (avoids pre-commit hook retry loops)
1. Get staged changes (staged only, not working tree):
- git diff --staged --name-status
- git diff --staged --stat
- git diff --staged
2. Load config → frameworks/shared-skills/skills/git-commit-message/config.yaml
3. Analyze changes:
- Count files modified/added/deleted
- Identify primary change type using analysis patterns
- Detect scope from project structure (config.yaml)
- Determine tier (1/2/3) based on commit type
- Extract key modifications
4. Generate commit messages:
- Apply tier-appropriate format
- Primary suggestion (best match)
- Alternative 1 (different scope/angle)
- Alternative 2 (broader/narrower focus)
5. Validate against rules:
- Check forbidden patterns
- Verify required elements present
- Ensure length limits
6. Present to user with explanation and tier info
--validate "<message>": Validate a commit message without generating suggestions (format/type/scope/length/forbidden patterns; then report required Tier 1/2/3 elements if missing).--tier <1|2|3>: Force the tier format (overrides auto-detection).--interactive or -i: Ask for confirmation of type, scope, and summary before final output.[NOTE] Suggested Commit Messages (based on X files changed)
PRIMARY:
feat(api): add user authentication endpoints
ALTERNATIVES:
1. feat(auth): implement JWT token validation
2. feat: add user authentication system
ANALYSIS:
- 3 files modified in src/api/
- New functions: authenticateUser, generateToken
- Primary change: new feature (authentication)
- Scope detected: api/auth
Type Guidelines:
feat: User-facing features or API additionsfix: Corrects incorrect behaviorrefactor: Improves code without changing behaviordocs: README, comments, documentation filesstyle: Formatting only (prettier, eslint --fix)test: Test files or test utilitieschore: Build scripts, package updates, configperf: Measurable performance improvementsci: GitHub Actions, CircleCI, build pipelinesScope Guidelines:
Description Guidelines:
feat and fixMultiple unrelated changes:
Breaking changes:
WIP or experimental:
chore(wip): description or feat(experimental): descriptionNo meaningful changes:
git add commandsPre-commit hook: Triggered before commit (if installed/configured)
Slash command: Manual invocation via /commit-msg
Direct skill call: From other skills or tools
git add <file1> <file2>, not git add -A or git add ., to avoid pulling in unrelated changes or sensitive filesgit commit -m "$(cat <<'EOF'\nmessage\nEOF\n)" or pass -m "message" directlytsc --noEmit on the staged surface before committing to catch type errors early and avoid retry cascades from pre-commit hooksScenario 1: New React component
Files: src/components/UserProfile.tsx, src/components/UserProfile.test.tsx
Changes: +120 lines, component definition, props interface, tests
Message: feat(components): add UserProfile component
Scenario 2: Bug fix in API
Files: src/api/auth.ts
Changes: -5 +8 lines, fix token expiration check
Message: fix(auth): correct token expiration validation
Scenario 3: Documentation update
Files: README.md, docs/api.md
Changes: +45 lines documentation
Message: docs: update API documentation and README
Scenario 4: Dependency update
Files: package.json, package-lock.json
Changes: version bumps for eslint, typescript
Message: chore(deps): update eslint and typescript
The skill uses pattern matching to intelligently detect commit types from diffs:
export function, export class)app.get, router.post, etc.)try, catch, throw)validate, sanitize, check).md, .txt, README, CHANGELOG, /docs/test.js, spec.ts, __tests__/, /tests/describe, it, test, expect, assert.css, .scss, .sass, .lessprettier, eslintpackage.json, requirements.txt, Gemfilepackage-lock.json, yarn.lock.gitignore, .envProject-specific configuration loaded from config.yaml:
frameworks/claude-code-kit/** → claude-kit)strict (block), warning (warn), or disabledThe skill automatically blocks commits with these patterns:
git status and guide user to git add fileschore: resolve merge conflictsThis skill integrates with the AI-Agents repository standards:
assets/template-commit-message.md — Copy-paste template and good/bad examples.
Use it to standardize type(scope): summary messages and keep history automation-friendly.
assets/template-security-commits.md — Guide for handling security-sensitive changes.
| Anti-Pattern | Problem | Fix | |--------------|---------|-----| | "Add secrets later" | Secrets committed accidentally | Use env vars from start | | Secrets in tests | Real credentials in repo | Use mocks/test credentials | | Force push to hide | History still recoverable | Rotate + document | | Vague security commits | No audit trail | Include CVE/CVSS | | No pre-commit scan | Secrets reach remote | Install gitleaks hook |
Note: AI suggestions should preserve human intent.
| Resource | Purpose | |----------|---------| | references/conventional-commits-guide.md | Conventional Commits spec and tooling | | references/commit-message-antipatterns.md | Common bad patterns, detection, linting | | references/monorepo-commit-conventions.md | Scope strategies for multi-package repos | | references/changelog-generation-guide.md | Changelog tooling setup, CI integration | | data/sources.json | Curated external sources |
Version: 2.1.1 Last Updated: 2026-01-26 Repository: AI-Agents (documentation repository) Conventional Commits Spec: https://www.conventionalcommits.org/
development
Review UI code against Vercel's Web Interface Guidelines. Use when checking interactions, animation, layout, content, accessibility, performance, and design standards with MUST/SHOULD/NEVER rules.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.