Skip to main content

commit

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

来源信息

仓库
softspark/ai-toolkit
最近来源活动
2026年7月27日 11:06
检测到的 SKILL.md 语言
英语
星标
179
分支
21

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
3 个文件

正在显示 SKILL.md

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":"[Truncated]"}]}
# 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
在 GitHub 查看