askill
commit-detection

commit-detectionSafety 95Repository

Detects optimal commit type from git changes. Use when analyzing commits, determining commit type, or before committing.

3 stars
1.2k downloads
Updated 3/22/2026

Package Files

Loading files...
SKILL.md

Commit Type Detection Skill

Expert knowledge for detecting the optimal conventional commit type.

Detection Algorithm

Step 1: Gather Data

# Get modified files
git diff --name-only
git diff --staged --name-only

# Get change statistics
git diff --stat
git diff --staged --stat

# Check for keywords in diff
git diff | grep -i "fix\|bug\|error" | head -5

Step 2: Categorize Files

CategoryFile Patterns
docs*.md, *.txt, *.rst, README*, CHANGELOG*
test*.test.*, *.spec.*, __tests__/*, test/*
config*.json, *.yml, *.yaml, *.toml, .*rc
ci.github/*, .gitlab-ci.yml, Jenkinsfile
buildpackage.json, Makefile, webpack.*, vite.*
styleOnly whitespace, formatting changes
src*.ts, *.js, *.py, *.go, *.rs, etc.

Step 3: Apply Rules

IF only docs files changed:
  → docs

IF only test files changed:
  → test

IF only config/build files changed:
  → chore

IF only CI files changed:
  → ci

IF diff contains "fix", "bug", "error", "issue", "resolve":
  → fix

IF new files added with business logic:
  → feat

IF files renamed/moved without logic change:
  → refactor

IF performance keywords ("optimize", "perf", "speed", "cache"):
  → perf

IF formatting only (whitespace, semicolons):
  → style

DEFAULT:
  → Use /commit-pro:commit for smart analysis

Step 4: Determine Scope

Extract scope from primary directory:

src/components/Button.tsx → ui or button
src/api/auth.ts → auth
lib/utils/date.ts → utils
server/routes/user.ts → user

Quick Reference

TypeWhenVersion Bump
featNew functionalityPATCH
fixBug correctionPATCH
docsDocumentation onlyPATCH
styleFormatting onlyPATCH
refactorCode restructurePATCH
perfPerformancePATCH
testTests onlyPATCH
buildBuild/depsPATCH
ciCI/CD configPATCH
choreMaintenancePATCH

MINOR/MAJOR bumps are manual user decisions, never automatic.

Plugin Repo Version Detection

When the repo contains .claude-plugin/marketplace.json, auto-detect and bump:

# 1. Find modified plugins from last commit
git diff --name-only HEAD~1 | grep '^plugins/' | cut -d/ -f2 | sort -u

# 2. For each plugin: bump PATCH in plugin.json
# plugins/{name}/.claude-plugin/plugin.json → "version": "X.Y.(Z+1)"

# 3. Sync in marketplace.json plugins[] array (same version)

# 4. Bump suite PATCH in marketplace.json metadata.version

# 5. Core plugins (core[] array): plugin.json only, no marketplace version

Files to include in bump commit: CHANGELOG.md + marketplace.json + all bumped plugin.json

Examples

Example 1: Only README changed

Files: README.md
→ /commit-pro:docs

Example 2: New component + test

Files: src/Button.tsx, src/Button.test.tsx
→ /commit-pro:feat (primary is new feature)

Example 3: Fix in existing file

Files: src/api/auth.ts
Diff contains: "fix login bug"
→ /commit-pro:fix

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

84/100Analyzed 3/1/2026

Well-structured skill for detecting conventional commit types with clear algorithmic steps, categorization tables, and practical examples. Provides actionable guidance for git analysis and commit type determination. Slight deduction for lack of explicit "when to use" trigger section in the body, but overall high quality technical reference.

95
85
88
78
92

Metadata

Licenseunknown
Version-
Updated3/22/2026
Publisherfusengine

Tags

apici-cdgithubllmsecuritytesting