Skip to content
Back to skills

Commit 35

ASecurity

Runs tests (if source changed), commits all changes, and pushes. Use when ready to commit and push code.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
toolsbashgit

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill commit-35 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit 35?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Commit 35
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-commit-35/badge)](https://www.skillsdirectory.com/skills/david-li0406-commit-35)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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
```bash
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
```bash
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
```bash
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…