Skip to content
Development
Command

/commit

Smart conventional commit with security validation, branch flow enforcement, and auto-detection. Use for git commit, commit changes, save work, stage and commit.

From plugin
fusengine-claude-plugins
3434 skills40 agents34 commands
$ npx -y skills add fusengine/claude-plugins --agent claude-code

Command definition

commit.md
description: Smart conventional commit with security validation, branch flow enforcement, and auto-detection. Use for git commit, commit changes, save work, stage and commit.
argument-hint: "[message] | [type scope message] | (empty for auto-detection)"
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*), Bash(git log:*), Bash(git tag:*), Bash(git push:*), Bash(git pull:*), Bash(git describe:*), Bash(git branch:*), Bash(git checkout:*), Bash(git rev-parse:*), Bash(git remote:*), Bash(git merge-base:*), Bash(git fetch:*), Bash(gh pr create:*), Bash(gh pr view:*), Bash(gh pr merge:*), Bash(gh pr checks:*), Bash(gh pr edit:*), Bash(gh auth:*), Bash(gh run list:*), Bash(gh run watch:*), Bash(gh run view:*), Bash(gh run rerun:*), Bash(git rev-list:*), Bash(npm view:*), Bash(command:*), Read, Edit
disable-model-invocation: false

Smart Conventional Commit

Current State

!`git status`

Staged Changes

!`git diff --staged --stat`

Recent Commits (style reference)

!`git log --oneline -5`

Current Branch

!`git branch --show-current`

Instructions

Based on the context above, create a professional commit.

Step 0: Branch Check (GitHub Flow enforcement)

Read current branch from above.

**If current branch is `main`, `master`, `develop`, or `production`:**

BLOCK direct commits and propose a feature branch:

🌿 Branch Protection
───────────────────────────────
Current: <branch>
Issue: Direct commits to protected branches discouraged (GitHub Flow)
───────────────────────────────

Pre-detect commit type/scope from staged changes (Step 2 logic) to suggest branch name:
  - feat(seo) → feat/seo
  - fix(sniper) → fix/sniper
  - chore(deps) → chore/deps

Proposed branch: <type>/<scope-or-summary>

Options:
  Y → Create branch + continue commit
  N → Abort
  C → Custom branch name

If user accepts → execute `git checkout -b <branch>` then proceed to Step 1. If user declines → STOP, do not commit.

**If current branch already a feature branch** (e.g. `feat/*`, `fix/*`, `chore/*`, `docs/*`, `refactor/*`, `perf/*`, `test/*`, `ci/*`, `build/*`, `style/*`) → skip to Step 1 directly.

**Exceptions** (allow direct commit on main):

  • Repo has only `main` branch and no remote (solo prototype)
  • User explicitly passes `--no-branch-check` in `$ARGUMENTS`
  • Commit type is `chore` AND scope is `release` or `version` (post-commit bump commits)

Step 1: Security Check

BLOCK and output if secrets detected:

🔒 Security Alert
───────────────────────────────
Found: [file or pattern]
Action: Commit blocked
Fix: Remove sensitive data before committing

Check for:

  • `.env`, `.env.*` files
  • Patterns: `password=`, `secret=`, `api_key=`, `token=`
  • Files: `*.pem`, `*.key`, `*credentials*`

Step 2: Analyze and Detect

Output analysis:

📊 Analysis
───────────────────────────────
Files changed: [X]
Files staged: [Y]
Pattern detected: [type]

Step 3: Generate Message

Format: `type(scope): imperative description`

**FORBIDDEN (NO AI SIGNATURE):**

  • NEVER add "Co-authored-by: Claude" or any AI mention
  • Commit must appear 100% human-written

Step 4: Propose Commit

Output proposal:

📝 Proposed Commit
───────────────────────────────
type(scope): description

[body if needed]
───────────────────────────────

⚡ Ready to commit? [Y/N/E]

Step 5: Execute and Confirm

On confirmation, execute and output:

✅ Committed successfully
───────────────────────────────
Hash: [short-hash]
Message: type(scope): description
Files: [X] changed

Execute with HEREDOC format:

git commit -m "$(cat <<'EOF'
type(scope): description
EOF
)"

If $ARGUMENTS provided, use as hint for the message.

Step 6: Post-Commit (universal)

After step 5 succeeds, execute the `post-commit` skill (CHANGELOG + version bump only — **no tag here**, see Step 8 for why).

This runs for ALL repos — the skill auto-detects the repo type internally.

**Bump range**: the skill's Step 0 block decides (single source — do not restate it here): `--no-bump` in `$ARGUMENTS` → skipped; branch already bumped with nothing new since → skipped; otherwise bumps what changed since the last bump (or since the fork point). A re-push round on the same PR never stacks a bump; a plugin changed after the first bump is never merged unbumped.

Step 7: Auto-Release (push + PR + CI watch + merge)

Step 7.0: Base branch + release target (every mode, on the current branch, BEFORE any push or merge)

`gh pr merge --delete-branch` switches to the base branch and deletes the local feature branch, so the release target is captured here, while the branch is still checked out and not yet merged. Self-contained: it relies on no variable from another step or shell.

# Base branch: caller's PR_BASE > the open PR's base > remote default branch > first local main/master/develop
base_branch="${PR_BASE:-$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null)}"
[ -n "$base_branch" ] || base_branch="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null)"
base_branch="${base_branch#origin/}"
if [ -z "$base_branch" ]; then
  for b in main master develop; do
    git rev-parse --verify --quiet "refs/heads/$b" >/dev/null && { base_branch="$b"; break; }
  done
fi
git fetch --quiet origin "$base_branch" 2>/dev/null
# Fork point; HEAD on the base branch itself (LOCAL solo repo) → last commit only
fork="$(git merge-base HEAD "origin/$base_branch" 2>/dev/null || git merge-base HEAD "$base_branch" 2>/dev/null)"
[ "$fork" = "$(git rev-parse HEAD)" ] && fork="$(git rev-parse -q --verify HEAD~1)"
# Release target = the last bump commit in fork..HEAD only (never older history)
bump_line=""
[ -n "$fork" ] && bump_line="$(git log -1 -E --format='%H %s' --grep='^chore: (bump marketplace and CHANGELOG|update CHANGELOG) to [0-9]+\.[0-9]+\.[0-9]+$' "$fork..HEAD")"
bump_sha="${bump_line%% *}"
version="$(printf '%s\n' "$bump_line" | grep -oE '[0-9]+\
Read more
@fusengine
Ships withfusengine-claude-plugins

A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment.

34200 skills40 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
34
Star history of fusengine/agents on GitHub, a chart by star-history.com

Other commands on fusengine-claude-plugins.

apex

apex

Command

APEX Methodology - The systematic Analyze-Plan-Execute-eLicit-eXamine approach for intelligent development. Reduces hallucination…

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command