agentleFS
mapan0424mapan0424/awesome-ai-agent-skills/skills/quick-commit/SKILL.md

quick-commit

Skill0 starsChanged 6 months agoMITView on GitHub

Generate meaningful git commit messages from staged changes

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. galacean/effects-runtime★ 758same name
    2. gvieira18/skills★ 1same name
    3. renatorozas/claude-code-config★ 1same name
    4. dylancasey/claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use git to suggest a message:

    line 165

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Quick Commit

Automatically generate clear, conventional commit messages from your staged changes.

When to Use

✅ Use this skill when:

  • You've made changes and need a commit message
  • You want to follow conventional commit format
  • You're committing multiple related changes
  • You want clear, searchable git history

❌ Do NOT use when:

  • You need to split changes into multiple commits
  • Your changes are too complex to summarize automatically

Prerequisites

  • Git repository initialized
  • Changes staged with git add

Quick Start

# Stage your changes
git add .

# Generate and commit
git commit -m "$(git diff --cached --stat | head -20)"

Instructions

Step 1: Analyze Staged Changes

# See what's staged
git diff --cached --stat
git diff --cached

Step 2: Identify Change Type

TypePrefixWhen to Use
Featurefeat:New functionality
Fixfix:Bug fixes
Docsdocs:Documentation only
Stylestyle:Formatting, no logic change
Refactorrefactor:Code restructuring
Testtest:Adding/fixing tests
Chorechore:Build, deps, config

Step 3: Write the Message

Format: <type>(<scope>): <description>

Examples:

feat(auth): add JWT token refresh mechanism
fix(api): handle null response from user endpoint
docs(readme): update installation instructions
refactor(utils): extract validation logic to separate module

Step 4: Commit

git commit -m "feat(auth): add JWT token refresh mechanism"

Pitfalls

⚠️ Common Mistakes:

1. Too vague messages

Wrong: git commit -m "fix bug" Right: git commit -m "fix(auth): prevent token expiration during long sessions"

2. Committing too much

Problem: One commit with unrelated changes

Solution: Split into logical commits:

git add src/auth/
git commit -m "feat(auth): add password reset flow"

git add src/api/
git commit -m "feat(api): add password reset endpoint"

3. Wrong type prefix

Problem: Using feat for a bug fix

Solution: Be precise:

  • New feature → feat:
  • Fixing broken behavior → fix:
  • Improving code structure → refactor:

Verification

After committing:

  • Message is clear: Can someone understand the change from the message alone?
    git log -1 --oneline
  • Scope is correct: Does the scope match the changed files?
    git diff HEAD~1 --stat
  • Type is accurate: Does the type reflect the change nature?

Examples

Single File Change

# Modified: src/api/users.js
git add src/api/users.js
git commit -m "fix(api): handle missing user profile gracefully"

Multiple Related Files

# Modified: src/auth/login.js, src/auth/middleware.js, tests/auth.test.js
git add src/auth/ tests/auth.test.js
git commit -m "feat(auth): implement refresh token rotation"

Documentation Update

# Modified: README.md, docs/api.md
git add README.md docs/
git commit -m "docs: add API authentication guide"

Configuration Change

# Modified: .eslintrc.js, package.json
git add .eslintrc.js package.json
git commit -m "chore: upgrade ESLint to v9 and update rules"

Advanced: Auto-Generate Message

Use git to suggest a message:

# Show changes summary
git diff --cached --stat | tail -1

# Show changed function names
git diff --cached | grep "^+" | grep -E "(function|def |class |const )" | head -5

# Suggest message based on file types
echo "Changed files:"
git diff --cached --name-only | sed 's/.*\.//' | sort | uniq -c

References


Part of Awesome AI Agent Skills

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.