Back to skills
SkillHub ClubRun DevOpsFull StackDevOps

Git Workflow

Enforces structured git commit messages with CONTEXT-INSIGHT-APPROACH-CHANGES format and safe staging practices. Prevents accidental commits by requiring explicit user confirmation and provides post-commit summaries. Includes OSS sync workflow for dual-repository projects.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
402
Hot score
99
Updated
March 20, 2026
Overall rating
A8.4
Composite score
5.9
Best-practice grade
C61.2

Install command

npx @skill-hub/cli install taylorsatula-mira-oss-git-workflow
git-workflowcommit-standardscode-collaborationdevops-tools

Repository

taylorsatula/mira-OSS

Skill path: .claude/skills/git-workflow

Enforces structured git commit messages with CONTEXT-INSIGHT-APPROACH-CHANGES format and safe staging practices. Prevents accidental commits by requiring explicit user confirmation and provides post-commit summaries. Includes OSS sync workflow for dual-repository projects.

Open repository

Best for

Primary workflow: Run DevOps.

Technical facets: Full Stack, DevOps.

Target audience: Development teams using git who want standardized commit messages and safe commit practices, especially those working on projects with public/private repository splits..

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: taylorsatula.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install Git Workflow into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/taylorsatula/mira-OSS before adding Git Workflow to shared team environments
  • Use Git Workflow for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: Git Workflow
description: DO NOT COMMIT unless user explicitly tells you to. Use this skill EVERY SINGLE TIME before creating a git commit. Provides mandatory commit message format, staging rules, and post-commit summary requirements for the MIRA project
---

# Git Workflow - MIRA Standards

Expert guidance for git operations in the MIRA project, emphasizing clear commit messages and proper staging practices.

## 🎯 Purpose

This skill provides git workflow standards for the MIRA project:
- Streamlined commit message format (CONTEXT β†’ INSIGHT β†’ APPROACH β†’ CHANGES)
- Safe staging practices to prevent accidental commits
- Post-commit summary requirements

## πŸ”€ OSS Sync Workflow

### MANDATORY: Ask Before Every Commit
MIRA maintains two repositories (`origin` = private, `oss` = public OSS).

**Before EVERY commit, you MUST ask:**

> "Sync to **OSS** after this commit?"

The repos have divergent codebases, so syncing requires running makeoss.sh:
- **Yes** β†’ After commit: `./makeoss.sh` (auto-commits to OSS with same message)
- **No** β†’ Just push to origin as normal

## βš™οΈ Git Staging Rules

### Critical Staging Protocol
- **DO NOT attempt to commit unless the user explicitly tells you to**
- **NEVER use `git add -A` or `git add .` without explicit permission**
- Always review changes before staging
- Stage specific files intentionally
- Verify what you're committing with `git status` and `git diff`

### Safe Staging Pattern
```bash
# Review what changed
git status
git diff

# Stage specific files only
git add path/to/file1.py path/to/file2.py

# Verify staged changes
git diff --cached
```

## πŸ“ Git Commit Format

### CRITICAL: Syntax Rules
**Use literal newlines in quotes, NEVER HEREDOC**

```bash
# βœ… CORRECT - Use literal newlines
git commit -m "prefix: summary

CONTEXT:
What triggered this work"

# ❌ WRONG - NEVER use HEREDOC (causes shell EOF errors)
git commit -m "$(cat <<'EOF'
Message here
EOF
)"
```

### Commit Template

```bash
git commit -m "prefix: summary (50 chars max)

CONTEXT:
[What situation triggered this work - symptom, user report, or need]

INSIGHT: (optional - skip if obvious)
[The key realization: root cause for bugs, design decision for features]

APPROACH:
[Why this solution over alternatives, trade-offs considered]

CHANGES:
- Specific modifications with file names

IMPACT: (only when notable - skip if none)
- Breaking/Security/Performance notes

PRESERVES: (for refactors only)
- What behavior is unchanged

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>"
```

### Section Guide

| Section | Required? | When to Use |
|---------|-----------|-------------|
| CONTEXT | Always | The trigger - what situation led to this commit |
| INSIGHT | Optional | The "aha" moment - root cause for bugs, key design decision for features. **Skip if obvious.** |
| APPROACH | Always | Why this solution, what alternatives considered |
| CHANGES | Always | Specific file/method modifications |
| IMPACT | Optional | Only when there's actual impact (breaking, security, perf metrics) |
| PRESERVES | Refactors | What existing behavior remains unchanged |

### Semantic Prefixes

- `feat:` - New feature or functionality
- `fix:` - Bug fix or error correction
- `refactor:` - Code restructuring without functional changes
- `perf:` - Performance improvements
- `security:` - Security-related changes
- `test:` - Adding or modifying tests
- `docs:` - Documentation updates
- `chore:` - Maintenance tasks, dependency updates
- `style:` - Code formatting, whitespace fixes
- `revert:` - Reverting previous commits

