Skip to content
Back to skills

Custom Staged Commit

ASecurity

- Current staged changes only: !`git --no-pager diff --staged` - Current branch: !`git rev-parse --abbrev-ref HEAD` - Commit mode (`NORMAL` for base branches, `WIP` otherwise): !`bash "$HOME/.claude/skills/custom-staged-commit/scripts/commit-mode.sh"` - Arguments (`issue-number`, empty if none): `$ARGUMENTS` - Issue number (first numeric token in arguments, empty if none): !`bash "$HOME/.claude/skills/custom-staged-commit/scripts/issue-number.sh" "$ARGUMENTS"`

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 20, 2026
toolsbashgit

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 6, 2026

npx -y skills add mauroporras/dotfiles --skill custom-staged-commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Custom Staged Commit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Custom Staged Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mauroporras-custom-staged-commit/badge)](https://www.skillsdirectory.com/skills/mauroporras-custom-staged-commit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
disable-model-invocation: true
context: fork
background: false
argument-hint: [issue-number]
allowed-tools: Bash(git --no-pager diff *), Bash(git rev-parse *), Bash(git commit *), Bash(bash *)
model: haiku
effort: low
---

# Commit STAGED changes

## Context

- Current staged changes only: !`git --no-pager diff --staged`
- Current branch: !`git rev-parse --abbrev-ref HEAD`
- Commit mode (`NORMAL` for base branches, `WIP` otherwise): !`bash "$HOME/.claude/skills/custom-staged-commit/scripts/commit-mode.sh"`
- Arguments (`issue-number`, empty if none): `$ARGUMENTS`
- Issue number (first numeric token in arguments, empty if none): !`bash "$HOME/.claude/skills/custom-staged-commit/scripts/issue-number.sh" "$ARGUMENTS"`

## Your task

Create a commit for the STAGED changes above using `git commit`.

Unstaged and untracked changes do not exist for this skill: never mention them,
and never let them influence the commit message, even when they touch the same
files as the staged diff.

Guard clause: if the staged diff above is empty, do NOT run `git commit`.
Tell the user nothing is staged and stop.

The arguments have already been parsed for you in the Context above. Use this
precomputed value verbatim; do NOT re-parse `$ARGUMENTS` yourself:

- `Issue number`: the issue number, or empty when none was given.

REQUIRED:

- Commit mode is the `Commit mode` value from the Context above. It is computed
  deterministically; use it verbatim and do NOT re-derive it from the branch name:
  <!--
  Computed by scripts/commit-mode.sh; its branch list mirrors
  `branchColorPatterns` in misc-configs/lazygit/config.yml
  -->
  - `NORMAL`: normal commit.
  - `WIP`: WIP commit.
- Prioritize brevity over grammar in the subject line:
  Keep it short, even if grammatically imperfect
- Subject line:
  - Normal commit: Conventional Commits, `<type>(<scope>): <description>`
    (e.g. `feat(auth): add password reset flow`).
  - WIP commit: `WIP(<current-branch>): <description>`
    Using the current branch as the scope and a brief description of the staged changes.
    Also pass `--no-verify` to `git commit`.
- Body: optional, passed via a second `-m`. Add one only when the change carries
  context the subject line cannot: the WHY behind it, a constraint, a workaround,
  or non-obvious reasoning. Skip it for self-evident changes, and never use it to
  restate the subject or narrate the diff.
  - If `Issue number` (from Context) is non-empty, a body is required and its
    first line MUST be exactly `Close #<Issue number>` (e.g. `Close #72`).
    Any explanation follows after a blank line.

NEVER:

- Run additional Git commands
- Push. This skill commits only; pushing is the user's call.

Files in this skill

  • SKILL.md2.5 KB
  • scripts/commit-mode.sh336 B
  • scripts/issue-number.sh163 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.