agentleFS
ROCmROCm/rocprofiler-systems-skills/skills/git-commit/SKILL.md

git-commit

Skill5 starsChanged 16 days agoMITView on GitHub

Create meaningful git commits with well-structured messages - analyzes changes, generates descriptive subject and body, follows conventional commits

174 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-pr, github-pr-create 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.
  • klauswgSkill

    git-pr

    Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR templates, issue linking, and checks verification. Use when the user asks to draft, create, submit, publish, open, or update a pull request. Always require the user to review and explicitly approve the exact final PR before any push or GitHub write.

    Also in 11 projects that use this

  • mjun0812Skill

    github-pr-create

    Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。

    Also in 3 projects that use this

  • MicrosoftSkill

    git-branch

    Branch management for implementation. Use when you need to create a branch, switch branches, checkout, or verify branching strategy before implementing code. Do not use for commits (use git-commit), pull requests (use pull-request), or advanced git operations (rebase, merge).

    Also in 4 projects that use this

  • klauswgSkill

    git-issue

    Prepare, review, create, or update evidence-based GitHub issues for the current repository with duplicate detection, repository-native templates, valid labels, and post-publication verification. Use when the user asks to draft, file, submit, publish, edit, or refine a GitHub issue, bug report, feature request, performance issue, or technical proposal. Always require the user to review and explicitly approve the exact final issue before any GitHub write.

    Also in 3 projects that use this

  • gologo13Skill

    git-push

    Push current branch to origin and sync with remote updates; keywords: git, rebase. Use only on explicit request; before execution, review diffs and list impact scope.

    Also in 6 projects that use this

  • GoogleSkill

    github-pr-review

    Review a GitHub pull request and leave inline comments in a natural human reviewing voice, indistinguishable from comments typed by hand on the GitHub web UI. Deliberately bounded to defects a reader can settle by looking at the anchored line, rather than a deep audit, so every comment is cheap for the author to check. Scales to 2-20 comments by PR size, parallelises analysis across sub-agents, drafts for approval, then posts individually with human pacing. Use when the user says "review this PR", "review PR 123", pastes a github.com/.../pull/N link, or asks for comments on a pull request. Don't use for reviewing local uncommitted changes or a diff against a branch (use the `review` skill for that).

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 134 edited versions we read keep these.

  • 7

    Distinctive

    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
  1. Distinctive:

    Use this skill when committing changes to create meaningful, well-structured commit messages.

    line 8
  2. Distinctive:

    Write a message that helps future developers understand the context </IMPORTANT>

    line 16
  3. Distinctive:

    If changes touch multiple unrelated concerns, suggest splitting into multiple commits.

    line 105
  4. Distinctive:

    Use bullet points for multiple items

    line 182
  5. Distinctive:

    Do not end subject with period

    line 387
  6. Distinctive:

    Use imperative mood in subject

    line 388
  7. Distinctive:

    Use body to explain what and why, not how

    line 390
  8. Very specific:

    Add /commit as a quick command in radisha-skills:

    line 420

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

Git Commit Skill

Use this skill when committing changes to create meaningful, well-structured commit messages.

<IMPORTANT> **A good commit message explains WHY, not just WHAT.**

Before committing:

  1. Analyze all staged changes
  2. Understand the purpose of the changes
  3. Write a message that helps future developers understand the context</IMPORTANT>

Commit Process

┌─────────────────────────────────────────────────────────────────┐
│                   User asks to commit changes                    │
└─────────────────────────────────────────────────────────────────┘
                                │
                                ▼
                    ┌───────────────────────┐
                    │ Phase 1: Analyze      │
                    │ - Review staged files │
                    │ - Understand changes  │
                    │ - Identify type       │
                    └───────────────────────┘
                                │
                                ▼
                    ┌───────────────────────┐
                    │ Phase 2: Categorize   │
                    │ - Group related files │
                    │ - Check for mixed     │
                    │   concerns            │
                    └───────────────────────┘
                                │
                                ▼
                    ┌───────────────────────┐
                    │ Phase 3: Draft        │
                    │ - Write subject line  │
                    │ - Write body          │
                    │ - Add footer          │
                    └───────────────────────┘
                                │
                                ▼
                    ┌───────────────────────┐
                    │ Phase 4: Review       │
                    │ - Present to user     │
                    │ - Get approval        │
                    │ - Commit              │
                    └───────────────────────┘

