Back to list
iimuz

commit-staged

by iimuz

2🍴 1📅 Jan 24, 2026

SKILL.md


name: commit-staged description: Commit staged changes only using Conventional Commit parameters (validates inputs).

Commit Staged Changes Skill

Purpose

This skill provides standardized git commit message formatting and execution according to Conventional Commits 1.0.0 specification. It ensures consistent commit message structure with proper type validation and emojis.

Contract

  • Use only the scripts shipped with this skill (do not run extra git commands)
    • Review staged changes via bash scripts/staged-files.sh
    • Create the commit via bash scripts/commit.sh ...
  • Commits only what is already staged (never stages/unstages files)
  • Requires --description to be a natural-language summary (not file paths)
  • Subject/body must be English; subject is imperative, no trailing period

Workflow

  1. Review staged changes (file list + diff; stop if empty):

    bash scripts/staged-files.sh
    
  2. Choose --type, --description, and optional --body based on the staged diff.

    • Subject/body must be English; subject is imperative, no trailing period
    • If using --body, write bullet points starting with "-"
  3. Execute the commit using scripts/commit.sh (it runs git commit internally):

    bash scripts/commit.sh --type <type> --description "<summary>" [--body "<bullets>"]
    

Available Tools

staged-files.sh

A bash script that prints staged file paths and the staged diff (fails if nothing is staged).

Location: scripts/staged-files.sh

Usage:

bash scripts/staged-files.sh

commit.sh

A bash script that formats and executes git commits with standardized format.

Location: scripts/commit.sh

Usage:

bash scripts/commit.sh --type <type> --description <description> [--body <body>]

Parameters:

  • --type: (Required) Commit type. Must be one of: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test, i18n
  • --description: (Required) Short description of the change (max 100 chars including type and emoji)
  • --body: (Optional) Detailed description with bullet points

Output Format:

<type>: <emoji> <description>

[optional body]

Validation:

  • Only --type, --description, and --body parameters are allowed
  • Type must be from the allowed list
  • Fails if there are no staged files
  • Returns exit code 1 on validation errors

Writing a good message (important)

Write natural language based on git diff --staged:

  • Summarize what changed (and ideally why) in a few words
  • Do not use a file-path list as the description (e.g. ".github/.../file.go, ...")
  • Must be in English, imperative mood, no trailing period

Type Reference

TypeDescription
buildBuild system or external dependency changes
choreMaintenance tasks, scripts, config
ciCI configuration and scripts
docsDocumentation changes
featNew features
fixBug fixes
perfPerformance improvements
refactorCode refactoring
revertRevert previous commits
styleCode style changes (formatting, whitespace)
testTest additions or corrections
i18nInternationalization

Examples

Simple commit with description only

bash scripts/commit.sh --type feat --description "add user authentication"

Commit with body

bash scripts/commit.sh \
  --type fix \
  --description "resolve authentication token expiration" \
  --body "- update token refresh logic
- add proper error handling for expired tokens
- improve token validation"

Rules and Guidelines

  1. Subject Line:

    • Format: <type>: <emoji> <description>
    • Use imperative mood
    • No capitalization
    • No period at the end
    • Max 100 characters per line
    • Must be in English
  2. Body (if provided):

    • Use bullet points with "-"
    • Max 100 characters per line
    • Use line breaks for long bullet points
    • Explain what and why
    • Must be in English
  3. Validation:

    • Unknown parameters will cause an error
    • Invalid type will cause an error
    • Missing required parameters will cause an error

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon