Home / Packages / @ivangrynenko/git-commit-standards

@ivangrynenko/git-commit-standards

Enforce structured Git commit messages. globs: .git/*

prpm install @ivangrynenko/git-commit-standards
0 total downloads

📄 Full Prompt Content

---
description: Enforce structured Git commit messages.
globs: .git/*
---
# Git Commit Standards

Ensures consistent Git commit messages.

<rule>
name: git_commit_standards
description: Enforce structured Git commit messages.
filters:
  - type: file_extension
    pattern: "\\.git/.*"

actions:
  - type: enforce
    conditions:
      # More precise regex to ensure prefix is followed by colon and space
      - pattern: "^(?!fix|feat|perf|docs|style|refactor|test|chore): "
        message: "Use a commit message prefix followed by colon and space (fix:, feat:, etc.)."

      # Check for uppercase after the prefix
      - pattern: "^(fix|feat|perf|docs|style|refactor|test|chore): [A-Z]"
        message: "First word after prefix should be lowercase."

      # More precise length check that excludes the prefix from the count
      - pattern: "^(fix|feat|perf|docs|style|refactor|test|chore): .{46,}"
        message: "Keep commit message content (excluding prefix) under 46 characters."

      # Ensure there's a space after the colon
      - pattern: "^(fix|feat|perf|docs|style|refactor|test|chore):(?! )"
        message: "Include a space after the colon in prefix."

  - type: suggest
    message: |
      Recommended commit format:
      - "fix: resolved bug in user authentication"
      - "feat: added new search functionality"
      - "docs: updated installation guide"
      - "style: fixed button alignment"
      - "refactor: simplified login logic"
      - "test: added unit tests for auth"
      - "chore: updated dependencies"
      - "perf: optimized database queries"

metadata:
  priority: high
  version: 1.1
</rule>

💡 Suggested Test Inputs

Loading suggested inputs...

🎯 Community Test Results

Loading results...

📦 Package Info

Format
cursor
Type
rule
Category
general
License
MIT

🏷️ Tags