agentleFS
Bruno-Cunha-SouzaBruno-Cunha-Souza/ValarMindSkills/skills/github-commit/SKILL.md

github-commit

Skill5 starsChanged 6 months agoMITView on GitHub

Generate Conventional Commit from staged diff. Triggers: 'commit', 'create commit', 'commit message'.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 15 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    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:

    Run git diff --staged. If empty, inform the user there are no staged changes and offer help with git add.

    line 25
  2. Distinctive:

    Run git diff --staged --stat for a summary of modified, added, or removed files.

    line 29
  3. Distinctive:

    Look for project-specific commit configurations:

    line 33
  4. Distinctive:

    If found, project conventions take precedence over default rules.

    line 40
  5. Distinctive:

    Read the full diff and identify:

    line 44
  6. Distinctive:

    No period at the end

    line 89
  7. Distinctive:

    Wait for user approval

    line 108
  8. Distinctive:

    After approval, execute git commit with the message

    line 109
  9. Distinctive:

    Follow the Conventional Commits spec strictly

    line 113
  10. Distinctive:

    Never invent changes — only describe what the diff shows

    line 114
  11. Distinctive:

    Never enumerate files or sections in the body — the diff is the enumeration

    line 118
  12. Distinctive:

    Never end the body with a question or confirmation prompt.

    line 119
  13. Distinctive:

    Never commit without explicit user approval

    line 123
  14. Distinctive:

    Never include the AI agent (Claude, Codex, etc.) in the commit message

    line 124
  15. Distinctive:

    Never include co-authorship in the commit message

    line 125

≈ “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

Conventional Commit

Goal

Analyze staged changes and generate a commit message following the Conventional Commits specification, adapted to project conventions when they exist.

Inputs you must collect before starting

InputRequiredHow to obtain
Staged changesYesgit diff --staged
Project conventionsNoCheck commitlint config, CLAUDE.md, CONTRIBUTING.md
Type, scope, or intentNoAsk the user if not clear from the diff

Procedure

Step 1 — Check staged changes

Run git diff --staged. If empty, inform the user there are no staged changes and offer help with git add.

Step 2 — Summary of changed files

Run git diff --staged --stat for a summary of modified, added, or removed files.

Step 3 — Check project conventions

Look for project-specific commit configurations:

  • .commitlintrc, .commitlintrc.json, .commitlintrc.yml, commitlint.config.js, commitlint.config.ts
  • commitlint section in package.json
  • CONTRIBUTING.md, CLAUDE.md
  • Recent commit history: git log --oneline -5

If found, project conventions take precedence over default rules.

Step 4 — Analyze the diff

Read the full diff and identify:

  • What was added, removed, or modified
  • The intent behind the changes (new feature, bug fix, refactor, etc.)
  • Which areas of the codebase were affected

Step 5 — Determine the commit type

Choose the appropriate type:

TypeWhen to use
featNew feature for the user
fixBug fix
refactorCode restructuring without changing behavior
perfPerformance improvement
styleFormatting, whitespace, semicolons (no logic change)
testAdding or fixing tests
docsDocumentation only
buildBuild system, external dependencies
ciCI/CD configuration
choreMaintenance tasks that don't fit other types

Step 6 — Determine the scope (optional)

Identify scope from the area of the codebase affected. Examples: auth, api, ui, db, config. Use scope only if it adds clarity.

Step 7 — Compose the message

Format:


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

<optional body>

<optional footer>

Description (subject line) rules:

  • Maximum 72 characters
  • Imperative mood ("add", not "added" or "adds")
  • Lowercase first letter
  • No period at the end

Body rules (only when needed):

  • Default to no body. Most commits should be subject-only. Add a body only if the "why" is non-obvious from subject + diff (hidden constraint, surprising trade-off, non-local consequence).
  • Hard cap: ≤ 4 lines, ≤ 300 characters total, single paragraph. If you need more, split into multiple commits.
  • Wrap at 72 characters, separated from the description by a blank line.
  • Explain the "why", not the "what". The diff already shows what changed — do not narrate it.
  • Forbidden patterns: per-file or per-section enumeration ("Three changes:", "- File A now does X", "- File B now does Y"); restating the subject in prose; describing code structure ("the function now branches on..."); meta-commentary ("Result:", "Confirma?"); trailing questions.
  • Bullets allowed only when listing 3+ genuinely independent concerns that share one "why". If you can write one sentence instead, do.

Footer rules (when applicable):

  • BREAKING CHANGE: <description> for backward-incompatible changes
  • Refs: #<number> to reference issues or PRs

Step 8 — Present and confirm

  1. Present the message in a code block
  2. Wait for user approval
  3. After approval, execute git commit with the message

Constraints

  • Follow the Conventional Commits spec strictly
  • Never invent changes — only describe what the diff shows
  • Subject line must be at most 72 characters, imperative mood, lowercase, no period
  • Default to subject-only. A body is the exception, not the rule. When unsure, omit it.
  • Body, if present, must be ≤ 4 lines and ≤ 350 characters, wrap at 72, separated by a blank line
  • Never enumerate files or sections in the body — the diff is the enumeration
  • Never end the body with a question or confirmation prompt; the confirmation lives outside the message
  • Project conventions take precedence
  • Include BREAKING CHANGE: in the footer when the change breaks backward compatibility
  • Reference issues/PRs in the footer when the user mentions them
  • Never commit without explicit user approval
  • Never include the AI agent (Claude, Codex, etc.) in the commit message
  • Never include co-authorship in the commit message

Output format

Present the commit message in a code block followed by a confirmation prompt. See examples in EXAMPLE.md.

Example request

  • "Commit my changes"
  • "Create a commit for the login fix"
  • "Commit these changes as a feat"
  • "Commit with scope api"

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.