agentleFS
phdengphdeng/ClaudeCodeChat/.claude/skills/commit/SKILL.md

commit

Skill1 starsChanged 9 months agoMITView on GitHub

Smart commit creation with conventional commits. Use when user says "commit" or requests committing changes. Handles staged file detection, suggests splits for multi-concern changes, and applies proper commit format without emoji prefixes.

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-branch, review-r 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.
  • SentrySkill

    create-branch

    Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.

    Also in 4 projects that use this

  • luischanciSkill

    review-r

    Run the R code review protocol on R scripts. Checks code quality, reproducibility, domain correctness, and professional standards. Produces a report without editing files.

    Also in 3 projects that use this

  • 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

  • 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

  • AWSSkill

    issue

    Implement a GitHub issue end-to-end — branch, code, test, docs, and commit.

    Also in 9 projects that use this

  • luischanciSkill

    validate-bib

    Validate bibliography entries against citations in all manuscript files. Find missing entries and unused references.

    Also in 3 projects that use this

  • +2 more from luischanci

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always --signoff for DCO compliance

    line 15
  2. Distinctive:

    Use body for "why" if needed

    line 60
  3. Distinctive:

    When changes need more context, add a body:

    line 68
  4. Distinctive:

    Use bullet points for lists

    line 89
  5. Distinctive:

    Add exclamation mark (!) after type for breaking changes:

    line 103
  6. Very specific:

    If user requests --no-verify:

    line 112
  7. Distinctive:

    Only proceed if confirmed.

    line 119
  8. Distinctive:

    Add Claude signature to commits

    line 160
  9. Distinctive:

    Commit without checking staged status

    line 161
  10. Distinctive:

    Use past tense ("added" -> "add")

    line 163
  11. Very specific:

    Ask approval for --no-verify

    line 173

“Common” is measured: kept by at least 6 in 10 of the 174 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

Commit Skill

Creates well-formatted commits following conventional commit standards.

Core Features

  • Staged vs unstaged detection - commits only staged files when present
  • Split suggestions - analyzes diffs for multiple logical changes
  • Conventional commits format: <type>: <description>
  • Pre-commit hook integration
  • Always --signoff for DCO compliance

Process

1. Analyze Changes

git status --short

# Prefer staged files if any exist
if ! git diff --staged --quiet; then
  git diff --staged --stat
else
  git diff HEAD --stat
fi

2. Multi-Concern Detection

Suggest split if:

  • Different patterns: src/ + test/ + docs/
  • Mixed types: feat + fix + docs
  • Unrelated concerns: auth logic + UI styling
  • Large changeset: >500 lines

Ask user:

Multiple concerns detected:
1. Auth changes (src/auth/*)
2. UI updates (src/components/*)
3. Docs (README.md)

Split into 3 commits?
- feat: add JWT authentication
- style: update login UI
- docs: update auth documentation

[split/all]

3. Create Commit

Format: <type>: <description>

Rules:

  • Imperative mood ("add" not "added")
  • First line <72 chars
  • Atomic (single purpose)
  • Use body for "why" if needed
git commit --signoff -m "<type>: <description>"

Commit Body Conventions

When changes need more context, add a body:

git commit --signoff -m "$(cat <<'EOF'
<type>: <description>

<body>
EOF
)"

When to Include Body

  • Multiple files changed
  • Non-obvious reasoning
  • Breaking changes
  • Related issues/PRs

Body Format

  • Blank line after subject
  • Wrap at 72 chars
  • Explain "why" not "what"
  • Use bullet points for lists

Body Example

feat: add user authentication

- Implement JWT token validation
- Add protected routes middleware
- Include refresh token support

Closes #123

Breaking Changes

Add exclamation mark (!) after type for breaking changes:

feat!: change API response format

BREAKING CHANGE: Response now returns { data, meta }
instead of flat object. Update all API consumers.

4. Handle --no-verify

If user requests --no-verify:

Warning: Requested to skip pre-commit hooks.
Bypasses: linting, tests, formatting
Reason: [ask user]
Approve? [yes/no]

Only proceed if confirmed.

Commit Types

TypeUse Case
featNew feature
fixBug fix
docsDocumentation
styleFormatting, styling
refactorCode restructure
perfPerformance
testTests
choreBuild/tools
ciCI/CD
securitySecurity fix
buildBuild system
revertRevert changes
wipWork in progress

Split Examples

Bad - Mixed concerns

+ src/auth/login.ts (feat)
+ src/components/Button.css (style)
+ README.md (docs)

Split into: 3 separate commits

Good - Single concern

+ src/auth/login.ts
+ src/auth/middleware.ts
+ tests/auth.test.ts

One commit: feat: add authentication

Critical Rules

NEVER

  • Add Claude signature to commits
  • Commit without checking staged status
  • Skip split suggestions for multi-concern
  • Use past tense ("added" -> "add")
  • Make first line >72 chars
  • Bypass hooks without asking

ALWAYS

  • Use --signoff flag
  • Analyze diff before commit
  • Suggest splits when appropriate
  • Use imperative mood
  • Pick correct type
  • Ask approval for --no-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.