commit
Commit Skill
Structured commit workflow: analyze changes → quality checks → group by feature → commit with approval.
Announce at start: "I'm using commit skill to commit your changes."
Workflow
Step 0: Branch Guard
git branch --show-current
If the current branch is main or master:
- STOP — do NOT commit directly to main/master
- Create a new branch based on the changes:
git checkout -b <type>/<scope>-<short-description>(e.g.,feat/webui-file-upload,fix/cron-timezone,docs/update-skills) - Then proceed with the commit workflow on the new branch
This rule has no exceptions unless the user explicitly overrides it.
Step 1: Analyze Changes
git status -s
git diff --stat
git diff
Identify:
- What files changed
- What features/purposes each change serves
- Whether changes should be split into multiple commits
Step 2: Test Coverage & Quality Checks (Required)
Before running checks, verify test coverage:
- If logic was added or changed, ensure corresponding unit tests exist
- If no tests cover the change, write them first (see testing skill)
- Tests are part of "done" — do NOT defer them to a follow-up commit
Run before ANY commit:
bun run lint:fix # Fix lint/format issues
bun run format # Format non-TS files
bunx tsc --noEmit # Type check
bun run test # Run tests
Rules:
- ALL must pass before committing
- If fails due to current changes: fix issues first, do NOT skip
- If errors exist in unrelated files: may proceed, but inform user
Step 3: Group by Feature
Group related changes into logical commits:
| Group together | Split apart |
|---|---|
| Type definitions + implementation | Unrelated bug fixes |
| Component + its hook + styles | Feature A vs Feature B |
| Refactor of single module | Refactor vs new feature |
| Test + implementation it covers | Unrelated test additions |
Principle: One commit = one logical change. Ask user if grouping is unclear.
Step 4: Commit Format
<type>(<scope>): <description>
Types:
feat— New featurefix— Bug fixrefactor— Code refactoring (no behavior change)chore— Build, deps, config changesdocs— Documentation onlytest— Adding/updating testsstyle— Formatting (no logic change)perf— Performance improvement
Scope: Module or feature name, e.g., cron, webui, css-theme, i18n
Language: English only.
Examples:
feat(cron): implement scheduled task system
fix(webui): correct modal z-index issue
refactor(css-theme): extract preset CSS into separate files
test(webserver): add cookie parsing tests
chore: remove debug console.log statements
Step 5: Execute Commits
For each commit group:
- Stage specific files:
git add <files>(avoidgit add -A) - Show user the commit message for approval
- Commit after user confirms
Step 6: Post-Commit Check
After committing, check if changes require AGENTS.md / skill updates:
| Trigger | Action |
|---|---|
| New directory structure pattern | Update architecture skill |
| New i18n module added | Verify i18n skill still accurate |
| New build command | Update AGENTS.md |
| New convention introduced | Document in relevant skill or AGENTS.md |
Mandatory Rules
No AI Signature
NEVER add any AI-related signatures. This includes:
Co-Authored-By: <any AI tool>or similar attributionGenerated with <AI tool>in commit messages or PR descriptions- Any AI-generated footer or byline
- Emojis like 🤖 followed by AI tool names
This applies to ALL commits and PRs without exception.
No --no-verify
NEVER skip pre-commit hooks. If a hook fails, fix the underlying issue.
No --force Push
NEVER force-push without explicit user approval. Warn if pushing to main/master.
Quick Reference
0. git branch --show-current — if main/master, create new branch first
1. git status / git diff — understand changes
2. Verify test coverage — write tests for new/changed logic FIRST
3. bun run lint:fix && bun run format && bunx tsc --noEmit && bun run test — quality gate
4. Group changes by feature — one commit = one logical change
5. git add <files> && git commit — with user approval
6. Check if AGENTS.md / skills need update
More from iofficeai/aionui
pptx
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
108docx
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
102xiaohongshu-recruiter
用于在小红书上发布高质量的 AI 相关岗位招聘帖子。包含自动生成极客风格的招聘封面图和详情图,并提供自动化发布脚本。当用户需要发布招聘信息、寻找 Agent 设计师或其他 AI 领域人才时使用。
68xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
67i18n
|
65openclaw-setup
OpenClaw usage expert: Helps you install, deploy, configure, and use OpenClaw personal AI assistant. Can diagnose issues, create bots, execute automated tasks, etc. Use when users need to install OpenClaw, configure Gateway, set up Channels, create Agents, troubleshoot issues, or perform OpenClaw-related operations.
63