commit-detection

Solid

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

Code & Development 25 stars 4 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<objective> Detects the optimal conventional commit type (feat/fix/docs/style/refactor/perf/test/build/ci/chore) from staged and unstaged git changes, using file-pattern categorization (docs/test/config/ci/build/src) plus diff-keyword heuristics ("fix", "bug", "optimize", etc.), and derives a scope suggestion from the primary changed directory (e.g. `src/api/auth.ts` → `auth`). Covers the full detection algorithm, the rule cascade, scope extraction, and worked examples. Does not perform the commit itself — routes to the matching `/commit-pro:<type>` command, or to the `commit` skill for full smart analysis when no rule matches cleanly. </objective> # Commit Type Detection Skill Expert knowledge for detecting the optimal conventional commit type. ## Detection Algorithm ### Step 1: Gather Data ```bash # 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 | Category | File Patterns | |----------|---------------| | docs | `*.md`, `*.txt`, `*.rst`, `README*`, `CHANGELOG*` | | test | `*.test.*`, `*.spec.*`, `__tests__/*`, `test/*` | | config | `*.json`, `*.yml`, `*.yaml`, `*.toml`, `.*rc` | | ci | `.github/*`, `.gitlab-ci.yml`, `Jenkinsfile` | | build | `package.json`, `Makefile`, `webpack.*`, `vite.*` | | style | Only whitespace, formatting changes | | src | `*.ts`, `*.js`, `*.py`, `...

Details

Author
fusengine
Repository
fusengine/agents
Created
8 months ago
Last Updated
6 days ago
Language
CSS
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category