2
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill fusengine/agents --skill commit-detection- SKILL.md2.5 KB
Overview
This skill detects the optimal conventional commit type from Git changes to produce consistent, actionable commit messages. It analyzes file lists, diffs, keywords, and file categories to map changes to commit types like feat, fix, docs, or chore. The output includes an inferred scope when possible to improve commit clarity.
How this skill works
The skill gathers modified, staged, and new files plus diff statistics to inspect change content. It categorizes files (docs, test, config, ci, build, style, src) and searches diffs for keywords such as fix, bug, optimize, or formatting indicators. A rule set maps file categories and keywords to conventional commit types and extracts a scope from primary directory paths. If rules are ambiguous, it falls back to a smart analysis mode for a more contextual decision.
When to use it
- Before creating a commit to determine the correct conventional commit type and scope.
- When reviewing a pull request to label changes consistently.
- As part of CI checks to validate commit message categories.
- When enforcing a commit convention across a team or repository.
- During automated changelog generation to classify entries.
Best practices
- Run the detection on both staged and unstaged changes to capture full context.
- Prefer the most specific rule match (e.g., docs-only over chore) to avoid misclassification.
- Extract scope from the primary directory path to keep commit messages focused and discoverable.
- Treat formatting-only diffs as style and avoid combining format changes with functional edits in one commit.
- When in doubt, use the smart analysis fallback to evaluate intent across files and diffs.
Example use cases
- README.md edited alone → docs commit to update project documentation.
- src/api/auth.ts changed with 'fix login bug' in diff → fix commit with scope 'auth'.
- New UI component plus tests added → feat commit with scope derived from src/components.
- Only CI configuration files changed → ci commit to document pipeline updates.
- Whitespace/semicolon formatting across files → style commit to isolate formatting changes.
FAQ
It extracts the primary directory or filename from the path (e.g., src/api/auth.ts → auth or api) and uses that as the commit scope when meaningful.
What if a change touches docs and code?
If code changes include new functionality or bug fixes, the skill prioritizes feat or fix. If changes are strictly documentation, it returns docs; mixed changes favor the primary functional change.