git-workflow-enforcer

git-workflow-enforcer is a skill for Claude Code from marcusgoll/Spec-Flow. It costs 69 tokens per session (3,334 once invoked), scanned A, original, MIT.

A Git workflow helper that creates commits after work phases and tasks, checks branch safety, and looks for merge conflicts.

In plain words
What is it for?
It helps create Conventional Commits, verify the working tree, check branches, detect conflicts, and report rollback details.
Why use it?
It keeps completed work recorded for rollback and can stop completion when changes are still unsafe or uncommitted.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

Good fit It helps create Conventional Commits, verify the working tree, check branches, detect conflicts, and report rollback details.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marcusgoll/spec-flow/git-workflow-enforcer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add marcusgoll/Spec-Flow --skill git-workflow-enforcer
Clone the repo
git clone --depth 1 https://github.com/marcusgoll/Spec-Flow

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-workflow-enforcer

README.md
[![agentmods](https://agentmods.dev/badge/skills/marcusgoll/spec-flow/git-workflow-enforcer.svg)](https://agentmods.dev/skills/marcusgoll/spec-flow/git-workflow-enforcer)
Your own site
<a href="https://agentmods.dev/skills/marcusgoll/spec-flow/git-workflow-enforcer"><img src="https://agentmods.dev/badge/skills/marcusgoll/spec-flow/git-workflow-enforcer.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,334 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.03334
Opus 5 $0.00034 $0.01667
Sonnet 5 $0.00014 $0.00667
Haiku 4.5 $0.00007 $0.00333

Measured 4d ago against content hash af2aa0fa47d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

git-workflow-enforcer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/git-workflow-enforcer/SKILL.md · 442 lines

How it starts

The opening of the file, as written. The whole thing — 442 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<quick_start> <auto_commit_workflow> Automatic commit generation when changes detected:

  1. Detect uncommitted changes: Run git status --porcelain
  2. Classify change type: Phase completion, task completion, or file modification
  3. Generate commit message: Use Conventional Commits format based on context
  4. Validate safety: Check branch, merge conflicts, commit message format
  5. Execute commit: Stage files and commit with generated message
  6. Provide feedback: Show commit hash and rollback command

Example:

Context: Task T001 completed

❌ UNCOMMITTED CHANGES DETECTED
  Modified: api/models/message.py
  Created: api/tests/test_message.py

✅ AUTO-COMMITTING with generated message:
  feat(green): T001 implement Message model to pass test

  Implementation: SQLAlchemy model with validation
  Tests: 26/26 passing
  Coverage: 93% (+1%)

✅ COMMITTED: abc123f
  Rollback: git revert abc123f

</auto_commit_workflow>

<trigger_patterns> Auto-invoke when detecting:

Phase completion markers:

  • "Phase N complete"
  • "/specify complete", "/plan complete", "/tasks complete"
  • "analysis complete", "optimization complete"
  • Phase command finishing

Task completion markers:

  • "T### complete", "task ### done"
  • "task-tracker mark-done" command
  • "mark task complete"

Change detection:

  • git status --porcelain returns non-empty
  • Files created/modified/deleted
  • Working tree dirty before phase transition </trigger_patterns>

<commit_message_generation> Conventional Commits format:

<type>(<scope>): <subject>

[optional body]

[optional footer]

Auto-detection logic:

Context Type Scope Subject Template
Phase 0 docs spec create specification for {feature}
Phase 0.5 docs clarify resolve {n} clarifications for {feature}
Phase 1 docs plan create implementation plan for {feature}
Phase 2 docs tasks create task breakdown for {feature} ({n} tasks)
Phase 3 docs analyze create cross-artifact analysis for {feature}
Phase 4 (RED) test red {taskId} write failing test for {description}
Phase 4 (GREEN) feat green {taskId} implement {description} to pass test
Phase 4 (REFACTOR) refactor - {taskId} improve {description}
Phase 5 docs optimize complete optimization review for {feature}
Phase 6 docs preview create release notes for {feature} v{version}

Body generation:

  • Phase commits: Include metrics (task count, criteria count, etc.)
  • Task commits: Include evidence (tests, coverage, commit hash)
  • Fix commits: Include root cause and solution

See references/commit-templates.md for complete templates. </commit_message_generation> </quick_start>

Check for uncommitted changes when:

  • Phase command completes
  • task-tracker mark-done-with-notes called
  • User mentions "commit", "save progress", etc.
# Check for uncommitted changes
git status --porcelain

# If non-empty output → uncommitted changes exist

</detection_phase>

<classification_phase> 2. Classify Change Type and Extract Context

Phase completion:

  • Extract phase name from workflow state or command
  • Extract feature slug from current directory
  • Get artifact file paths (spec.md, plan.md, etc.)

Task completion:

  • Extract TaskId from task-tracker parameters or conversation
  • Extract task description from tasks.md
  • Get phase marker ([RED], [GREEN], [REFACTOR])
  • Extract evidence (tests, coverage) from completion context

File modification:

  • Analyze changed files to infer purpose
  • Check git log for recent commit patterns
  • Default to "chore" type if unclear </classification_phase>

Read the full file on GitHub · 442 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 442 lines · 69 tokens per session scan A af2aa0fa47d4

Subscribe to this mod's changes

git-workflow-enforcer is a skill published in the GitHub repository marcusgoll/Spec-Flow (92 stars, last pushed 4mo ago), licensed MIT. It adds 69 tokens to every session and 3,334 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

skill-security-hooks

Install and maintain defensive security hooks and CI gates for authorized SaaS projects. Use when asked to add pre-commit hooks, pre-push hooks, CI security scans, GitHub Actions hardening, secret scanning, dependency scanning, SAST, DAST gates, or security automation around existing repositories.

IAPro-Community/Orquestrador-Maestro · 64 tokens

checkin-assistant

A checklist for the steps before making a Git commit. It treats a commit as one complete, reversible unit of work that should leave the codebase working.

ValorVie/custom-skills · 59 tokens

commit-standards

Format commit messages following conventional commits standard. Use when: writing commit messages, git commit, reviewing commit history. Keywords: commit, git, message, conventional, feat, fix, refactor.

ValorVie/custom-skills · 44 tokens

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

mhrsdev/AI-Agent-Skills-Library · 62 tokens

atmos-git

Atmos Git and GitOps: git.repositories, clone/pull/status/diff/commit/push/clean, local Git hook shims, signed commits, managed workdirs, fork-PR trust gate, and auth via identities or github/sts.

cloudposse/atmos · 54 tokens

security-pipeline

Use when security verification is needed - pre-commit security checks, vulnerability scanning, STRIDE threat analysis. Integrates with /handoff-verify --security and /commit-push-pr. CWE Top 25 based.

sangrokjung/claude-forge · 48 tokens