Back to Skills

git-workflow

verified

Execute safe, reproducible Git workflows with MANDATORY semantic commits (feat/fix/docs), auto-injected templates, and git hooks integration

View on GitHub

Marketplace

agentops-marketplace

boshu2/agentops

Plugin

domain-kit

development

Repository

boshu2/agentops
6stars

plugins/domain-kit/skills/git-workflow/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/boshu2/agentops/blob/main/plugins/domain-kit/skills/git-workflow/SKILL.md -a claude-code --skill git-workflow

Installation paths:

Claude
.claude/skills/git-workflow/
Powered by add-skill CLI

Instructions

# Git Workflow Skill

Execute safe, reproducible Git workflows with **MANDATORY semantic commit enforcement**, auto-injected commit templates via prepare-commit-msg hook, and institutional memory capture via post-commit hooks.

## When to Use

Use this skill proactively when:
- **Committing any changes** - Enforces semantic prefix (feat:, fix:, docs:, etc.)
- **Creating feature branches** - Ensures branch names align with commit types
- **Validating commit messages** - Checks format before pushing
- **Understanding git hooks** - Shows what happens automatically
- **Staging files safely** - Prevents secrets from being committed
- **Team collaboration** - Ensures consistent conventions across all contributors

## Core Principle: Semantic Commits Are MANDATORY

**Every commit MUST start with a semantic type prefix.** This is not optional.

**Required format:** `<type>(<scope>): <subject>`

**Valid types:** feat, fix, docs, refactor, test, chore, ci, perf, style, revert

**Examples:**
```
feat(monitoring): add Prometheus metrics exporter
fix(nginx): correct worker process count
docs(readme): update installation instructions
```

**Why mandatory:**
- Git becomes institutional memory (searchable, categorized history)
- Auto-generates release notes and changelogs
- Enables automation (CI/CD triggers based on type)
- Pattern recognition for AI agents
- Compliance and audit trails

**Full specification:** See `references/commit-conventions.md` (loaded JIT when needed)

## Git Hooks Architecture

This repository uses **3 automated hooks** that run during commit lifecycle:

### 1. pre-commit Hook (Before Commit)
**Purpose:** Keeps `.codex/agents-index.yaml` synchronized with `.claude/agents/*.md`
**Triggers:** Only when staging changes to `.claude/agents/`
**What it does:** Regenerates agent index, stages updated manifest
**Can fail:** Yes - fix errors, rerun `make codex-agents-index`, retry commit
**Location:** `tools/scripts/git-hooks/pre-commit` (symlinked to `.git/hooks/pr

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10144 chars