/cf-commit
Manual onlyMedium~1K–2.5K tokens injected into promptSmart conventional commits with diff analysis.
Context footprint: ⚡⚡ (medium) — what does this mean?
The /cf-commit skill creates well-formed conventional commits by analyzing your changes, staging only conversation-related files, scanning for secrets, and generating appropriate commit messages.
Usage
/cf-commit [hint]
What It Does
- Analyzes Changes — Reviews diffs of all staged and unstaged files, plus recent commit history
- Identifies Relevant Changes — Separates conversation-related changes from unrelated work (only commits what you worked on in the current session)
- Stages & Scans — Stages only relevant files (never uses
git add .) and scans for accidentally staged secrets - Review Check — If no
/cf-reviewwas run in the current session, suggests running one first (skippable) - Generates Message — Creates a conventional commit message explaining the "why", not the "what"
- Creates Commit — Commits with the generated message — no AI attribution is ever included
Commit Types
| Type | When to Use |
|---|---|
feat | New feature or capability |
fix | Bug fix or error correction |
refactor | Code restructuring without behavior change |
test | Test additions or modifications |
docs | Documentation, README, comments |
chore | Dependency updates, build scripts, config |
style | Code style changes (formatting, semicolons) |
perf | Performance improvements |
ci | CI/CD pipeline changes |
Examples
/cf-commit add user authentication
# Creates: feat: add user authentication with JWT tokens
/cf-commit fix sidebar alignment
# Creates: fix: resolve sidebar misalignment on mobile view
/cf-commit
# Auto generate a commit message based on the changes
Message Format
type(scope): subject
Body with more context if needed.
Explains the "why" not just the "what".
Rules:
- Subject line under 72 characters
- Body explains motivation, not mechanics
- References issue numbers when applicable
Secret Scanning
After staging, the skill automatically scans diffs for potential secrets (API keys, tokens, passwords, private keys, credentials). If real secrets are detected, the file is unstaged and you're advised to add it to .gitignore.
Benefits
- Consistency — Same format across all commits
- Clarity — Descriptive messages aid code archaeology
- Safety — Secret scanning prevents accidental credential leaks
- Automation — Conventional format enables automated changelog generation
- History — Easy to find related changes with
git log --grep
When to Use
- After completing a feature
- Fixing bugs
- Refactoring code sections
- Adding tests or documentation
- Any change ready to commit