git-strategy

Detect Git strategy and enforce branch isolation before editing.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/NEXUZ-SYS/devflow --skill git-strategy-nexuz-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-strategy
Source: https://github.com/NEXUZ-SYS/devflow/tree/main/skills/git-strategy
Command: npx skills add https://github.com/NEXUZ-SYS/devflow --skill git-strategy-nexuz-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces safe editing by detecting the project Git strategy and applying branch isolation before any modification.

Core Features & Use Cases

  • Detects configured Git strategy from repository settings and applies the appropriate isolation mechanism (branch-flow, worktree, or trunk-based).
  • Enforces blocking edits on protected branches via a gating mechanism until a work isolation is established.
  • Supports common workflows (feature, fix, hotfix, release) and ensures safe PR creation tooling integration.

Quick Start

Activate git-strategy to validate the repository's configuration and establish branch isolation before editing.

Frequently Asked Questions about git-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent accidental commits to protected branches in git?

Branch protection blocks direct edits to protected branches by enforcing branch isolation before any modification. This gating mechanism ensures changes only happen in isolated worktrees or feature branches, preventing accidental commits.

What is the best way to automate git branch isolation for feature and hotfix workflows?

Automating git branch isolation involves detecting the project's configured git strategy from repository settings and applying the appropriate isolation mechanism. This safely supports feature, fix, hotfix, and release workflows.

Does this git strategy automation work with trunk-based development?

Yes, this git strategy automation works with trunk-based development setups. It detects the configured strategy and applies the correct isolation mechanism, supporting trunk-based alongside branch-flow and worktree workflows.

How do I configure branch protection rules using a devflow configuration file?

You can configure branch protection rules by defining the strategy, protected branches, and PR tooling in a .context/.devflow.yaml file. The automation reads this configuration to determine and enforce the correct isolation.

Why are my edits being blocked on the main branch?

Edits are blocked on the main branch because the git strategy identifies it as a protected branch and enforces isolation. You must establish a separate worktree or branch before modifications can proceed.