Skip to content
branch-naming logo

Branch Naming Conventions

branch-naming

Defines branch naming conventions for issue work. Use when creating branches for issues, understanding work status from branches, or linking commits to issues.

SKILL.md

Full skill instructions

Branch Naming Conventions

Purpose

This skill establishes consistent branch naming conventions that:

  1. Clearly link branches to GitHub issues
  2. Enable automated detection of work status
  3. Support the issue-review skill in determining issue states

Branch Naming Format

Standard Pattern

<issue-number>-<short-description>

Examples:

  • 42-build-caching
  • 15-linker-error-fix
  • 28-simplify-job-system

Claude-Specific Branches

When Claude Code creates branches, use this pattern:

claude/<issue-number>-<short-description>-<session-id>

Examples:

  • claude/​42-build-caching-Abc12
  • claude/​15-linker-error-Xyz99

The session ID suffix ensures uniqueness across multiple Claude sessions.

Naming Rules

DO:

  • Start with the issue number
  • Use lowercase letters and hyphens only
  • Keep descriptions short (2-4 words)
  • Use descriptive slugs that summarize the work

DON'T:

  • Use spaces or underscores
  • Include special characters (except hyphens)
  • Create overly long branch names (max ~50 chars)
  • Omit the issue number for issue-related work

Examples

GoodBadWhy
42-build-caching42Too vague
15-null-ptr-fix15-fix-the-bug-where-null-pointer-exception-occursToo long
28-refactor-parser28-misc-changesNot descriptive

Commit Message Conventions

Keywords for Issue Linking

KeywordEffectUse When
Fixes #NCloses issue when PR mergesWork completely resolves the issue
Closes #NCloses issue when PR mergesSame as Fixes
Refs #NLinks without closingWork is partial or related

Examples

Add build result caching

Implement file-based caching for compilation results.

Fixes #42
Extract cache module

Move caching logic to dedicated module.

Refs #42

Detecting Work Status from Branches

The issue-review skill can determine issue status by analyzing branches:

Branch Detection

# Find branches for a specific issue
git branch -a | grep -E "^[^/]*${ISSUE_NUMBER}-|/​${ISSUE_NUMBER}-"

# Or using GitHub CLI
gh pr list --search "head:${ISSUE_NUMBER}" --state all --json number,state,isDraft,headRefName

Status Inference

Branch StatePR StateInferred Issue Status
Branch exists, no PR-In-progress
Branch exists, draft PRDraftIn-progress
Branch exists, open PROpen (ready)Ready to Review
Branch mergedPR MergedDone
Branch deleted, PR closedClosed (not merged)Work abandoned, check issue

Workflow Integration

Starting Work on an Issue

  1. Create branch:

    git checkout -b 42-build-caching
    
  2. Make commits with issue references:

    git commit -m "Implement cache storage
    
    Refs #42"
    
  3. Create PR:

    gh pr create --title "Add build caching (#42)" \
      --body "Implements build result caching.
    
    Fixes #42"
    

Issue-Review Integration

The issue-review skill uses branch/​PR information to:

  1. Detect work in progress:

    • Search for branches containing issue numbers
    • Check for draft PRs linked to issues
  2. Verify status accuracy:

    • Issue marked "Ready to Review" should have an open PR
    • Issue marked "In-progress" should have a branch or draft PR
    • Issue marked "Done" should have a merged PR
  3. Identify stale work:

    • Branches with no commits in 14+ days
    • Draft PRs with no updates in 7+ days

Quick Reference

Branch Naming

<issue>-<description>           # Standard
claude/<issue>-<desc>-<session> # Claude sessions

Commit Keywords

Fixes #N    # Closes issue on merge
Closes #N   # Closes issue on merge
Refs #N     # Links without closing

Status Detection

Branch only           → In-progress
Branch + Draft PR     → In-progress
Branch + Open PR      → Ready to Review
Merged PR             → Done
No branch/​PR          → Check issue status

Guidelines

  • Always include issue numbers in branch names for trackable work
  • Keep branch names concise but descriptive
  • Reference issues in commits for traceability
  • Use closing keywords only when work fully resolves the issue
  • Delete branches after PR merge to keep repository clean

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View