agentleFS
griddynamicsgriddynamics/specflow/.claude/skills/creating-commits/SKILL.md

creating-commits

Skill9 starsChanged 5 months agoMITView on GitHub

Create well-structured git commits with clear, conventional commit messages. Use this skill whenever the user asks to commit changes, "commit this", "save my work", "make a commit", "write a commit message", or after completing a coding task when changes need to be committed. Also use when the user asks to split changes into multiple commits, amend a commit, or improve an existing commit message.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Always follow these steps in order:

    line 12
  2. Distinctive:

    Run these in parallel to understand the state of the repo:

    line 16
  3. Distinctive:

    Never commit blind. Read the actual diff — the commit message must describe what changed, not what you think you changed.

    line 25
  4. Distinctive:

    One logical change per commit: If the diff contains unrelated changes (e.g., a bug fix AND a refactor AND a config tweak), propose …

    line 29
  5. Distinctive:

    Check for files that should not be committed: secrets, credentials, large binaries, generated output.

    line 31
  6. Distinctive:

    Do not commit commented-out code or leftover debug statements without flagging them first.

    line 32
  7. Distinctive:

    Use a heredoc for multi-line messages:

    line 66
  8. Distinctive:

    Run git status and git log -1 --stat after committing to confirm the commit contains exactly what was intended.

    line 83
  9. Distinctive:

    Amending: only git commit --amend when the commit has NOT been pushed, and confirm with the user first.

    line 87
  10. Distinctive:

    Empty diff: if there is nothing to commit, say so — do not create empty commits.

    line 88
  11. Very specific:

    Pre-commit hooks: if a hook fails, fix the underlying issue rather than using --no-verify.

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Creating Commits

A skill for producing clean, atomic commits with high-quality messages.

Workflow

Always follow these steps in order:

1. Inspect before committing

Run these in parallel to understand the state of the repo:

git status                 # what's staged, unstaged, untracked
git diff                   # unstaged changes
git diff --staged          # staged changes
git log --oneline -10      # recent messages, to match repo style

Never commit blind. Read the actual diff — the commit message must describe what changed, not what you think you changed.

2. Decide what belongs in the commit

  • One logical change per commit. If the diff contains unrelated changes (e.g., a bug fix AND a refactor AND a config tweak), propose splitting into separate commits. Use git add -p or stage files selectively.
  • Never use git add . or git add -A reflexively. Stage files explicitly by path so unrelated or accidental files (logs, .env, build artifacts, editor files) don't slip in.
  • Check for files that should not be committed: secrets, credentials, large binaries, generated output. Warn the user if any appear in the diff.
  • Do not commit commented-out code or leftover debug statements without flagging them first.

3. Write the message

Detect the repo's convention from git log. If the repo uses Conventional Commits, follow it. Otherwise use the standard format below.

Format:

<type>(<optional scope>): <summary, imperative, ≤50 chars>

<body: what and WHY, wrapped at 72 chars — optional for trivial changes>

Types (Conventional Commits): feat, fix, refactor, perf, docs, test, build, ci, chore, style, revert.

Subject line rules:

  • Imperative mood: "add validation", not "added" or "adds". Test: the line should complete "If applied, this commit will ___".
  • ≤50 characters, no trailing period, lowercase after the type prefix.
  • Be specific: fix: prevent race condition in session refresh — not fix: bug fix or update code.

Body rules (when needed):

  • Explain why the change was made and any non-obvious consequences; the diff already shows what.
  • Mention alternatives considered or constraints if relevant.
  • Skip the body only for genuinely trivial changes (typo fixes, version bumps).

Never:

  • Vague messages: "fixes", "wip", "updates", "misc changes".
  • Restating the diff line-by-line.
  • Bundling "and also..." — that's a sign the commit should be split.
  • Adding footer and information about co-author like Claude etc.

4. Commit

Use a heredoc for multi-line messages:

git commit -m "$(cat <<'EOF'
fix(auth): prevent race condition in token refresh

Two concurrent requests could both detect an expired token and
trigger duplicate refresh calls, invalidating each other's sessions.
Serialize refresh behind a per-user mutex.

Fixes #482
EOF
)"

5. Verify

Run git status and git log -1 --stat after committing to confirm the commit contains exactly what was intended.

Special cases

  • Amending: only git commit --amend when the commit has NOT been pushed, and confirm with the user first.
  • Empty diff: if there is nothing to commit, say so — do not create empty commits.
  • Pre-commit hooks: if a hook fails, fix the underlying issue rather than using --no-verify. Only bypass hooks if the user explicitly asks. If a hook modifies files (e.g., a formatter), re-stage and retry once.
  • Never push, force-push, or rewrite history unless the user explicitly asks.
  • Breaking changes: mark with ! after the type (feat!:) and a BREAKING CHANGE: footer explaining migration.

Examples

Good:

feat(api): add cursor-based pagination to /orders endpoint

Offset pagination degraded past ~100k rows. Cursor pagination keeps
response times flat and matches the pattern used in /customers.
chore: bump lodash to 4.17.21

Bad:

update stuff
fixed the thing we talked about
WIP
feat: changes to api and also fixed tests and updated readme

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.