**Remember**: Commit messages are permanent documentation. Write for developers searching git history months from now.

## πŸ“Š Post-Commit Summary (Required)

After **every commit**, provide a detailed summary:

```
βœ… Commit Successfully Created

Commit Hash: abc123def
Files Changed: 3 files (+45, -12)

Key Accomplishments:
- [Specific achievement 1]
- [Specific achievement 2]
- [Specific achievement 3]

Benefits:
- [How this improves the codebase]
- [What problems this solves]

Next Steps:
- [What the human should consider next]
- [Any follow-up work needed]
```

## 🚫 Critical Anti-Patterns

### Git Commit HEREDOC (Recurring Issue)

This is a **persistent mistake** that causes shell EOF errors:

```bash
# ❌ NEVER DO THIS
git commit -m "$(cat <<'EOF'
Message here
EOF
)"

# βœ… ALWAYS DO THIS
git commit -m "Summary

Details with literal newlines"
```

**Why this matters**: HEREDOC syntax in git commits causes shell parsing errors and breaks the commit flow. Always use literal newlines within quotes.

## πŸ” Example Commits

### Bug Fix (with INSIGHT)
```bash
git commit -m "fix: preload Vault secrets at startup

CONTEXT:
Users reported Gemini/OpenRouter failing while Anthropic worked. After ~1hr
uptime, requests for uncached secrets returned 403 Forbidden.

INSIGHT:
AppRole token has 1-hour TTL. Secrets cached on first access work forever.
Keys first accessed after expiry trigger calls with dead token - Anthropic
was cached early, OpenRouter wasn't.

APPROACH:
Preload ALL secrets at startup while token is fresh. Security-equivalent
since secrets end up in memory anyway. Simpler than token refresh, no race
conditions, no failure modes.

CHANGES:
- Added preload_secrets() to vault_client.py
- Called in main.py lifespan startup

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>"
```

### Simple Feature (no INSIGHT needed)
```bash
git commit -m "feat: add root endpoint with service status

CONTEXT:
User curling localhost:1993 during install got 404, thought install failed.

APPROACH:
Informational endpoint confirming service is running with pointers to
/v0/api/chat and /v0/api/health. No auth - just service discovery.

CHANGES:
- Added GET / endpoint in create_app()

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>"
```

### Refactor (with PRESERVES)
```bash
git commit -m "refactor: split monolithic deploy.sh into modules

CONTEXT:
deploy.sh grew to 2,416 lines / 17 steps - cognitive overload, merge conflicts,
impossible to debug individual steps.

APPROACH:
Library files (shared functions) + step scripts. Used 'source' for variable
flow without temp files. ~8 logical groups over 1:1 mapping to reduce file
count while keeping clear boundaries.

CHANGES:
- Created deploy/deploy.sh thin orchestrator (~80 lines)
- Created deploy/lib/{output,services,vault}.sh
- Created step scripts: config, preflight, dependencies, python, etc.

PRESERVES:
- All 17 deployment steps execute identically
- Same interactive prompts and variable flow

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>"
```

### Performance (with IMPACT metrics)
```bash
git commit -m "perf: add parallel tool execution to generic provider

CONTEXT:
Generic provider executed tools sequentially - 2 tools x 1s = 2s+ total.

INSIGHT:
ThreadPoolExecutor pattern from Anthropic path directly applicable. Critical:
context propagation via invoke_with_context for RLS security.

APPROACH:
Emit all ToolExecutingEvent upfront, then concurrent execution with
as_completed(). Preserves circuit breaker recording for both paths.

CHANGES:
- Replace sequential loop with ThreadPoolExecutor (lines 697-750)
- Add invoke_with_context wrapper

IMPACT:
- 27% faster total (4.58s -> 3.36s for 2 one-second tools)

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>"
```

## πŸ’‘ Best Practices

1. **Before Committing**:
   - Run `git status` to see what changed
   - Run `git diff` to review actual changes
   - Stage files intentionally with specific paths
   - Run `git diff --cached` to verify staged changes

2. **Writing Messages**:
   - Start with semantic prefix
   - Keep summary under 50 characters
   - CONTEXT: the trigger, not the solution
   - INSIGHT: only when there's a non-obvious discovery (skip for simple features)
   - APPROACH: explain trade-offs, why this over alternatives
   - CHANGES: specific file/method names

3. **After Committing**:
   - Always provide post-commit summary
   - Include commit hash and file stats
   - Highlight key accomplishments
   - Note any follow-up work needed

4. **For Complex Bug Fixes**:
   - INSIGHT is critical - trace the causal chain to actual origin
   - Explain why obvious solutions don't work in APPROACH
   - Think of future developers searching git history

## πŸŽ“ When to Use This Skill

Invoke this skill when:
- Creating any git commit
- User asks about commit message format
- Need guidance on staging files
- Uncertain about semantic prefix to use