agentleFS
YangsonHungYangsonHung/awesome-agent-skills/skills/en/git-commit-only/SKILL.md

git-commit-only

Skill18 starsChanged 5 days agoMITView on GitHub

Use when creating one local Git commit without pushing. Supports diff-based Conventional Commit type/scope/message generation, staged or requested change handling, segmented commit bodies for non-trivial changes, and safe commit-only workflows. Trigger for requests such as "commit this", "create a commit", "commit current changes without pushing", or local-only handoff.

  • Reads credentials
  • Deletes or force-pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

26 rules. About 0 are common, 17 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    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:

    Create one focused local Conventional Commit from the current repository's staged or requested changes without pushing to any remote.

    line 10
  2. Very specific:

    Use ! after the type or scope, such as feat(api)!: remove legacy field.

    line 47
  3. Very specific:

    Add a BREAKING CHANGE: footer when the behavioral contract changes.

    line 48
  4. Distinctive:

    Use the repository's existing commit language.

    line 51
  5. Very specific:

    Write the subject in present tense and imperative mood, such as fix login redirect.

    line 52
  6. Distinctive:

    Keep the subject under 72 characters when practical.

    line 53
  7. Distinctive:

    Use this skill when the user asks to:

    line 58
  8. Distinctive:

    Commit the current work without pushing.

    line 59
  9. Distinctive:

    Create one local commit from staged and unstaged changes.

    line 60
  10. Distinctive:

    Do not use this skill for:

    line 66
  11. Very specific:

    Commit-and-push requests; use git-pushing-fast instead.

    line 67
  12. Distinctive:

    Follow this workflow in order.

    line 75
  13. Distinctive:

    Run git status --short and git branch --show-current.

    line 78
  14. Distinctive:

    Use git status --porcelain when script-friendly status parsing is useful.

    line 80
  15. Distinctive:

    Never discard or revert user changes.

    line 81
  16. Distinctive:

    If the user asked to commit everything, run git add -A.

    line 84
  17. Distinctive:

    If the user requested a narrower scope, stage only that scope.

    line 85
  18. Distinctive:

    Use file-specific adds, path patterns, or git add -p only when the requested scope requires logical grouping.

    line 86
  19. Very specific:

    Never leave known secrets staged for commit, including .env, credential files, private keys, or tokens.

    line 88
  20. Very specific:

    Use Conventional Commits: type(scope): concise summary in the repository's existing commit language.

    line 91
  21. Very specific:

    Use git commit with multiple -m arguments or an editor-free equivalent so the body is preserved.

    line 116
  22. Very specific:

    Do not use --no-verify.

    line 117
  23. Distinctive:

    If hooks or validation fail, fix the failure and retry the commit.

    line 118
  24. Distinctive:

    Keep the final response concise.

    line 121
  25. Distinctive:

    Never update global or system Git config.

    line 128
  26. Very specific:

    Never run destructive commands such as git reset --hard or git checkout -- <file> unless explicitly requested.

    line 129

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

Git Commit Only

Overview

Create one focused local Conventional Commit from the current repository's staged or requested changes without pushing to any remote.

The default output is one commit on the current branch. Analyze the actual diff, stage the requested change set, generate the commit message from the change content, and write a segmented body for non-trivial changes so reviewers can quickly see what changed by topic.

This workflow handles local commit requests only. It does not push, merge branches, rewrite history, create pull requests, or publish changes.

Conventional Commit Rules

Base format:

<type>[optional scope]: <description>

[body: optional only for trivial changes; required and segmented for non-trivial changes]

[footer(s): required for breaking changes; optional for relevant issue references]

For this skill, the body is optional only for trivial commits. For non-trivial changes, write a segmented body and include a Tests: or localized equivalent section when tests, validators, hooks, or manual verification ran.

Types:

TypeUse for
featNew user-facing or product capability
fixBug fix
docsDocumentation-only change
styleFormatting/style change with no logic impact
refactorCode restructure with no feature or bug fix
perfPerformance improvement
testTest-only or test coverage change
buildBuild system, dependency, or packaging change
ciCI or automation config change
choreMaintenance or miscellaneous change
revertRevert a previous commit

Breaking changes:

  • Use ! after the type or scope, such as feat(api)!: remove legacy field.
  • Add a BREAKING CHANGE: footer when the behavioral contract changes.

Message style:

  • Use the repository's existing commit language.
  • Write the subject in present tense and imperative mood, such as fix login redirect.
  • Keep the subject under 72 characters when practical.
  • Reference issues in the body or footer when relevant, such as Closes #123 or Refs #456.

When to Use

Use this skill when the user asks to:

  • Commit the current work without pushing.
  • Create one local commit from staged and unstaged changes.
  • Save current work locally with a Conventional Commit message.
  • Include a readable commit body that groups changes by feature area, UI area, tests, docs, or validation.

Do Not Use

Do not use this skill for:

  • Commit-and-push requests; use git-pushing-fast instead.
  • Multi-branch flows that merge a work branch into a primary branch.
  • Force-push, rebase, squash, amend, or history-rewrite requests.
  • Pull request creation, release notes, weekly reports, or changelog generation.
  • Destructive commands such as git reset --hard or git checkout -- <file>.

Instructions

Follow this workflow in order. Stop and report the blocker instead of guessing when the target repository or requested commit scope is unclear.

  1. Inspect the repository.
    • Run git status --short and git branch --show-current.
    • Review the staged diff with git diff --cached --stat and git diff --cached; if nothing is staged, review git diff --stat and git diff.
    • Use git status --porcelain when script-friendly status parsing is useful.
    • Never discard or revert user changes.
  2. Stage changes.
    • If the user asked to commit everything, run git add -A.
    • If the user requested a narrower scope, stage only that scope.
    • Use file-specific adds, path patterns, or git add -p only when the requested scope requires logical grouping.
    • Re-run git status --short and verify the intended files are staged.
    • Never leave known secrets staged for commit, including .env, credential files, private keys, or tokens.
  3. Build the commit message.
    • Use Conventional Commits: type(scope): concise summary in the repository's existing commit language.
    • Choose the type and scope from the actual diff, not from filenames alone.
    • For non-trivial changes, include a segmented body with 2-5 short sections.
    • Each section title should name the affected area, followed by bullet points.
    • Include a Tests: or localized equivalent section when tests, validators, hooks, or manual verification ran.

Example segmented body:

fix(module): update component behavior

Behavior:
- Adjust the default state for the affected component.
- Keep existing behavior unchanged for unsupported input.

Implementation:
- Move repeated logic into a small helper.
- Update related configuration to use the new helper.

Tests:
- Add coverage for the updated behavior.
- Run the relevant validator before committing.
  1. Commit.
    • Use git commit with multiple -m arguments or an editor-free equivalent so the body is preserved.
    • Do not use --no-verify.
    • If hooks or validation fail, fix the failure and retry the commit.
  2. Report.
    • Keep the final response concise.
    • Include the commit hash, branch, committed files summary, and validation that ran.
    • State explicitly that no push was performed.

Safety Protocol

  • Never push.
  • Never update global or system Git config.
  • Never run destructive commands such as git reset --hard or git checkout -- <file> unless explicitly requested.
  • Never skip hooks.
  • Never commit secrets.

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.