branch-discipline

Enforce Git branching rules for one issue per branch and small commits.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/Smooth-Operation/household-expense-tracker --skill branch-discipline-smooth-operation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: branch-discipline
Source: https://github.com/Smooth-Operation/household-expense-tracker/tree/main/.claude/skills/workflow/branch-discipline
Command: npx skills add https://github.com/Smooth-Operation/household-expense-tracker --skill branch-discipline-smooth-operation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces clean Git history by ensuring every branch targets a single issue, uses small, well-scoped commits, and follows clear naming conventions.

Core Features & Use Cases

  • One Branch = One Issue: Each branch addresses exactly one issue, feature, or bug fix.
  • Small, Logical Commits: Commits represent a single logical change and can be independently reverted.
  • Scope Discipline: Avoid mixing unrelated work in a single branch; use notes for unrelated findings and create separate branches as needed.
  • Worktrees for Parallel Work: Guidance on using git worktrees to work on multiple issues simultaneously without stashing or switching contexts.
  • Use Case: When starting a new feature or bug fix, create a focused branch, document the scope, and maintain a clean history suitable for PR reviews.

Quick Start

Use the /branch command to create a focused branch for an issue, e.g., /branch 123-login.

Frequently Asked Questions about branch-discipline

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

FAQPage Schema
How do I enforce one issue per branch in my git workflow?

To enforce one issue per git branch, you create a focused branch for each specific issue and document its scope. This ensures every branch targets a single feature or bug fix, maintaining strict scope discipline throughout your development workflow.

What is the best way to organize small logical commits for a feature branch?

The best way to organize small logical commits is to ensure each commit represents a single logical change that can be independently reverted. This prevents mixing unrelated work and keeps your git history clean for PR reviews.

Can I use git worktrees to work on multiple branches simultaneously?

Yes, you can use git worktrees to work on multiple branches simultaneously. This allows you to handle parallel issues without stashing changes or switching contexts, keeping each branch's environment completely isolated.

How do I apply branch naming conventions for features and bug fixes?

You apply branch naming conventions by using explicit naming patterns across features and fixes, such as prefixing the branch name with an issue number. This enforces branch hygiene and improves project traceability.

Why should I avoid mixing unrelated code changes in a single git branch?

You should avoid mixing unrelated changes in a single git branch to maintain clean history traceability. If you find unrelated issues, use notes and create separate branches for them to ensure commits remain logically scoped and independently revertible.