dd-git-branch

Enforces Git branch naming conventions, one-branch-one-feature rules, and feature flag strategies.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/marcocpt/trae_skills --skill dd-git-branch-marcocpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dd-git-branch
Source: https://github.com/marcocpt/trae_skills/tree/main/dd-git-branch
Command: npx skills add https://github.com/marcocpt/trae_skills --skill dd-git-branch-marcocpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams and AI agents often create inconsistently named branches, mix multiple features into one branch, or let long-lived branches drift, causing merge conflicts and chaotic history. This Skill standardizes branch naming, enforces the one-branch-one-feature principle, and guides feature flag usage. ## Core Features & Use Cases - Branch Naming Rules: Defines a main/develop/feature/fix/docs/refactor branch model with strict naming formats like feature/F3.1-ocr-acceleration, including length and character constraints. - Worktree Creation Guidance: Specifies one-worktree-per-branch rules, sibling-directory placement, and a creation script based on the latest origin/develop. - Feature Flag Strategy: Recommends merging incomplete features behind flags instead of keeping long-lived branches, with rules for flag removal. - Use Case: An AI agent starting a new OCR acceleration feature creates branch feature/F3.1-ocr-acceleration via the worktree script, keeping its work isolated from other agents and modules. ## Quick Start Ask the AI to create a properly named feature branch and worktree for your new task following the Git branch management rules.

Frequently Asked Questions about dd-git-branch

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

FAQPage Schema
How do I name a Git feature branch correctly?

Use the format feature/{F-number}-{description}, such as feature/F3.1-ocr-acceleration. Keep the description lowercase with hyphens, avoid underscores, spaces, and Chinese characters, and stay under 50 characters total.

What is the one branch one feature principle in Git?

Each branch carries exactly one responsibility, so a feature branch must not contain fix work. Each AI agent gets its own branch, cross-module changes require separate branches, and a single agent must not modify more than three modules at once.

How do I create a Git worktree for a new branch?

Run the create-worktree.sh script with the branch type, F-number, and description, for example bash create-worktree.sh feature F3.1 ocr-acceleration. The worktree is created from the latest origin/develop in a sibling directory named after the branch with slashes replaced by hyphens.

When should I use feature flags instead of long-lived branches?

Use feature flags when development exceeds one day but partial implementations are mergeable, when you need early integration validation, or when multiple people collaborate on a feature. Flags default to off and must be removed once the feature is complete.

Can I rebase a shared Git branch to clean up history?

No, this workflow follows a merge-only principle and forbids rebasing shared branches. Feature merges must use --no-ff to preserve branch history rather than --ff-only.