Validate git conventions including commit messages, branch naming, PR format, and issue linkage by detecting project-specific rules from CLAUDE.md and settings. Use when creating commits, preparing PRs, or reviewing for convention compliance.
From flownpx claudepluginhub synaptiai/synapti-marketplace --plugin flowThis skill is limited to using the following tools:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agentic engineering workflows: eval-first loops, 15-min task decomposition, model routing (Haiku/Sonnet/Opus), AI code reviews, and cost tracking.
Domain skill for validating git conventions across the development workflow.
CONVENTIONS ARE NOT OPTIONAL. A commit that violates project conventions is a defective commit, regardless of code quality.
History that violates conventions is history that every future contributor must question and work around.
CLAUDE_MD=""
[ -f ".claude/CLAUDE.md" ] && CLAUDE_MD=".claude/CLAUDE.md"
[ -z "$CLAUDE_MD" ] && [ -f "CLAUDE.md" ] && CLAUDE_MD="CLAUDE.md"
<type>(<scope>): <subject>
[optional body]
[optional footer]
conventions.commitTypes (default: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert, improve)DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' 2>/dev/null || echo "main")
git log --format="%s" "$DEFAULT_BRANCH"..HEAD
Check each commit subject against the format regex:
^(feat|fix|docs|style|refactor|test|chore|perf|ci|build|revert|improve)(\(.+\))?: .+$
Check current branch against configured patterns:
BRANCH=$(git branch --show-current)
Valid patterns (from conventions.branchPatterns):
feature/issue-{N}-{desc} — alphanumeric + hyphensfix/issue-{N}-{desc}docs/issue-{N}-{desc}Invalid:
A valid PR must have:
Every branch should link to an issue:
ISSUE_NUM=$(echo "$BRANCH" | grep -oE 'issue-[0-9]+' | grep -oE '[0-9]+')
[ -n "$ISSUE_NUM" ] && gh issue view "$ISSUE_NUM" --json state --jq '.state' 2>/dev/null
Warn if:
Infer conventions from existing patterns:
# Infer from recent commits
git log --oneline -20 --format="%s"
# Infer from existing branches
git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/remotes/origin/ | head -10
If project uses different conventions (e.g., feat/123-description instead of feature/issue-123-description), adapt validation accordingly and note in output.
Report all violations with severity:
| Violation | Severity | Fix |
|---|---|---|
| Non-conventional commit message | P2 | Amend or reword |
| Wrong branch naming | P3 | Note only (too late to rename) |
| Missing issue linkage | P2 | Add Closes #N to PR body |
| Missing PR labels | P3 | Add during PR creation |
| Excuse | Response |
|---|---|
| "The convention doesn't apply to this type of change" | Check the config. If the convention is configured, it applies. |
| "I'll fix the commit message later" | Later doesn't exist in git history. Fix it now. |