commit-rules
When making a Git commit, provide the subject of the commit and the rules to follow before committing.
When & Why to Use This Skill
This Claude skill streamlines the Git version control process by enforcing a rigorous pre-commit workflow. It ensures code quality by requiring successful execution of build, lint, and test commands before any changes are finalized. Additionally, it provides clear guidelines on commit targets, such as including distribution files, to maintain repository consistency and reliability.
Use Cases
- Automated Quality Assurance: Automatically running build and test suites before commits to prevent regression bugs from entering the codebase.
- Standardized Commit Practices: Enforcing project-specific rules for commit subjects and file inclusions, such as ensuring 'dist/' folders are updated for package consumers.
- Error Prevention: Reducing manual oversight by having the AI agent verify linting and build status, ensuring that only clean, production-ready code is pushed.
| name | commit-rules |
|---|---|
| description | When making a Git commit, provide the subject of the commit and the rules to follow before committing. |
This skill provides guidelines for commit targets and pre-commit checks.
Commit targets
- All files managed by the repository are subject to commit.
- Please include files in the
dist/directory in the commit target (as this is required when importing by specifying the repository directly).
Instructions
- Run
pnpm buildto ensure there are no build errors - Run
pnpm lintto ensure there are no lint errors - Run
pnpm testto ensure all tests pass - If steps 1 through 3 all pass, commit the changes