Phase 1: Analyze Changes

Get Staged Changes

# See what's staged
git status --short

# See staged diff
git diff --cached

# See staged file names
git diff --cached --name-only

# Get stats
git diff --cached --stat

Understand the Changes

For each changed file, determine:

  • What was added/removed/modified?
  • Why was this change made?
  • What problem does it solve?
  • What behavior changes?

Phase 2: Categorize

Identify Commit Type

TypeDescriptionExample
featNew featureAdding user authentication
fixBug fixFixing null pointer crash
refactorCode restructure (no behavior change)Extracting method
perfPerformance improvementCaching query results
docsDocumentation onlyUpdating README
testAdding/fixing testsAdding unit tests
buildBuild system changesCMake configuration
ciCI/CD changesGitHub Actions workflow
choreMaintenance tasksUpdating dependencies
styleCode style (formatting, no logic change)Fixing indentation

Check for Mixed Concerns

<IMPORTANT> If changes touch multiple unrelated concerns, suggest splitting into multiple commits. </IMPORTANT>

Signs of mixed concerns:

  • Feature code + unrelated refactoring
  • Bug fix + new feature
  • Multiple independent fixes
  • Code changes + documentation updates (sometimes OK)

Ask user if mixed:

{
  "questions": [{
    "question": "Changes include both a bug fix and a new feature. Split into separate commits?",
    "header": "Mixed changes",
    "options": [
      {"label": "Split commits", "description": "Create separate commits for each concern (recommended)"},
      {"label": "Single commit", "description": "Commit everything together"},
      {"label": "Show me", "description": "Show the different concerns first"}
    ],
    "multiSelect": false
  }]
}

Phase 3: Draft Commit Message

Message Structure

<type>(<scope>): <subject>

<body>

<footer>

Subject Line Rules

RuleGoodBad
Imperative mood"Add validation""Added validation"
No period at end"Fix memory leak""Fix memory leak."
Max 50 characters"Add user auth""Add user authentication with OAuth2 support and session management"
Capitalize first letter"Fix crash""fix crash"
Be specific"Fix null check in parser""Fix bug"

Type and Scope

feat(auth): add OAuth2 login support
fix(parser): handle null input gracefully
refactor(api): extract validation logic
docs(readme): add installation instructions
test(auth): add login failure tests

Scope is optional but helpful - identifies the module/component affected.

Body Guidelines

The body explains WHY the change was made:

The previous implementation crashed when users provided empty input
because the parser assumed non-null strings. This fix adds explicit
null checks before processing.

This was discovered in production logs showing ~50 crashes/day
from the /api/parse endpoint.

Body rules:

  • Wrap at 72 characters
  • Explain motivation and context
  • Explain what and why, not how (code shows how)
  • Use bullet points for multiple items

Footer

Used for:

  • Issue references: Fixes #123, Closes #456
  • Breaking changes: BREAKING CHANGE: API signature changed

Phase 4: Review and Commit

Present to User

Show the proposed commit message:

**Proposed commit message:**

---
feat(gpu): add temperature monitoring for MI300 GPUs

Add support for reading GPU temperature sensors on MI300 hardware.
The existing implementation only supported MI200 series.

Key changes:
- Add MI300-specific temperature sensor IDs
- Update device detection to recognize MI300 variants
- Add fallback for unsupported sensor types

This enables rocm-smi to display temperature for the latest hardware.

Fixes #234
---

**Files to be committed:**
- src/gpu/temperature.cpp (modified)
- src/gpu/device_info.cpp (modified)
- include/gpu/sensors.hpp (modified)
- tests/temperature_test.cpp (added)

