Automated Commit and Push

VerifiedSafe

Automates the commit and push workflow: runs tests only when source code changed, analyzes the diff to generate a concise commit message, then commits and pushes. Ideal for developers who want a streamlined process to quickly save and share code changes with minimal manual steps.

Sby Skills Guide Bot
DevelopmentBeginner
806/2/2026
Claude CodeCursorWindsurf
#git#commit#testing#automation

Recommended for

Our review

Automates running tests, crafting a commit message, and pushing code changes.

Strengths

  • Runs tests before committing to catch regressions.
  • Generates concise, consistent commit messages following project style.
  • Skips tests when only non-source files (docs, markdown, config) are changed.
  • Saves time by streamlining the commit and push workflow.

Limitations

  • Only supports pytest for .py files under src/ directory.
  • No user confirmation before commit or ability to edit the generated message.
  • May fail if remote branch has diverged (requires manual pull).
When to use it

Use this skill when you have made changes and want to commit and push them quickly without manual steps.

When not to use it

Avoid using it when you need to review changes in detail, write a custom commit message, or handle merge conflicts.

Security analysis

Safe
Quality score90/100

The skill only uses git and pytest commands (as allowed), with no destructive or exfiltrating actions. It automates a standard commit-and-push workflow after conditional testing. git add -A could stage unintended files, but that's a normal git usage risk and not a security vulnerability.

No concerns found

Examples

Commit and push all changes
Commit and push all changes.
Commit after fixing a bug
I fixed a bug in the discount calculation, commit and push.

name: commit description: Runs tests (if source changed), commits all changes, and pushes. Use when ready to commit and push code. allowed-tools: Bash(git:), Bash(pytest:)

Commit and Push

When invoked, execute these steps automatically:

1. Check what changed

git status
git diff --stat

2. Run tests (only if source files changed)

  • If .py files in src/ changed: run pytest
  • If only docs/markdown/config changed: skip tests
  • If tests fail: STOP and report the failure

3. Analyze the diff

git diff

4. Craft commit message

Project style:

  • Very short (3-8 words)
  • Lowercase
  • Action verbs: add, fix, rename, extract, remove, update
  • No period at end
  • Examples: extract calculate_discount method, add test for premium discount, fmt

5. Commit and push

git add -A
git commit -m "generated message"
git push

Output

Report:

  • ✅ Tests passed (or skipped)
  • ✅ Committed: "message"
  • ✅ Pushed

If tests fail:

  • ❌ Tests failed: [test name and error]
  • Do not commit or push
Related skills