Agent skill

Commit Smart

by davila7 in davila7/claude-code-templates

Analyze staged/unstaged changes and create semantic conventional commits with context about WHY, not just WHAT.

MITAuto-check passedDevelopment

Install Commit Smart

skills CLI
$ npx skills add davila7/claude-code-templates --skill commit-smart -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates commit-smart --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/git/commit-smart .claude/skills/commit-smart && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
commit-smart
GitHub stars
32k
Token cost
~821 tokens
SKILL.md length
366 words
Files
1
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Analyze staged/unstaged changes and create semantic conventional commits with context about WHY, not just WHAT.

  • Works in 6 steps: Assess the working tree → Handle unstaged changes → Analyze the diff → …
  • Tasks that involve Commit messages
  • SKILL.md covers Workflow and Tips
  • Calls git

What it does

Commit Smart is an agent skill from davila7/claude-code-templates. Analyze staged/unstaged changes and create semantic conventional commits with context about WHY, not just WHAT. Auto-detects commit type and scope from the diff. Supports optional type/scope arguments. Usage - /commit-smart, /commit-smart fix, /commit-smart refactor api

Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Commit messages and Refactoring. It works with Git. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • Tasks that involve Commit messages
  • Tasks that involve Refactoring

Example prompts

  • “/commit-smart”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Assess the working tree
  2. Handle unstaged changes
  3. Analyze the diff
  4. Check for user overrides
  5. Compose the commit message
  6. Confirm and commit

What it can do on your machine

Read from SKILL.md and the folder at commit 4c82aba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Commit Smart loads about 821 tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 366 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~821

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 4c82aba, republished under its MIT licence (© davila7). 366 words, ~821 tokens.

