agentleFS
ultimatileultimatile/development-skills/skills/stage-commit-push/SKILL.md

stage-commit-push

Skill0 starsChanged 32 days agoMITView on GitHub

Stage changed files, generate a conventional commit message, commit, and push in one step.

  • Reads credentials
  • Commits and pushes

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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:

    Check what there is to do before staging anything:

    line 14
  2. Distinctive:

    Always use HEREDOC for the message.

    line 75
  3. Very specific:

    If the branch has no upstream, use git push -u origin <branch>.

    line 83
  4. Distinctive:

    After pushing, show the user:

    line 87

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

Stage, Commit, Push

One-shot skill: stage modified files, generate a commit message, commit, and push.

Procedure

0. Route by working state

Check what there is to do before staging anything:

git status --porcelain                      # non-empty → changes to commit
git log --oneline HEAD --not --remotes      # non-empty → commits no remote has

Route on the pair:

  • Changes to commit — run steps 1 through 5.
  • Nothing to commit, commits no remote has — skip to step 4 and continue through step 5.
  • Neither — report that and make no change.

1. Stage

git add <specific files that were modified>

Stage only the files you changed. Do NOT use git add -A or git add . — be explicit about which files are staged. Never stage files that could contain secrets (.env, credentials).

2. Generate commit message

Inspect the staged diff and recent commits to produce a conventional commits message.

git diff --staged
git log --oneline -5

Type selection — based on what changed and why:

  • Documentation only → docs
  • Build/CI config → ci or build
  • Code style/formatting → style
  • Tests only → test
  • Deps/cleanup → chore
  • Restructuring without behavior change → refactor
  • New functionality that didn't exist before → feat
  • Existing functionality that was wrong/broken → fix

Size doesn't determine type. API signature changes that correct a mistake are fix, not feat.

Title length — keep the commit title (first line) to 72 characters or fewer. Use the body for details.

Exclusions — the message must NOT contain:

  • Phase/step numbers ("Phase 1", "Step 2")
  • Plan or task references ("As part of...", "Following the plan...")
  • Internal implementation context

3. Commit

git commit -m "$(cat <<'EOF'
<title>
<body>
EOF
)"

Always use HEREDOC for the message.

4. Push

git push

If the branch has no upstream, use git push -u origin <branch>.

5. Report

After pushing, show the user:

  • The commit hash and message title
  • The branch and remote status

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.