commit-rules

t0k0sh1's avatarfrom t0k0sh1

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

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 15, 2025

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.
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