agentleFS
Hey-DigaHey-Diga/dotclaude/skills/create-branch/SKILL.md

create-branch

Skill17 starsChanged 9 months agoMITView on GitHub

Generate a branch name from current changes and create it if on main. Use when starting new work and need a properly named feature branch.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run git status to see which files are modified/added/deleted

    line 18
  2. Distinctive:

    Run git diff to understand what the changes do

    line 19
  3. Distinctive:

    If there are staged changes, also run git diff --cached

    line 20
  4. Distinctive:

    Keep total length under 50 characters

    line 33
  5. Very specific:

    If on main: run git checkout -b <branch-name>

    line 41
  6. Distinctive:

    If NOT on main: just output the suggested branch name and explain you're not on main

    line 42
  7. Distinctive:

    Run git branch --show-current to verify you're on the new branch

    line 45
  8. Distinctive:

    Keep branch names concise but descriptive

    line 51
  9. Distinctive:

    Never include issue numbers unless explicitly asked

    line 52

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Branch from Changes

You are tasked with generating a meaningful branch name based on the current uncommitted changes.

Process:

  1. Check current branch:
    • Run git branch --show-current
    • Note whether you're on main or another branch
  2. Analyze the changes:
    • Run git status to see which files are modified/added/deleted
    • Run git diff to understand what the changes do
    • If there are staged changes, also run git diff --cached
  3. Generate a branch name:
    • Use format: <type>-<short-description>
    • Types (from Conventional Commits):
      • feat - new feature
      • fix - bug fix
      • refactor - code restructuring
      • docs - documentation only
      • chore - maintenance tasks
      • test - adding/updating tests
      • style - formatting, no code change
    • Description: 2-4 words, kebab-case, lowercase
    • Keep total length under 50 characters
    • Examples:
      • feat-add-user-dashboard
      • fix-login-validation
      • refactor-api-handlers
      • docs-update-readme
  4. Create the branch (if on main):
    • If on main: run git checkout -b <branch-name>
    • If NOT on main: just output the suggested branch name and explain you're not on main
  5. Confirm success:
    • Run git branch --show-current to verify you're on the new branch
    • Tell me the branch name created

Important:

  • Analyze the actual content of changes, not just file names
  • Choose the most appropriate type based on what the changes do
  • Keep branch names concise but descriptive
  • Never include issue numbers unless explicitly asked

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.