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 workflow by enforcing rigorous pre-commit standards, including automated build verification, linting, and testing. It ensures that every commit is stable, follows project-specific rules, and includes necessary artifacts like distribution files, significantly reducing CI/CD failures and maintaining high code quality.
Use Cases
- Automated Pre-commit Checks: Automatically execute 'pnpm build', 'lint', and 'test' to verify code integrity and prevent broken code from being committed.
- Artifact Management: Ensure critical directories like 'dist/' are consistently included in commits to support direct repository imports and deployment requirements.
- Workflow Standardization: Enforce a uniform commit process across development teams to ensure all contributors meet the same quality benchmarks before pushing changes.
| 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