Branch

From WaterplanAI/agentic-config · View interactive version

Branch is an AI agent skill from the GitHub repository WaterplanAI/agentic-config. Creates new git branch with corresponding spec directory structure. Triggers on keywords: create branch, new branch, branch with spec

How to use this skill

Skill file

Create Branch with Spec Directory

Create a new git branch and its corresponding spec directory.

Pre-Flight Checks

  1. Verify clean git state:
  1. Validate branch name:

Execution

  1. Create and checkout branch:

```bash

git checkout -b $ARGUMENTS

```

  1. Resolve and create spec directory:

```bash

# Source spec resolver (plugin-aware)

source "${CLAUDE_PLUGIN_ROOT}/scripts/spec-resolver.sh"

# Resolve spec path (handles external vs local)

RELATIVE_PATH="$(date +%Y)/$(date +%m)/$ARGUMENTS/000-backlog.md"

SPEC_FILE=$(resolve_spec_path "$RELATIVE_PATH")

SPEC_DIR="${SPEC_FILE%/*}" # Pure bash dirname equivalent

# Create backlog file

touch "$SPEC_FILE"

```

  1. Commit spec directory:

```bash

# Extract NNN and title for commit_spec_changes

# For backlog, use "000" and "backlog"

commit_spec_changes "$SPEC_FILE" "CREATE" "000" "backlog"

```

  1. Confirm:

```

```

Conditional Documentation

When configuring external specs repository or modifying spec path resolution, read:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.