git-commit-message-follow-project-convention

Read this skill before creating any git commit to ensure the commit message matches the project's established patterns. Triggers on: git commit, /commit, creating commits, or any task that results in a git commit.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "git-commit-message-follow-project-convention" with this command: npx skills add zetavg/agent-skills/zetavg-agent-skills-git-commit-message-follow-project-convention

Git Commit Message — Follow Project Convention

Before writing a commit message, analyze the project's recent commit history to learn its conventions. The project's actual conventions always take precedence over any general-purpose commit message guidelines.

Before You Start (Important!)

  • If a git-commit skill is also available, refer to it for general commit workflow guidance (staging, safety checks, etc.) — but always override its message formatting rules with the conventions identified below. For example, if this project does not use conventional commits, you should consider not using it even if the git-commit skill recommends it.
  • If the project provides it's own commit message guidelines in documentation or in project specific instructions, prioritize those over the conventions you identify from the commit history. The project's official guidelines take precedence over both the commit history and general best practices.

Step 1: Retrieve Recent Commits

Use a specialized tool if available. Otherwise, run:

git --no-pager log --oneline -30

Step 2: Identify Conventions

Examine the retrieved commit messages and determine:

1. Commit Message Format

  • Conventional Commits: Do messages follow the type(scope): description pattern (e.g., feat: add login page, fix(auth): resolve token expiry)?
  • Free-form: Are messages plain sentences without a structured prefix?
  • Other format: Is there a different structured pattern (e.g., ticket IDs like [PROJ-123] Fix bug, tagged formats like [Feature] Add search)?

2. Capitalization

  • Is the first word of the description lowercase (fix: add validation) or uppercase (fix: Add validation)?
  • If free-form, do messages start with a capital letter or not?
  • Are there any other capitalization patterns (e.g., GitHub or github)?

3. Other Formatting

  • Scope usage: If conventional commits are used, are scopes common or rare? What are the typical scopes?
    • Tip: run git log -3000 --format='%s' | sed -nE 's/^(([a-z]+)?(\([^)]+\)|\[[^]]+\])?)!?:.*/\1/p' | grep . | sort | uniq -c | sort -rn | head -50 to see the most common types and scopes.
  • Ticket/issue references: Are issue numbers or ticket IDs included? Where (prefix, suffix, footer)?
  • Tense and mood: Are messages in imperative mood (add feature) or past tense (added feature)?
  • Usage of code fences: "update README.md" or "update README.md", "fix bug in process_data()"?
  • Message length: Are descriptions typically terse or verbose?
  • Punctuation: Do messages end with a period or not?

Step 3: Write the Commit Message

Apply the observed conventions to the new commit message. Match the project's style exactly.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

bear-x-callback-url

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

Repository Source
23K85.6K
vercel
Automation

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

Repository Source
23K60K
vercel