agentleFS
truongvinhttruongvinht/claude-commit-skill/git-smart-commit/SKILL.md

git-smart-commit

Skill0 starsChanged 8 months agoMITView on GitHub

Generates well-formatted Conventional Commits messages based on the current branch name and actual code changes. Parses branch pattern {type}/{ticket-id} to extract commit type and ticket ID automatically. Suppresses Co-authored-by and other trailers.

7 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions7 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 7

    1. DawnMoon1542/agents-skills★ 8same name
    2. hmj1026/dhpk★ 2same name
    3. xmqywx/claude-code-skills★ 2same name
    4. abdullah1854/ClaudeSuperSkills★ 1same name
    5. Snigdha-Chowdhury/dev-toolkit★ 1same name
    6. hbollon/skills★ 0same name
    7. lencamo/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.

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT append any trailers automatically.

    line 78
  2. Distinctive:

    If there are no staged changes, check for unstaged changes and stage relevant files.

    line 107
  3. Distinctive:

    If nothing to commit, report clearly: "Nothing to commit."

    line 108
  4. Distinctive:

    Never guess ticket IDs — only use what is in the branch name.

    line 109
  5. Very specific:

    Never add Co-authored-by, Signed-off-by, or any other trailers.

    line 110

“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

Git Smart Commit Skill

Generate a git commit by analyzing the current branch name and staged/unstaged changes.

Steps

  1. Get current branch name
    git branch --show-current
  2. Parse branch to extract type and ticket ID

    Branch pattern: {type}/{ticket-id} or {type}/{ticket-id}-optional-slug

    BranchTypeTicket
    feat/TRAN-123featTRAN-123
    fix/TRAN-456-login-bugfixTRAN-456
    refactor/PROJ-42-authrefactorPROJ-42
    main / no pattern(infer from diff)(none)

    Regex: ^(feat|fix|docs|style|refactor|test|chore|ci|build|perf)/([A-Z]+-[0-9]+)(-.*)?$

  3. Analyze changes
    git diff --staged
    git diff
    git status --short
    Understand what changed: files added/modified/deleted, purpose of the change.
  4. Compose commit message

    Format:

    {type}: {ticket} {subject}
    
    {optional body — only for complex changes, max 3-4 bullets}

    Rules:

    • Subject in imperative mood: "Add" not "Added", "Fix" not "Fixed"
    • Subject max 72 characters total (including type: ticket )
    • English only
    • No Co-authored-by: trailer
    • No Signed-off-by: trailer
    • No --no-verify bypass
    • Body only when the change is non-trivial

    Fallback (branch has no ticket pattern):

    {inferred-type}: {subject}
  5. Stage and commit

    git add -A   # or specific files if partial staging is appropriate
    git commit -m "$(cat <<'EOF'
    {commit message here}
    EOF
    )"

    Do NOT append any trailers automatically.

Allowed Types

TypeWhen to use
featNew feature
fixBug fix
docsDocumentation only
styleFormatting, whitespace (no logic change)
refactorCode restructure without feature/fix
testAdding or fixing tests
choreBuild process, tooling, dependencies
ciCI/CD configuration
buildBuild system changes
perfPerformance improvement

Examples

feat: TRAN-123 Add login page component
fix: TRAN-456 Fix token expiration check
refactor: PROJ-42 Simplify auth middleware
docs: Update README with installation steps
chore: Upgrade dependencies to latest versions

Notes

  • If there are no staged changes, check for unstaged changes and stage relevant files.
  • If nothing to commit, report clearly: "Nothing to commit."
  • Never guess ticket IDs — only use what is in the branch name.
  • Never add Co-authored-by, Signed-off-by, or any other trailers.

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.