git-workflow-enforcer

Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.

25 stars

Best use case

git-workflow-enforcer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.

Teams using git-workflow-enforcer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/git-workflow-enforcer/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/aiskillstore/marketplace/crazydubya/git-workflow-enforcer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/git-workflow-enforcer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How git-workflow-enforcer Compares

Feature / Agentgit-workflow-enforcerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Git Workflow Enforcer

Enforces consistent Git workflows including commit messages, branch naming, and PR processes.

## When to Use
- Creating commits or branches
- Code review or PR creation
- User mentions "git workflow", "commit message", "branch naming", or "pull request"

## Instructions

### 1. Detect Existing Conventions

Check for:
- `.github/` or `.gitlab/` templates
- `CONTRIBUTING.md`
- Existing commit message patterns
- Branch naming patterns

### 2. Conventional Commits

**Format:** `type(scope): description`

**Types:**
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation
- `style`: Formatting, missing semicolons
- `refactor`: Code restructuring
- `perf`: Performance improvement
- `test`: Adding tests
- `chore`: Maintenance, dependencies

**Examples:**
```
feat(auth): add OAuth2 login support
fix(api): handle null response in user endpoint
docs(readme): update installation instructions
refactor(utils): simplify date formatting logic
```

### 3. Branch Naming

**Common patterns:**
```
feature/user-authentication
bugfix/login-error-handling
hotfix/critical-security-patch
release/v1.2.0
chore/update-dependencies
```

**Validate:**
- Lowercase with hyphens
- Prefixed with type
- Descriptive name
- Issue number if applicable: `feature/123-add-dark-mode`

### 4. Commit Message Validation

**Good commit:**
```
feat(payments): integrate Stripe payment gateway

- Add Stripe SDK configuration
- Implement payment intent creation
- Add webhook handler for payment events
- Update tests for payment flow

Closes #456
```

**Check for:**
- Subject line ≤50 characters
- Body wrapped at 72 characters
- Blank line between subject and body
- Imperative mood ("add" not "added")
- Reference to issue/ticket

### 5. PR Template

Create `.github/PULL_REQUEST_TEMPLATE.md`:

```markdown
## Description
<!-- What does this PR do? -->

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
<!-- How was this tested? -->

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] All tests passing
- [ ] No new warnings

## Related Issues
Closes #
```

### 6. Commit Hooks

**Pre-commit:**
```bash
#!/bin/sh
# .git/hooks/pre-commit

# Run linter
npm run lint

# Run tests
npm test

# Check for sensitive data
if git diff --cached | grep -i "password\|api_key\|secret"; then
  echo "Error: Possible sensitive data detected"
  exit 1
fi
```

**Commit-msg:**
```bash
#!/bin/sh
# .git/hooks/commit-msg

commit_msg=$(cat "$1")

# Check conventional commit format
if ! echo "$commit_msg" | grep -qE "^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .+"; then
  echo "Error: Commit message must follow Conventional Commits format"
  echo "Example: feat(auth): add login feature"
  exit 1
fi
```

### 7. Validate Existing Commits

Check recent commits for pattern adherence:

```bash
git log --oneline -20 | grep -v "^[a-f0-9]\{7\} (feat|fix|docs|style|refactor|perf|test|chore)"
```

### 8. Generate Changelog

From conventional commits:

```bash
# Using standard-version
npx standard-version

# Or manually group by type
git log --pretty=format:"%s" | grep "^feat" > features.txt
git log --pretty=format:"%s" | grep "^fix" > fixes.txt
```

### 9. Protected Branches

**GitHub settings:**
- Require PR reviews
- Require status checks
- Require signed commits
- Restrict who can push
- Require linear history

### 10. Best Practices

- **Atomic commits**: One logical change per commit
- **Descriptive messages**: Explain why, not what
- **Frequent commits**: Small, frequent over large, rare
- **Clean history**: Squash/rebase before merge
- **Sign commits**: GPG signature for security
- **Reference issues**: Link to tracking system

## Git Commit Template

