agentleFS
DulajDilDulajDil/claude-skills-manager/skills/commit-and-push/SKILL.md

commit-and-push

Skill1 starsChanged 19 days agoMITView on GitHub

Format, build-check, generate a Conventional Commits message from the staged diff, then commit and (with approval) push. Use this skill whenever the user asks to "commit", "commit and push", "make a commit", "write a commit message", "push these changes", "wrap this up and push it", or similar phrasing — even when they don't explicitly mention conventional commits. Default to using this skill any time the workflow is "I've staged some changes, finish the job."

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use skill-builder.

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.
  • BlockSkill

    skill-builder

    Create, edit, or inspect Berd skills stored as skill folders with SKILL.md files. Use when the user wants to build a new skill, update an existing skill, convert a workflow into a reusable skill, or decide whether instructions, scripts, references, or assets belong in a skill.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 12 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If nothing is staged yet, stop and ask the user what they want staged before proceeding.

    line 26
  2. Distinctive:

    Follow these steps in order.

    line 30
  3. Distinctive:

    Run git status --short to confirm:

    line 34
  4. Distinctive:

    If nothing is staged, stop and tell the user — don't try to stage things on their behalf.

    line 40
  5. Very specific:

    Run npm run format to apply formatting and auto-fix lint errors.

    line 44
  6. Very specific:

    If the script doesn't exist (e.g.

    line 46
  7. Very specific:

    If the repo isn't a Node project at all (no package.json), skip silently.

    line 47
  8. Distinctive:

    If formatting fails with real errors (not "missing script"), surface them and stop — don't commit broken code.

    line 48
  9. Distinctive:

    If formatting touched files that overlap with what was already staged, ask the user: "Formatting modified files that overlap with your …

    line 53
  10. Distinctive:

    If formatting touched unrelated files, leave them alone — the user can decide what to do with them separately.

    line 54
  11. Very specific:

    Run npm run build to catch type errors and broken imports before committing.

    line 58
  12. Distinctive:

    If the script doesn't exist, warn the user and continue.

    line 60
  13. Distinctive:

    If it fails, stop and report the errors.

    line 61
  14. Distinctive:

    Run git diff --staged and read it carefully.

    line 65
  15. Distinctive:

    If the diff is very large, also run git diff --staged --stat to get the file-level summary so you can describe the change at the right …

    line 67
  16. Distinctive:

    Use the Conventional Commits format:

    line 71

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

A safe, repeatable workflow for taking staged changes from "ready" to "pushed", with a Conventional Commits message generated from the actual diff.

When to use

Trigger this skill when the user wants to finalize staged work — typical phrasings:

  • "commit and push"
  • "commit this"
  • "write a commit message for these changes"
  • "push my changes"
  • "wrap this up and push it"

If nothing is staged yet, stop and ask the user what they want staged before proceeding.

Workflow

Follow these steps in order. Each step has a rationale — read it and adapt rather than executing blindly.

1. Sanity check the repo state

Run git status --short to confirm:

  • We're inside a git repo.
  • Something is actually staged (lines starting with M , A , D , R , etc. in the first column).
  • A commit identity is configured. Check with git config user.name and git config user.email. If either is empty, stop and ask the user what identity to use — don't guess, and don't silently write to global git config.

If nothing is staged, stop and tell the user — don't try to stage things on their behalf.

2. Format the code

Run npm run format to apply formatting and auto-fix lint errors.

  • If the script doesn't exist (e.g. npm ERR! Missing script: "format"), warn the user ("no format script in package.json — skipping") and continue.
  • If the repo isn't a Node project at all (no package.json), skip silently.
  • If formatting fails with real errors (not "missing script"), surface them and stop — don't commit broken code.

Important: Formatting may modify files. Any modifications land in the working tree as unstaged changes. After formatting:

  1. Run git status --short again.
  2. If formatting touched files that overlap with what was already staged, ask the user: "Formatting modified files that overlap with your staged changes. Re-stage them so the formatting is included in this commit?" If yes, run git add on those paths.
  3. If formatting touched unrelated files, leave them alone — the user can decide what to do with them separately.

3. Build check

Run npm run build to catch type errors and broken imports before committing.

  • If the script doesn't exist, warn the user and continue.
  • If it fails, stop and report the errors. Do not commit. The user will want to fix the build first.

4. Inspect the staged diff

Run git diff --staged and read it carefully. This is the source of truth for the commit message — not memory of the conversation, not assumptions about what changed. The diff is what gets committed.

If the diff is very large, also run git diff --staged --stat to get the file-level summary so you can describe the change at the right altitude.

5. Compose the commit message

Use the Conventional Commits format:

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.