Code commit with checks

VerifiedCaution

Validates and checks code before committing to a branch. Uses conventional commit format and automatically handles feature branch creation.

Sby Skills Guide Bot
DevelopmentIntermediate
206/2/2026
Claude CodeCursorWindsurfCopilotCodex
#commit#git#conventional-commit#version-control

Recommended for

Our review

Optionally checks, then commits code to the current or a new feature branch with conventional commit messages.

Strengths

  • Enforces conventional commit format (type(scope): description)
  • Optional pre-commit check (lint, build, tests)
  • Auto-creates a feature branch if on main

Limitations

  • Does not handle merge conflicts
  • Automated checks may fail if test environment is not set up
  • Sensitive files are excluded, but user still needs to verify
When to use it

To standardize and safeguard the commit process in teams or structured projects.

When not to use it

For quick, informal commits where convention is overkill or when the check environment is unreliable.

Security analysis

Caution
Quality score80/100

The skill requires executing git commands and potentially running arbitrary checks (lint, build, test) that may involve custom scripts. While not inherently destructive, it delegates significant execution authority to the AI agent, which could be exploited in a malicious repo context.

Findings
  • Instructs running bash commands in parallel, which could include arbitrary build/test execution without explicit safety boundaries.

Examples

Commit with check
Please commit my changes with a conventional commit message. Run checks first.
Force commit
Commit my changes directly without any checks, using force mode.
Commit from main
I'm on main, please commit my changes to a new feature branch with a proper commit message.

name: commit description: Optionally checks, then commits code to the current or a new feature branch.

When asked to commit code, follow these steps:

Arguments

  • check (default): Run checks first to lint, build, and test the code. Stop if any checks fail.
  • force: Skip the check step and commit directly.

Steps

  1. Run these bash commands in parallel to understand the current state:

    • git status to see all untracked files
    • git diff HEAD to see both staged and unstaged changes
    • git log --oneline -10 to see recent commit messages for style consistency
  2. If you are on the main branch, create a new feature branch using git branch and switch to it.

  3. Analyze all changes and draft a commit message:

    • Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
    • Use the conventional commit format: type(scope): description
    • Keep the first line under 72 characters
    • Do not commit files that likely contain secrets (.env, credentials.json, etc.)
  4. Stage and commit the changes:

    • Add relevant files using git add
    • Use a plain string for the commit message (do not use HEREDOCs).
  5. Report the results including:

    • The commit hash
    • The commit message
Related skills