Create `.gitmessage`:
```
<type>(<scope>): <subject>

<body>

<footer>

# Type: feat, fix, docs, style, refactor, perf, test, chore
# Scope: component or file affected
# Subject: imperative, lowercase, no period, ≤50 chars
# Body: explain what and why, not how, wrapped at 72 chars
# Footer: breaking changes, issue references
```

Set as template:
```bash
git config --global commit.template ~/.gitmessage
```

## Supporting Files
- `templates/PULL_REQUEST_TEMPLATE.md`
- `templates/commit-msg-hook.sh`
- `templates/.gitmessage`

Related Skills

test-naming-enforcer

25
from ComeOnOliver/skillshub

Test Naming Enforcer - Auto-activating skill for Test Automation. Triggers on: test naming enforcer, test naming enforcer Part of the Test Automation skill category.

step-functions-workflow

25
from ComeOnOliver/skillshub

Step Functions Workflow - Auto-activating skill for AWS Skills. Triggers on: step functions workflow, step functions workflow Part of the AWS Skills skill category.

sprint-workflow

25
from ComeOnOliver/skillshub

Execute this skill should be used when the user asks about "how sprints work", "sprint phases", "iteration workflow", "convergent development", "sprint lifecycle", "when to use sprints", or wants to understand the sprint execution model and its convergent diffusion approach. Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

n8n-workflow-generator

25
from ComeOnOliver/skillshub

N8N Workflow Generator - Auto-activating skill for Business Automation. Triggers on: n8n workflow generator, n8n workflow generator Part of the Business Automation skill category.

jira-workflow-creator

25
from ComeOnOliver/skillshub

Jira Workflow Creator - Auto-activating skill for Enterprise Workflows. Triggers on: jira workflow creator, jira workflow creator Part of the Enterprise Workflows skill category.

building-gitops-workflows

25
from ComeOnOliver/skillshub

This skill enables Claude to construct GitOps workflows using ArgoCD and Flux. It is designed to generate production-ready configurations, implement best practices, and ensure a security-first approach for Kubernetes deployments. Use this skill when the user explicitly requests "GitOps workflow", "ArgoCD", "Flux", or asks for help with setting up a continuous delivery pipeline using GitOps principles. The skill will generate the necessary configuration files and setup code based on the user's specific requirements and infrastructure.

git-workflow-manager

25
from ComeOnOliver/skillshub

Git Workflow Manager - Auto-activating skill for DevOps Basics. Triggers on: git workflow manager, git workflow manager Part of the DevOps Basics skill category.

fathom-core-workflow-b

25
from ComeOnOliver/skillshub

Sync Fathom meeting data to CRM and build automated follow-up workflows. Use when integrating Fathom with Salesforce, HubSpot, or custom CRMs, or creating automated post-meeting email summaries. Trigger with phrases like "fathom crm sync", "fathom salesforce", "fathom follow-up", "fathom post-meeting workflow".

fathom-core-workflow-a

25
from ComeOnOliver/skillshub

Build a meeting analytics pipeline with Fathom transcripts and summaries. Use when extracting insights from meetings, building CRM sync, or creating automated meeting follow-up workflows. Trigger with phrases like "fathom analytics", "fathom meeting pipeline", "fathom transcript analysis", "fathom action items sync".

exa-core-workflow-b

25
from ComeOnOliver/skillshub

Execute Exa findSimilar, getContents, answer, and streaming answer workflows. Use when finding pages similar to a URL, retrieving content for known URLs, or getting AI-generated answers with citations. Trigger with phrases like "exa find similar", "exa get contents", "exa answer", "exa similarity search", "findSimilarAndContents".

exa-core-workflow-a

25
from ComeOnOliver/skillshub

Execute Exa neural search with contents, date filters, and domain scoping. Use when building search features, implementing RAG context retrieval, or querying the web with semantic understanding. Trigger with phrases like "exa search", "exa neural search", "search with exa", "exa searchAndContents", "exa query".

evernote-core-workflow-b

25
from ComeOnOliver/skillshub

Execute Evernote secondary workflow: Search and Retrieval. Use when implementing search features, finding notes, filtering content, or building search interfaces. Trigger with phrases like "search evernote", "find evernote notes", "evernote search", "query evernote".