agentleFS
gabriellstgabriellst/codm/.claude/skills/commit/SKILL.md

commit

Skill4 starsChanged 2 months agoMITView on GitHub

Create a well-formatted git commit. Use when ready to commit changes with proper message and co-author attribution. Use this skill for conventional commit formatting, smart staging, and proper Co-Authored-By tagging.

  • Reads credentials

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 169 edited versions we read keep these.

  • 3

    Distinctive

    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:

    When committing related changes across multiple files:

    line 155
  2. Distinctive:

    Commit was just made (not pushed)

    line 206
  3. Distinctive:

    Commit was pushed to remote

    line 225

“Common” is measured: kept by at least 6 in 10 of the 169 edited versions of this file we could read. “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

Create Git Commit

Creates a well-formatted git commit following project conventions.

Prerequisites

  • Changes ready to commit
  • Working directory has modifications

Process

Step 1: Check Status

git status

Review:

  • Staged changes
  • Unstaged changes
  • Untracked files

Step 2: Review Changes

# See all changes
git diff

# See staged changes
git diff --staged

# See recent commits for style reference
git log --oneline -5

Step 3: Stage Files

# Stage specific files by name (preferred — avoids accidentally staging secrets or generated files)
git add <file1> <file2>

# Stage all files in a specific directory
git add packages/api/typescript/src/product/

# AVOID: git add . or git add -A (can stage sensitive files like .env or large binaries)
# AVOID: git add -p (requires interactive input, not supported in agent mode)

Don't commit:

  • .env files with secrets
  • node_modules/
  • Build artifacts
  • Generated files (unless intentional)

Step 4: Write Commit Message

Format:

<type>: <short description>

<optional body explaining why>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Types:

  • feat: New feature
  • fix: Bug fix
  • refactor: Code refactoring
  • docs: Documentation
  • style: Formatting (no code change)
  • test: Adding tests
  • chore: Maintenance tasks

Examples:

# Simple feature
git commit -m "$(cat <<'EOF'
feat: add product creation endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

# Bug fix with explanation
git commit -m "$(cat <<'EOF'
fix: correct query param parsing in ListProducts

Query params were not being converted from strings,
causing type errors when filtering by page number.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

# Refactoring
git commit -m "$(cat <<'EOF'
refactor: extract ProductCard component

Reduces duplication in product listing pages
and improves maintainability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

Step 5: Verify Commit

# Check commit was created
git log -1

# Verify files included
git show --stat HEAD

Commit Message Guidelines

Subject Line

  • Max 50 characters (hard limit: 72)
  • Imperative mood: "add feature" not "added feature"
  • No period at end
  • Lowercase (except proper nouns)

Body (when needed)

  • Wrap at 72 characters
  • Explain why, not what (code shows what)
  • Separate from subject with blank line

Good vs Bad Messages

# Good ✓
feat: add user authentication with JWT
fix: handle null case in product lookup
refactor: simplify order state machine

# Bad ✗
update code                    # Too vague
Fixed bug                      # Past tense, no details
Add new feature for users.     # Period, vague
FEAT: ADD AUTHENTICATION       # Caps, shouty

Multi-File Commits

When committing related changes across multiple files:

# Stage related files
git add packages/api/typescript/src/product/controllers/CreateProduct.ts
git add packages/api/typescript/src/product/controllers/index.ts
git add packages/api/typescript/src/product/errors/index.ts

# Commit with descriptive message
git commit -m "$(cat <<'EOF'
feat: add CreateProduct controller

- Define InputSchema with validation
- Define OutputSchema with examples
- Register errors in GlobalErrorMapper

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

Commit Separation

Separate commits for:

  • Different features
  • Backend vs frontend changes (sometimes)
  • Refactoring vs new features

Single commit for:

  • Related changes that make sense together
  • Feature + its tests
  • Controller + error registration

Pre-Commit Checks

Before committing, ensure:

# Type check
bun tsc

# Lint
bun lint

# Tests (if available)
bun test

Amending Commits

Only amend if:

  1. Commit was just made (not pushed)
  2. Need to add forgotten files
  3. Need to fix typo in message
# Add more changes to last commit
git add <forgotten-file>
git commit --amend --no-edit

# Fix commit message
git commit --amend -m "$(cat <<'EOF'
feat: corrected message

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

Never amend if:

  • Commit was pushed to remote
  • Others might have pulled

Commit Checklist

  • Changes reviewed with git diff
  • Only relevant files staged
  • No secrets or sensitive data
  • No generated files (unless intentional)
  • Message follows format
  • Type is appropriate
  • Subject is clear and concise
  • Co-author line included
  • Commit verified with git log -1

Example Workflow

# 1. Check what changed
git status
git diff

# 2. Stage files
git add packages/api/typescript/src/product/

# 3. Create commit
git commit -m "$(cat <<'EOF'
feat: implement product CRUD endpoints

- CreateProduct: POST /product
- UpdateProduct: PUT /product/:id
- DeleteProduct: DELETE /product/:id
- GetProduct: GET /product/:id
- ListProducts: GET /product

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

# 4. Verify
git log -1 --stat

References

Download now (ZIP)

  • Other versions189 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 189

    1. microsoft/vscode★ 194ksame name
    2. TryGhost/Ghost★ 56ksame name
    3. ToolJet/ToolJet★ 41ksame name
    4. ShareX/ShareX★ 41ksame name
    5. openai/symphony★ 27ksame name
    6. ccusage/ccusage★ 19ksame name
    7. ryoppippi/ccusage★ 19ksame name
    8. windmill-labs/windmill★ 18ksame name
    9. EverMind-AI/EverOS★ 14ksame name
    10. EverMind-AI/EverMemOS★ 14ksame name

    179 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use act-on-feedback, add-mcp-tools and 10 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • MicrosoftSkill

      act-on-feedback

      Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

      Also in 3 projects that use this

    • decocmsSkill

      add-mcp-tools

      Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration

      Also in 3 projects that use this

    • MicrosoftSkill

      generate-run-commands

      Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

      Also in 3 projects that use this

    • decocmsSkill

      run-local-freestyle

      Run Studio locally with chats and task runs executing in real Freestyle sandboxes, reachable through an ngrok tunnel. Use when asked to "run locally with Freestyle", "test claude-code chats locally", "run the sandbox harness end to end", or to try daemon/harness-runner changes in a real sandbox.

      Also in 3 projects that use this

    • mitsuhikoSkill

      oebb-scotty

      Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.

      Also in 3 projects that use this

    • mitsuhikoSkill

      pi-share

      Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.

      Also in 3 projects that use this

  • In this repository45 other files it gives its agents.

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.