agentleFS
y-a-v-ay-a-v-a/skills/gg/SKILL.md

gg

Skill0 starsChanged 19 days agoMITView on GitHub

Stage, commit and push the current file changes in one pass. Use when the user asks to commit, "commit and push", "stage and push my changes", "ship this", or invokes /gg. Reads the working tree, writes a commit message in the repository's own style, pushes to the tracking branch, and reports the short SHA. Never force-pushes, never bypasses hooks, and never commits without showing what it staged.

  • Reads credentials
  • Commits and pushes

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

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

    Check what you are about to stage: Read every untracked file before staging it.

    line 33
  2. Very specific:

    Keep the repository's trailers, including Co-Authored-By: Claude <model> <noreply@anthropic.com> if the log has it.

    line 62
  3. Very specific:

    Never --no-verify, never --amend a commit that is already pushed.

    line 64
  4. Distinctive:

    Do not work around it.

    line 66
  5. Very specific:

    Never --force. If the push is rejected as non-fast-forward, stop and report — the pull/rebase is the user's call.

    line 70
  6. Distinctive:

    Commit only what this invocation covers.

    line 81
  7. Distinctive:

    Never rewrite published history, and never reset, checkout over, or clean files to make the commit tidier — that destroys work.

    line 82
  8. Distinctive:

    If the repository is mid-merge, mid-rebase, or in a detached HEAD, stop and say so.

    line 84

≈ “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

gg — stage, commit, push

One invocation takes the working tree from dirty to pushed.

Invocation

  • /gg — all changes in the working tree.
  • /gg <message> — same, but use the given text as the commit subject.
  • /gg <path> [<path>…] — restrict staging to those paths.

Arguments that name existing paths are paths; anything else is the message.

Steps

  1. Read the state. In one batch: git status --porcelain=v1 -b, git diff, git diff --cached, git log -10 --pretty=format:'%s%n%b'. Nothing staged and nothing modified: say so and stop.
  2. Learn the message style from git log: subject mood and capitalization, subject length, whether bodies are used and how they wrap, which trailers appear. Follow that repository, not a generic convention.
  3. Check what you are about to stage. Read every untracked file before staging it. Do not stage, and name to the user instead:
    • credentials and secrets — .env*, *.pem, *.p12, id_rsa, tokens, API keys, connection strings, anything that reads like a secret inside a diff;
    • build output, dependency directories, editor and OS cruft, coverage reports, local scratch files;
    • anything over ~1 MB, and any binary the user has not mentioned. A file that should be ignored belongs in .gitignore, not in the commit.
  4. Stage. git add -- <paths> for the resolved path list. Explicit paths only — never git add -A or git add ., so nothing arrives in the commit unseen.
  5. Show and commit. Print the staged file list and the message you intend to use, then commit with a heredoc:

    git commit -F - <<'MSG'
    <subject>
    
    <body: what changed and why, wrapped as the repo wraps it>
    
    <trailers the repo uses>
    MSG
    • Subject: imperative mood, no trailing period, ≤ 50 characters.
    • Body only when the why is not obvious from the subject.
    • Keep the repository's trailers, including Co-Authored-By: Claude <model> <noreply@anthropic.com> if the log has it.
    • Never --no-verify, never --amend a commit that is already pushed.
    • A failing hook is a real failure: report its output, fix the cause, retry. Do not work around it.
  6. Push. Upstream set: git push. No upstream: git push -u origin $(git branch --show-current).
    • Never --force. If the push is rejected as non-fast-forward, stop and report — the pull/rebase is the user's call.
    • --force-with-lease only on an explicit request, never on your own judgment.
    • Pushing to the default branch is fine when that is where the user already is; do not silently create a branch instead.
  7. Report one line: short SHA, subject, branch, and how many files went in.

Constraints

  • Commit only what this invocation covers. Unrelated pending work stays dirty.
  • Never rewrite published history, and never reset, checkout over, or clean files to make the commit tidier — that destroys work.
  • If the repository is mid-merge, mid-rebase, or in a detached HEAD, stop and say so.

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.