home / skills / openclaw / skills / ai-branch

ai-branch skill

/skills/lxgicstudios/ai-branch

This skill generates conventional git branch names from plain English descriptions, producing concise, readable kebab-case names with optional prefixes.

npx playbooks add skill openclaw/skills --skill ai-branch

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.8 KB
---
name: branch-namer
description: Generate descriptive git branch names from plain English. Use when you need a branch name that follows conventions.
---

# Branch Namer

Naming branches is harder than it should be. Is it feature/user-auth or feat/add-user-authentication? This tool generates consistent, conventional branch names from plain English descriptions.

**One command. Zero config. Just works.**

## Quick Start

```bash
npx ai-branch "add user authentication with OAuth"
```

## What It Does

- Generates branch names following common conventions (feature/, bugfix/, hotfix/)
- Keeps names short but descriptive
- Uses kebab-case consistently
- Can create the branch for you with --create flag
- Supports custom prefixes and formats

## Usage Examples

```bash
# Get a branch name suggestion
npx ai-branch "fix the login button not working on mobile"

# Create the branch immediately
npx ai-branch "add dark mode support" --create

# Use a specific prefix
npx ai-branch "update dependencies" --prefix chore

# Include ticket number
npx ai-branch "user profile page crashes on load" --ticket PROJ-123
```

## Best Practices

- **Be specific in your description** - "fix bug" gives worse results than "fix crash when user has no profile photo"
- **Include context** - Mention the feature area: "checkout flow: add shipping address validation"
- **Use --create sparingly** - Review the suggestion first, especially on shared repos
- **Match team conventions** - If your team uses different prefixes, use --prefix

## When to Use This

- Starting a new feature and blanking on a good branch name
- Want consistent naming across your team
- Working on multiple tasks and need to track what each branch does
- Onboarding and not sure what naming conventions the team uses

## Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

**Find more:**
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgicstudios.com

## Requirements

No install needed. Just run with npx. Node.js 18+ recommended. Requires OPENAI_API_KEY environment variable.

```bash
export OPENAI_API_KEY=sk-...
npx ai-branch --help
```

## How It Works

Takes your description and determines the appropriate branch type (feature, fix, chore, etc.). Extracts key terms and creates a concise, readable branch name following conventional naming patterns. Can optionally run git checkout -b for you.

## License

MIT. Free forever. Use it however you want.

---

**Built by LXGIC Studios**

- GitHub: [github.com/lxgicstudios/ai-branch](https://github.com/lxgicstudios/ai-branch)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)

Overview

This skill generates consistent, conventional git branch names from plain English descriptions. It produces short, descriptive, kebab-case branch names with sensible prefixes (feature/, fix/, chore/, etc.) and can optionally create the branch for you.

How this skill works

You provide a plain-English summary of the change you plan to make. The tool infers the branch type, extracts key terms, and formats them into a concise kebab-case branch name. Options let you override the prefix, include ticket numbers, or run git checkout -b to create the branch immediately.

When to use it

  • When you need a clear, convention-compliant branch name but don’t want to think about formatting
  • Starting a new feature, fix, or chore and you want consistent prefixes across the team
  • Onboarding or contributing to a repo where naming convention is unclear
  • Working on many tasks and needing predictable branch names for tracking
  • When you want to include a ticket number or custom prefix without manual editing

Best practices

  • Give specific, contextual descriptions (e.g., “fix crash when user has no profile photo”)
  • Include the relevant area or component in your description to improve clarity
  • Review suggested names before using --create on shared repositories
  • Use the --prefix flag if your team uses custom prefixes or different conventions
  • Include ticket IDs with the --ticket option to link branches to work items

Example use cases

  • Generate a branch for a new feature: input “add dark mode support” to get feature/add-dark-mode
  • Create a bugfix branch: input “fix login button not working on mobile” to get fix/fix-login-button-mobile
  • Add a ticket number: include --ticket PROJ-123 to produce feature/proj-123-add-user-profile
  • Quick branch creation: run with --create to have the branch checked out immediately
  • Align team naming: use --prefix chore to match repository-specific conventions

FAQ

Do I need to install anything?

No installation is required; run it with npx. Node.js 18+ is recommended.

Can it create the branch for me?

Yes. Use the --create flag to run git checkout -b and create the branch locally.