Download SKILL.mdSave it as .claude/skills/commit-smart/SKILL.md (or your agent's skills folder).
name
commit-smart
description
Analyze staged/unstaged changes and create semantic conventional commits with context about WHY, not just WHAT. Auto-detects commit type and scope from the diff. Supports optional type/scope arguments. Usage - /commit-smart, /commit-smart fix, /commit-smart refactor api

Smart Commit

Create meaningful conventional commits by analyzing your actual changes.

Workflow

Step 1: Assess the working tree

Run these commands to understand the current state:

bash
git status
git diff --stat
git diff --cached --stat
Step 2: Handle unstaged changes

If nothing is staged (git diff --cached is empty):

  1. Show the user what files have changed
  2. Suggest what to stage based on logical grouping (e.g., "these 3 files are all related to the auth refactor")
  3. Ask if they want to stage all, or select specific files
  4. Stage the approved files with git add <files>

If changes are already staged, proceed to analysis.

Step 3: Analyze the diff

Read the full staged diff:

bash
git diff --cached

Determine the commit type from the changes:

SignalType
New files with new functionalityfeat
New test files or test additionstest
Changes to existing logic fixing incorrect behaviorfix
Structural changes without behavior changerefactor
package.json, tsconfig, CI config changeschore
Build/bundler config changesbuild
README, docs, comments onlydocs
Formatting, whitespace, semicolons onlystyle
Performance improvementsperf

Determine the scope from the primary directory or module affected:

  • src/api/ -> api
  • src/components/auth/ -> auth
  • tests/ -> tests
  • Root config files -> omit scope
  • Multiple unrelated areas -> omit scope
Step 4: Check for user overrides

If the user provided arguments via $ARGUMENTS:

  • Single word (e.g., fix) -> use as commit type
  • Two words (e.g., refactor api) -> use as type and scope
  • Otherwise -> use auto-detected values
Show full SKILL.md (139 more words)Show less
Step 5: Compose the commit message

Format: type(scope): imperative short description

Rules:

  • Subject line max 72 characters
  • Use imperative mood ("add", "fix", "refactor", not "added", "fixes")
  • Don't end with a period
  • Body explains WHY this change was made, not what changed (the diff shows what)
  • If changes are trivial (typo fix, formatting), skip the body

Example:

feat(auth): add JWT refresh token rotation

Tokens were expiring mid-session for users with slow connections.
Rotating refresh tokens extends the session without compromising
security, since each refresh token can only be used once.
Step 6: Confirm and commit

Show the user the proposed commit message and ask for confirmation.

If confirmed, run:

bash
git commit -m "<message>"

Then verify with:

bash
git log --oneline -1

Show the committed hash and message.

Tips

  • Run after completing a logical unit of work, not after every file change
  • If the diff is too large for one commit, suggest splitting into multiple commits
  • For breaking changes, add ! after the scope: feat(api)!: change response format
  • The body should answer "if someone reads this commit in 6 months, will they understand WHY?"

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in cli-tool/components/skills/git/commit-smart of davila7/claude-code-templates.

Open the folder on GitHubat commit 4c82aba

Compare with similar skills

Commit Smart next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Commit Smart compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Commit Smart this skilldavila7/claude-code-templates32k—~821Automated safety check: PassMIT
Adk Reviewgoogle/adk-python22k—~1.6kAutomated safety check: PassApache-2.0
Conventional CommitterCaoMeiYouRen/caomei-auth220—~309Automated safety check: PassMIT
Checkpointcodewithmukesh/dotnet-claude-kit751—~817Automated safety check: NotesMIT
Codexskills-directory/skill-codex1.5k3 repos~1.8kAutomated safety check: PassMIT
React Router Release Notes Prepremix-run/react-router57k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Adk Review

    google/adk-python

    Official

    Reviews the uncommitted changes in an adk-python working tree and reports correctness, design, public-API stability, test, sample and documentation gaps as a prioritized findings report, fixing them…

    22k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Conventional Committer

    CaoMeiYouRen/caomei-auth

    需要生成 Conventional Commit 提交消息并执行单次提交时使用。适用于 feat、fix、docs、refactor、test、build、ci、chore 等常规提交场景。先检查质量门,再分析 diff,再生成符合 commitlint 预期的消息。

    220 GitHub stars~309 tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Checkpoint

    codewithmukesh/dotnet-claude-kit

    Mid-session save point: create a descriptive git commit and a brief handoff note, then keep working.

    751 GitHub stars~817 tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check: notes
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed
  • React Router Release Notes Prep

    remix-run/react-router

    Polishes pending React Router change files before the versioning scripts run, and decides whether a long-form What's Changed section is warranted.

    57k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 2 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Works with

Categories

Questions about Commit Smart

What does Commit Smart do?

Analyze staged/unstaged changes and create semantic conventional commits with context about WHY, not just WHAT. Commit Smart is an agent skill from davila7/claude-code-templates. Analyze staged/unstaged changes and create semantic conventional commits with context about WHY, not just WHAT.

When should I use Commit Smart?

Commit Smart fits situations like: tasks that involve Commit messages; tasks that involve Refactoring.

How do I install Commit Smart in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill commit-smart -a claude-code`. Or copy the skill folder (cli-tool/components/skills/git/commit-smart in davila7/claude-code-templates) into .claude/skills/commit-smart in your project. Claude Code loads it when a task matches its description.

How do I install Commit Smart in Codex?

Run `npx skills add davila7/claude-code-templates --skill commit-smart -a codex`. Or copy the skill folder (cli-tool/components/skills/git/commit-smart in davila7/claude-code-templates) into .agents/skills/commit-smart in your project. Codex loads it when a task matches its description.

Can I use Commit Smart in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill commit-smart -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/commit-smart, .gemini/skills/commit-smart, .github/skills/commit-smart and .opencode/skills/commit-smart in your project.

What does Commit Smart need to run?

Going by SKILL.md and its folder, Commit Smart needs the command-line tools its instructions call (git).

Does Commit Smart access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Commit Smart safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Commit Smart use?

Commit Smart is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Commit Smart use?

About 821 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Commit Smart?

Skills that share tags, products or a category with Commit Smart: Adk Review (google/adk-python, 22k stars), Conventional Committer (CaoMeiYouRen/caomei-auth, 220 stars), Checkpoint (codewithmukesh/dotnet-claude-kit, 751 stars) and Codex (skills-directory/skill-codex, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Commit Smart?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,432 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 7, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.