agentleFS
atuinshatuinsh/desktop/.cursor/rules/conventional-commits.mdc

desktop / rules

Cursor rule2.5k starsChanged 19 months agoApache-2.0Archived repositoryView on GitHub

Writing a good commit message

The file

We split this conventional-commits.mdc into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow this format for all commits:

    line 40
  2. Distinctive:

    No period at the end

    line 56
  3. Distinctive:

    Add token-based verification with:

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
conventional-commits.mdc
---
description: Writing a good commit message
globs: *
---
# Conventional Commits

A rule to enforce proper conventional commit formatting with clear, descriptive messages.

<rule>
name: conventional_commits
description: Enforces conventional commit format with concise, explanatory first lines

filters:
  - type: event
    pattern: "git_commit"

actions:
  - type: reject
    conditions:
      # Reject non-conventional commit types
      - pattern: "^(?!feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.*\\))?:"
        message: "Commit message must start with a conventional type (feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert)"
      
      # Reject first lines that are too long (>72 chars)
      - pattern: "^.{73,}"
        message: "First line should be 72 characters or less to avoid truncation in GitHub and other tools"
      
      # Reject commits without a space after the colon
      - pattern: "^\\w+(?:\\(.*\\))?:(?!\\s)"
        message: "Include a space after the colon in your commit message"
      
      # Reject first lines that start with lowercase (after the type)
      - pattern: "^\\w+(?:\\(.*\\))?:\\s[a-z]"
        message: "First word after type should be capitalized"

  - type: suggest
    message: |
      # Conventional Commit Format
      
      Follow this format for all commits:
      
      ```
      type(scope): Short summary
      
      Detailed explanation if needed
      ```
      
      ## Requirements:
      
      - **Type**: One of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
      - **Scope**: Optional component name in parentheses
      - **Summary**: 
        - Clear and concise (50-72 chars)
        - Written in imperative ("Add feature" not "Added feature")
        - First letter capitalized
        - No period at the end
      - **Body**: Optional, separated by blank line, explains WHY not HOW
      
      ## Examples:
      
      ✅ `feat(auth): Add password reset functionality`
      
      ✅ `fix: Prevent crash when API returns empty response`
      
      ✅ `docs(readme): Update installation instructions`

examples:
  - input: |
      added new button to the ui
    output: |
      feat(ui): Add new button
  
  - input: |
      fixed the bug in authentication
    output: |
      fix(auth): Resolve authentication failure on expired sessions
  
  - input: |
      feat(users): implemented email verification system with token expiration and email templates for better onboarding experience
    output: |
      feat(users): Implement email verification system
      
      Add token-based verification with:
      - 24h expiration
      - Customized email templates
      - Improved onboarding flow

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.