Agent skill
pre-commit
Run code hygiene checks before committing. Use before git commits or when asked to check code quality.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/pre-commit
SKILL.md
Pre-Commit Checks
Run hygiene checks before committing code.
Quick Check Commands
# Type check (don't use pnpm typecheck)
pnpm build
# Lint
pnpm lint
# Tests
pnpm test
Manual Checklist
Before Every Commit
-
pnpm buildpasses -
pnpm lintpasses - No
console.logstatements (except in CLI apps) - No commented-out code blocks
- No
// TODOwithout issue reference
For Effect-TS Code
- No
async/await- useEffect.gen - No type casts - use
satisfies - Errors extend
Data.TaggedError - Services have proper Layer
For Portal Components
- Pages are minimal
- Loading states have skeletons
-
"use client"only where needed - Barrel exports updated
For New Files
- Added to barrel exports
- Types are exported if public API
- CLAUDE.md updated if new pattern
Auto-Fix Common Issues
Unused imports
pnpm lint --fix
Sort imports/objects
ESLint perfectionist plugin handles this automatically.
Instructions
- Run
pnpm buildto check types - Run
pnpm lintto check style - Review staged changes with
git diff --staged - Flag any issues from checklist above
- Suggest fixes for problems found
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?