Index of every page on this site: llms.txt
All skills
zazencodes avatar

/git-commit-conventions

@a174880
Run it yourself

Make focused commits with short messages and the user's git authorship. Use before every commit or push, including /commit.

Use this Skill: https://skilld.dev/gh/zazencodes/skills/git-commit-conventions

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈37 tokens for metadata: the name and description. ≈690 when used: this file. ≈27 more on demand in 1 file.

Description uses 1.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈148 characters, or 1.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Git Commit Conventions

Follow these conventions on every commit.

  • Commit authorship should follow the user's system git config only; no co-author trailers.
  • Commit messages should be very simple: one short line per distinct batch of changes.

Working conventions

  • Read git diff and check for untracked files before deciding on commits.
  • One commit per distinct batch of changes. Only group files together when they are closely related; otherwise commit them separately.
  • Match the message style of the recent commits in this repo.
  • Never add AI attribution — no Co-Authored-By, no "Generated with" footer.
  • Attempt simple fixes yourself; ask for guidance on merge conflicts or anything that risks losing work.

Splitting a mixed working tree

Batches are defined by intent, not by file. Two batches routinely touch the same file — a feature and a follow-up fix to it, a refactor and a behaviour change. That they interleave inside a file is the normal case, not a reason to give up and make one commit.

Default to splitting. Do it without being asked, and do not ask permission first: splitting is expected, and the work below is mechanical and reversible.

  • Separate work the user asked for in separate turns into separate commits. If they said "build X", then later "now fix Y", that is two batches even if Y edits the files X created.
  • Do not merge batches because the split "would be a rebase, not staging" or because a file was rewritten wholesale. Neither is a reason to combine them.
  • git add -p needs a TTY and is unavailable. Use the reconstruct method instead:
    1. Copy the final version of every file containing more than one batch somewhere outside the repo.
    2. git reset --soft HEAD~1 if already committed, otherwise just start here.
    3. Edit those files back to the state of the first batch alone, then commit it.
    4. Restore the saved final versions, then commit the second batch. Repeat step 3–4 for a third batch and beyond.
  • Order commits so each one stands alone: the earlier commit must build and pass tests without the later one. Verify it — git stash -u, check out the earlier commit, run the test suite, then return. An earlier commit that only works once the next lands is a broken split, not a split.
  • Stage explicit paths. git add -A silently sweeps in unrelated untracked files; check git show --stat after committing and amend if something snuck in.
  • When done, confirm the split preserved the work: git diff <original-sha> HEAD should be empty, or show only changes you can name and justify.

If a split genuinely cannot be made to work, say so and explain what blocks it, rather than committing everything together and mentioning it afterwards.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert2d3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    The skill provides guidelines for focused git commits and atomic batch splitting using standard git commands. It operates locally and does not involve external dependencies or network access.

  • Socket14d

    No alerts

  • Snyk2d

    Risk: CRITICAL · 2 issues

Signed by skilld at a174880. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 2 weeks ago

README badge

README badge for zazencodes/skills/git-commit-conventions