Ask for Approval

{
  "questions": [{
    "question": "Commit with this message?",
    "header": "Commit",
    "options": [
      {"label": "Commit", "description": "Create commit with this message"},
      {"label": "Edit message", "description": "I want to modify the message"},
      {"label": "Cancel", "description": "Don't commit yet"}
    ],
    "multiSelect": false
  }]
}

Execute Commit

<IMPORTANT> **DO NOT include Co-Authored-By lines in commit messages.** The commit message should only contain the type, scope, subject, body, and footer (issue references/breaking changes). </IMPORTANT>
git commit -m "$(cat <<'EOF'
feat(gpu): add temperature monitoring for MI300 GPUs

Add support for reading GPU temperature sensors on MI300 hardware.
The existing implementation only supported MI200 series.

Key changes:
- Add MI300-specific temperature sensor IDs
- Update device detection to recognize MI300 variants
- Add fallback for unsupported sensor types

This enables rocm-smi to display temperature for the latest hardware.

Fixes #234
EOF
)"

Commit Message Templates

Feature

feat(<scope>): <what was added>

<Why this feature is needed>

<Key implementation details if complex>

<Issue reference if applicable>

Example:

feat(api): add batch processing endpoint

Users frequently need to process multiple items at once.
The current API requires individual requests, causing
unnecessary latency for bulk operations.

- Add POST /api/batch endpoint
- Support up to 100 items per request
- Return partial results on individual failures

Closes #567

Bug Fix

fix(<scope>): <what was fixed>

<What was the bug / symptoms>

<Root cause explanation>

<How it was fixed>

<Issue reference>

Example:

fix(parser): handle empty input without crashing

The application crashed when users submitted empty forms.
Stack trace showed null pointer dereference in validate().

Root cause: Input validation assumed non-empty strings
and called .length() without null check.

Added explicit null/empty checks before processing.

Fixes #789

Refactor

refactor(<scope>): <what was restructured>

<Why refactoring was needed>

<What changed structurally>

<Behavior should be unchanged>

Example:

refactor(auth): extract token validation to separate class

Token validation logic was duplicated across 4 endpoints
and becoming difficult to maintain.

- Extract TokenValidator class
- Move all validation logic to single location
- Update endpoints to use new validator

No behavior changes. All existing tests pass.

Performance

perf(<scope>): <what was optimized>

<Previous performance characteristics>

<New performance characteristics>

<How the improvement was achieved>

Example:

perf(query): add caching for user lookup

User lookup was hitting database on every request,
causing ~200ms latency per API call.

Added Redis cache with 5-minute TTL:
- Cache hit: ~2ms
- Cache miss: ~200ms (unchanged)

Reduces average response time by 60% based on
typical access patterns (80% cache hit rate).

Quick Reference

The Seven Rules

  1. Separate subject from body with blank line
  2. Limit subject to 50 characters
  3. Capitalize subject line
  4. Do not end subject with period
  5. Use imperative mood in subject
  6. Wrap body at 72 characters
  7. Use body to explain what and why, not how

Good vs Bad Examples

BadGood
"fixed bug""fix(auth): prevent session timeout on active users"
"updates""refactor(api): simplify error handling logic"
"WIP""feat(ui): add loading spinner (partial)"
"asdfasdf"(Don't commit with meaningless messages)
"Fixed the thing John mentioned""fix(export): handle special characters in filenames"

When NOT to Commit

  • Unfinished work (use branches or stash)
  • Broken code that doesn't compile
  • Failed tests without good reason
  • Debugging code (console.log, print statements)
  • Credentials or secrets

Integration with Other Skills

After CommitConsider
Multiple commits readygit-prepare-pull-request to create PR
Need to group commitsgit rebase -i to squash/reorder
Wrong commitgit commit --amend (only if not pushed)

Command Alias

Add /commit as a quick command in radisha-skills:

/commit → git-commit

References

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.