Resources
2Install
npx skillscat add olino3/forge/commit-helper Install via the SkillsCat registry.
Purpose
[TODO: Add purpose description]
MANDATORY WORKFLOW (MUST FOLLOW EXACTLY)
⚠️ STEP 1: Analyze Changes (REQUIRED)
YOU MUST:
- Use the
get-git-diffskill or rungit diff --stagedto obtain the current changes - If no staged changes exist, check
git difffor unstaged changes and inform the user - Run
git diff --stat --stagedto get a high-level summary of affected files and line counts - Run
git diff --name-status --stagedto identify file operations (A/M/D/R) - Read the actual diff content to understand the substance of each change
DO NOT PROCEED WITHOUT UNDERSTANDING THE CHANGES
⚠️ STEP 2: Determine Context (REQUIRED)
YOU MUST:
- Classify the change type: Determine the primary Conventional Commits type:
feat: A new feature or capabilityfix: A bug fix or correctionrefactor: Code restructuring without behavior changedocs: Documentation-only changesstyle: Formatting, whitespace, or cosmetic changes (no logic change)test: Adding or updating testschore: Maintenance tasks, dependency updates, toolingperf: Performance improvementsci: CI/CD pipeline changesbuild: Build system or external dependency changesrevert: Reverting a previous commit
- Identify scope: Determine the affected module, component, or area (e.g.,
auth,api,parser,cli) - Detect breaking changes: Look for removed public APIs, changed function signatures, renamed exports, schema migrations, or configuration format changes
- Check project memory: Use
memoryStore.getSkillMemory("commit-helper", "{project-name}")to load project-specific commit conventions, preferred scopes, or style guidelines. See MemoryStore Interface for method details. - Gather additional context: If the change purpose is ambiguous, ask the user clarifying questions:
- What motivated this change?
- Is this related to a specific issue or ticket?
- Are there any breaking changes the diff doesn't make obvious?
DO NOT PROCEED WITHOUT CLASSIFYING THE CHANGE
⚠️ STEP 3: Craft Commit Message (REQUIRED)
YOU MUST:
- Compose the subject line following this format:
<type>(<scope>): <imperative description>- Use imperative mood ("add" not "added", "fix" not "fixes")
- Keep to 72 characters or fewer
- Do not end with a period
- Be specific: "fix null pointer in user lookup" not "fix bug"
- Write the body (if the change warrants explanation):
- Separate from subject with a blank line
- Wrap at 72 characters per line
- Explain what changed and why, not how (the diff shows how)
- Include motivation, context, and contrast with previous behavior
- Add footer (if applicable):
BREAKING CHANGE: <description>for breaking changesFixes #<issue>orCloses #<issue>for issue referencesRefs #<issue>for related but not closing references- Co-author trailers if applicable
- Use the template from
templates/commit_template.mdfor output formatting
DO NOT USE VAGUE OR GENERIC MESSAGES
⚠️ STEP 4: Review & Refine (REQUIRED)
YOU MUST validate the message against these criteria:
- Subject line check:
- Uses correct type prefix
- Scope is accurate and consistent with project conventions
- Imperative mood used
- 72 characters or fewer
- No trailing period
- Specific and descriptive
- Body check (if present):
- Explains motivation and context
- Wrapped at 72 characters
- Does not repeat the diff
- Footer check (if applicable):
- Breaking changes documented with
BREAKING CHANGE:prefix - Issue references use correct format
- Breaking changes documented with
- Present the final message to the user for approval
- Offer alternatives: If the change could be classified differently, present 1-2 alternative messages with explanation of the trade-offs
DO NOT SKIP VALIDATION
OPTIONAL: Update Project Memory
If project-specific conventions are discovered during the process, use memoryStore.update("commit-helper", "{project-name}", ...) to store insights:
- Preferred commit types and scopes
- Project-specific conventions (e.g., ticket number format, scope naming)
- Common patterns observed in existing commit history
See MemoryStore Interface for update() and append() method details.
Compliance Checklist
Before completing ANY commit message generation, verify:
- Step 1: Changes analyzed using git diff (staged or otherwise)
- Step 2: Change type classified, scope identified, breaking changes checked
- Step 3: Commit message crafted following Conventional Commits format with template
- Step 4: Message validated against all quality criteria and presented to user
FAILURE TO COMPLETE ALL STEPS INVALIDATES THE COMMIT MESSAGE
Output File Naming Convention
Format: commit_msg_{short_hash}.md
Where:
{short_hash}= First 7 characters of the current HEAD commit hash
Examples:
commit_msg_a1b2c3d.md(for changes based on HEAD a1b2c3d)commit_msg_staged.md(when generating for staged but uncommitted changes)
Alternative: If the user requests the message be applied directly, use git commit -m with the generated message instead of file output.
Conventional Commits Quick Reference
Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]Types
| Type | Description |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation only changes |
style |
Changes that do not affect meaning of code |
refactor |
Code change that neither fixes a bug nor adds a feature |
perf |
A code change that improves performance |
test |
Adding missing tests or correcting existing tests |
build |
Changes to build system or external dependencies |
ci |
Changes to CI configuration files and scripts |
chore |
Other changes that don't modify src or test files |
revert |
Reverts a previous commit |
Breaking Changes
feat(api)!: remove deprecated /users/search endpoint
BREAKING CHANGE: The /users/search endpoint has been removed.
Use /users?q=<query> instead.Further Reading
Refer to official documentation:
- Commit Conventions:
- Conventional Commits: https://www.conventionalcommits.org/
- Angular Commit Guidelines: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
- Best Practices:
- How to Write a Git Commit Message: https://cbea.ms/git-commit/
- Pro Git Book: https://git-scm.com/book/en/v2
Version History
- v1.1.0 (2026-02-10): Migrated to interface-based memory access
- Replaced hardcoded memory paths with MemoryStore interface calls
- Added references to MemoryStore interface documentation
- v1.0.0 (2025-01-XX): Initial release
- Mandatory 4-step workflow for commit message generation
Step 1: Initial Analysis
Gather inputs and determine scope and requirements.
Step 2: Load Memory
Load project-specific memory via MemoryStore interface.
Step 3: Load Context
Load relevant context files via ContextProvider interface.
Step 4: Core Implementation
Execute the skill-specific core action.
Step 5: Generate Output
Create deliverables and save to /claudedocs/ following OUTPUT_CONVENTIONS.md.
Step 6: Update Memory
Update project memory with new patterns and decisions.