commit-rules

When making a Git commit, provide the subject of the commit and the rules to follow before committing.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026

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.
namecommit-rules
descriptionWhen 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

  1. Run pnpm build to ensure there are no build errors
  2. Run pnpm lint to ensure there are no lint errors
  3. Run pnpm test to ensure all tests pass
  4. If steps 1 through 3 all pass, commit the changes