Skip to content
Back to skills

Commit

ASecurity

Creates Conventional Commits with pre-commit validation. Triggers: commit, conventional commit, git commit, message.

  • 177 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
developmentpythonbashdockergitapici/cdperformancedocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add softspark/ai-toolkit --skill commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit?

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

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

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: "Creates Conventional Commits with pre-commit validation. Triggers: commit, conventional commit, git commit, message."
effort: medium
disable-model-invocation: true
argument-hint: "[message or scope]"
allowed-tools: Bash, Read, Grep
hooks:
  PreToolUse:
    - matcher: "Bash"
      hooks:
        - type: command
          command: "echo 'Reminder: ensure linting passes before committing'"
---

# Git Commit

$ARGUMENTS

Creates well-structured git commits following Conventional Commits specification.

## Project context

- Staged changes: !`git diff --cached --stat 2>/dev/null || echo "nothing staged"`
- Current branch: !`git branch --show-current 2>/dev/null`

## Commit Format

```
<type>(<scope>): <description>

[optional body]

[optional footer]
```

## Types

| Type | Description |
|------|-------------|
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `style` | Formatting, no code change |
| `refactor` | Code restructuring |
| `perf` | Performance improvement |
| `test` | Adding/updating tests |
| `chore` | Maintenance tasks |
| `ci` | CI/CD changes |

## Examples

```bash
# Feature
git commit -m "$(cat <<'EOF'
feat(search): add multi-hop reasoning support

- Implement query decomposition
- Add iterative retrieval with reasoning
- Include answer synthesis from aggregated context
EOF
)"

# Bug fix
git commit -m "$(cat <<'EOF'
fix(cache): resolve connection pool exhaustion

Root cause: connections not returned to pool on error
Solution: use context manager for automatic cleanup

Fixes #123
EOF
)"
```

## Automated Pre-Commit Check

Run the bundled script for structured pre-commit analysis:

```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/pre-commit-check.py
```

Use the output to validate staged changes, detect secrets, and suggest commit type/scope.

## Pre-Commit Checklist

Before committing:
- [ ] Run linting: `make lint` (or `docker exec {app-container} make lint`)
- [ ] Run tests: `make test` (or `docker exec {app-container} make test`)
- [ ] Check for secrets: No API keys or passwords

## Git Safety

- NEVER use `--force` push without explicit request
- NEVER skip hooks (`--no-verify`) unless explicitly asked
- ALWAYS create NEW commits (don't amend previous unless asked)
- Stage specific files, avoid `git add -A` with sensitive files

Files in this skill

  • SKILL.md2.3 KB
  • scripts/pre-commit-check.py3.2 KB
  • templates/conventional-commit.md1.1 KB

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…