AGENT SKILL

Git规范提交与信息生成

git-commit

执行 git commit,包含约定式提交信息分析、智能暂存与提交信息生成。当用户要求提交更改、创建 git commit 或提到 "/commit" 时使用。支持:(1) 从更改中自动检测类型与作用域,(2) 根据 diff 生成约定式提交信息,(3) 交互式提交,可选择覆盖类型/作用域/描述,(4) 智能文件暂存以实现逻辑分组。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 1
Forks
1

01 前言 Front Matter

name
git-commit
license
MIT
description
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
allowed-tools
Bash

03 SKILL.md 正文

Git Commit with Conventional Commits

Overview

Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.

Conventional Commit Format

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Commit Types

Type Purpose
feat New feature
fix Bug fix
docs Documentation only
style Formatting/style (no logic)
refactor Code refactor (no feature/fix)
perf Performance improvement
test Add/update tests
build Build system/dependencies
ci CI/config changes
chore Maintenance/misc
revert Revert commit

Breaking Changes

# Exclamation mark after type/scope
feat!: remove deprecated endpoint

# BREAKING CHANGE footer
feat: allow config to extend other configs

BREAKING CHANGE: `extends` key behavior changed

Workflow

1. Analyze Diff

# If files are staged, use staged diff
git diff --staged

# If nothing staged, use working tree diff
git diff

# Also check status
git status --porcelain

2. Stage Files (if needed)

If nothing is staged or you want to group changes differently:

# Stage specific files
git add path/to/file1 path/to/file2

# Stage by pattern
git add *.test.*
git add src/components/*

# Interactive staging
git add -p

Never commit secrets (.env, credentials.json, private keys).

3. Generate Commit Message

Analyze the diff to determine:

  • Type: What kind of change is this?
  • Scope: What area/module is affected?
  • Description: One-line summary of what changed (present tense, imperative mood, <72 chars)

4. Execute Commit

# Single line
git commit -m "<type>[scope]: <description>"

# Multi-line with body/footer
git commit -m "$(cat <<'EOF'
<type>[scope]: <description>

<optional body>

<optional footer>
EOF
)"

Best Practices

  • One logical change per commit
  • Present tense: "add" not "added"
  • Imperative mood: "fix bug" not "fixes bug"
  • Reference issues: Closes #123, Refs #456
  • Keep description under 72 characters

Git Safety Protocol

  • NEVER update git config
  • NEVER run destructive commands (--force, hard reset) without explicit request
  • NEVER skip hooks (--no-verify) unless user asks
  • NEVER force push to main/master
  • If commit fails due to hooks, fix and create NEW commit (don't amend)

04 同仓库更多 Skills

dhar174
dhar174/tiny_village

Codex 技能安装

skill-installer

从精选列表或 GitHub 仓库路径将 Codex 技能安装到 $CODEX_HOME/skills。当用户要求列出可安装技能、安装精选技能,或从其他仓库(包括私有仓库)安装技能时使用。

AI 工程师插件与技能管理
★ 1
dhar174
dhar174/tiny_village

Codex 技能创建

skill-creator

创建高效技能的指南。当用户想要创建新技能(或更新现有技能),通过专业知识、工作流或工具集成来扩展 Codex 的能力时使用此技能。

AI 工程师插件与技能管理
★ 1
dhar174
dhar174/tiny_village

桌面与系统截图

screenshot

当用户明确要求截取桌面或系统截图(全屏、特定应用或窗口,或某个像素区域),或当特定工具的截图功能不可用、需要操作系统级别的截图时使用。

普通用户屏幕截图与OCR识别
★ 1
dhar174
dhar174/tiny_village

Render 平台应用部署

render-deploy

通过分析代码库、生成 render.yaml Blueprints 并提供 Dashboard 深链接,将应用部署到 Render。当用户想要在 Render 云平台上部署、托管、发布或搭建应用时使用。

SRE 工程师部署与发布管理
★ 1
dhar174
dhar174/tiny_village

Playwright浏览器自动化

playwright

当任务需要通过 `playwright-cli` 或捆绑的包装脚本从终端自动化真实浏览器(导航、表单填写、快照、截图、数据提取、UI 流程调试)时使用。

软件开发工程师浏览器自动化与网页交互
★ 1
dhar174
dhar174/tiny_village

Playwright 浏览器交互调试

playwright-interactive

通过 `js_repl` 进行持久化的浏览器和 Electron 交互,以实现快速迭代的 UI 调试。

软件开发工程师浏览器自动化与网页交互
★ 1