/cf-commit

Manual onlyMedium~1K–2.5K tokens injected into prompt

Smart 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

  1. Analyzes Changes — Reviews diffs of all staged and unstaged files, plus recent commit history
  2. Identifies Relevant Changes — Separates conversation-related changes from unrelated work (only commits what you worked on in the current session)
  3. Stages & Scans — Stages only relevant files (never uses git add .) and scans for accidentally staged secrets
  4. Review Check — If no /cf-review was run in the current session, suggests running one first (skippable)
  5. Generates Message — Creates a conventional commit message explaining the "why", not the "what"
  6. Creates Commit — Commits with the generated message — no AI attribution is ever included

Commit Types

TypeWhen to Use
featNew feature or capability
fixBug fix or error correction
refactorCode restructuring without behavior change
testTest additions or modifications
docsDocumentation, README, comments
choreDependency updates, build scripts, config
styleCode style changes (formatting, semicolons)
perfPerformance improvements
ciCI/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