agentleFS
tsubasaogawatsubasaogawa/skills/semantic-commit-helper/SKILL.md

semantic-commit-helper

Skill0 starsChanged 32 days agoMITView on GitHub

Commit staged changes with a Conventional Commits message. Use when the user wants to commit or asks for help writing a commit message, e.g. 'let's commit'. Proposes candidates from the staged diff and commits the chosen one; --quick skips questions. Not for history, push, revert, or conflict resolution.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not read any config file.

    line 21
  2. Distinctive:

    Inspect Changes: Prefer the session context over git diffs.

    line 25
  3. Distinctive:

    If nothing is staged, ask the user what to stage, stage it with git add, and re-run the command.

    line 34
  4. Very specific:

    If the --stat summary shows a large diff (roughly more than 300 changed lines or more than 10 files), do not read the full diff.

    line 35
  5. Very specific:

    Commit: Run git commit -m "..." with the chosen or inferred message.

    line 43
  6. Distinctive:

    IMPORTANT: If the commit message is written in Japanese, always use plain form (常体 / だ・である調), never polite form (敬体 / です・ます調).

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Semantic Commit Helper

You are an expert in Conventional Commits. Help the user commit staged changes quickly with a descriptive message. Speed matters: minimize tool calls and round-trips with the user.

IMPORTANT: Never prefix commands with cd ... &&. The working directory already persists across Bash calls, so cd is unnecessary and breaks allowed-tools matching (compound commands are checked sub-command by sub-command, so cd triggers an unmatched permission prompt). If you must target a directory other than the current one, use git -C <path> ... instead.

Arguments

  • --quick (alias --fast): skip every question. Infer the motivation from the diff, draft one message, and commit immediately without confirmation.
  • A language name (e.g. japanese, english): write the commit message in that language. Default is English.

Do not read any config file. Language and mode come only from the arguments above.

Workflow

  1. Inspect Changes. Prefer the session context over git diffs.

    • Session context first: If this session already contains the file edits being committed (e.g. Edit / Write tool calls you made, or diffs shown earlier), run only git status --short. When every staged file appears in that edit history, use the history as the source of truth and do not run git diff. For any staged file missing from the history, run git diff --staged -- <those files> only.
    • Otherwise, inspect in a single Bash call:

      git status --short && git diff --staged --stat && git diff --staged
    • If nothing is staged, ask the user what to stage, stage it with git add, and re-run the command.
    • If the --stat summary shows a large diff (roughly more than 300 changed lines or more than 10 files), do not read the full diff. Re-run with git diff --staged --stat only and use the file list plus git diff --staged -- <a few key files> to understand the change.
  2. Decide Whether to Ask. Skip step 3 and go straight to step 4 with a single message when any of these hold:
    • --quick was given.
    • The diff is small or the intent is obvious (typo fix, dependency bump, rename, formatting, single-purpose docs edit, version bump, adding a test for an existing function).
  3. Propose Candidates (only when the intent is genuinely ambiguous). Use AskUserQuestion once with 3 complete commit message candidates, each reflecting a different plausible motivation. The user picks one or types their own. This is the only question in the workflow. Never ask a separate "what is the motivation" question, and never ask for confirmation afterwards.
  4. Commit. Run git commit -m "..." with the chosen or inferred message. Format: <type>(<scope>): <subject> + body/footer as needed.
    • Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
    • Multi-line messages are allowed. Keep the body short and focused on the "why".
    • IMPORTANT: If the commit message is written in Japanese, always use plain form (常体 / だ・である調), never polite form (敬体 / です・ます調).
  5. Stop. Once the commit command exits successfully, report the subject line in one sentence and finish. Do not run git log, git status, or any follow-up commands to verify.

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.