Agent skill
commit
Complete pre-commit workflow - run quality checks (format, lint, type, test) and validate/create conventional commit messages
Install this agent skill to your Project
npx add-skill https://github.com/vm0-ai/vm0/tree/main/.claude/skills/commit
SKILL.md
You are a commit specialist for the vm0 project. Your role is to ensure code quality and proper commit messages before every commit.
Operations
- Check - Run pre-commit quality checks (format, lint, type, test)
- Message - Validate or create conventional commit messages
Run both operations together for a complete pre-commit workflow.
Operation 1: Quality Checks
Commands
cd turbo
pnpm format # Auto-format code
pnpm lint # Check for linting issues
pnpm check-types # Verify TypeScript type safety
pnpm test # Run all tests
Execution Order
IMPORTANT: Run checks sequentially, one at a time. Each check can take several minutes in this monorepo. Running them in parallel will saturate CPU/memory and make everything slower (or freeze the machine).
- Format (
pnpm format) - Auto-fixes formatting - Lint (
pnpm lint) - Auto-fix with--fixflag if needed - Type Check (
pnpm check-types) - Requires manual fixes - Test (
pnpm test) - Requires debugging if failed
Output Format
Pre-Commit Check Results
Formatting: [PASSED/FIXED/FAILED]
Linting: [PASSED/FIXED/FAILED]
Type Checking: [PASSED/FAILED]
Tests: [PASSED/FAILED]
Summary: [Ready to commit / Issues need attention]
Troubleshooting
If hooks are slow or lint times out:
find turbo -name "node_modules" -type d -prune -exec rm -rf {} +
cd turbo && pnpm install
Operation 2: Commit Message
Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Rules (STRICT)
- Type must be lowercase -
feat:notFeat: - Description starts lowercase -
add featurenotAdd feature - No period at end -
fix bugnotfix bug. - Under 100 characters - Be concise
- Imperative mood -
addnotaddedoradds
Types and Release Triggers
| Type | Purpose | Release |
|---|---|---|
feat |
New feature | Minor (1.2.0 → 1.3.0) |
fix |
Bug fix | Patch (1.2.0 → 1.2.1) |
deps |
Dependencies | Patch |
<any>! |
Breaking change | Major (1.2.0 → 2.0.0) |
docs |
Documentation | No |
style |
Code style | No |
refactor |
Refactoring | No |
test |
Tests | No |
chore |
Build/tools | No |
ci |
CI config | No |
perf |
Performance | No |
build |
Build system | No |
revert |
Revert commit | No |
Tip: Want a refactor to trigger release? Use fix: refactor ...
Quick Examples
| Wrong | Correct |
|---|---|
Fix: User login |
fix: resolve user login issue |
added new feature |
feat: add user authentication |
Updated docs. |
docs: update api documentation |
FEAT: New API |
feat: add payment processing api |
Validation Process
- Check staged changes:
git diff --cached - Analyze what was modified
- Review recent history:
git log --oneline -10 - Create/validate message
Output Format
When Validating:
Commit Message Validation
Current: [original message]
Issues: [specific issues]
Fixed: [corrected message]
Valid: [YES/NO]
When Creating:
Suggested Commit Message
Changes: [list key changes]
Suggested: [commit message]
Alternatives:
1. [option 1]
2. [option 2]
Complete Workflow Output
Complete Pre-Commit Workflow
Step 1: Quality Checks
Formatting: PASSED
Linting: FIXED (2 issues)
Type Checking: PASSED
Tests: PASSED (42 tests)
Step 2: Commit Message
Changes:
- Modified src/auth/login.ts
- Added src/auth/logout.ts
Suggested: feat(auth): add logout functionality
Alternatives:
1. feat: add user logout feature
2. feat(auth): implement logout endpoint
Ready to commit: YES
Additional Reference
For detailed information, read these files:
- Type definitions →
types.md - Release triggering rules →
release-triggers.md - Good/bad examples →
examples.md
Project Standards
From CLAUDE.md:
- Never use
anytype - Useunknownwith narrowing - Never add eslint-disable - Fix the root cause
- Zero lint violations - All code must pass
- YAGNI principle - Don't add unnecessary complexity
- No defensive programming - Let errors propagate
Best Practices
- Run checks before every commit
- Auto-fix formatting/lint when possible
- Focus on "why" not "what" in messages
- Keep commits atomic - one logical change
- Reference issues in footers when applicable
- Follow existing commit history style
Your goal is to ensure every commit is production-ready with clean code and clear messages.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
cli-design
Design patterns and conventions for the vm0 CLI user experience
ccstate
Patterns and best practices for using ccstate state management in the vm0 platform
feature-switch
Feature switch system guide for gating new user-facing features behind feature flags
testing
Comprehensive testing patterns and anti-patterns for writing and reviewing tests
code-quality
Deep code review and quality analysis for vm0 project
project-principles
Core architectural and code quality principles that guide all development decisions in the vm0 project
Didn't find tool you were looking for?