Skip to content
Back to skills

Ac Git Branch

ASecurity

Creates new git branch with corresponding spec directory structure. Triggers on keywords: create branch, new branch, branch with spec

  • 30 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
ai-agentsbashgitdocumentation

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add MatiasComercio/agentic-config --skill ac-git-branch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ac Git Branch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ac Git Branch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/matiascomercio-ac-git-branch/badge)](https://www.skillsdirectory.com/skills/matiascomercio-ac-git-branch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ac-git-branch
description: "Creates new git branch with corresponding spec directory structure. Triggers on keywords: create branch, new branch, branch with spec"
project-agnostic: false
allowed-tools:
  - Bash
  - Write
---

# Create Branch with Spec Directory

Create a new git branch and its corresponding spec directory.

## Pre-Flight Checks

1. **Verify clean git state**:
   - If dirty: STOP and list uncommitted changes

2. **Validate branch name**:
   - Must be provided as argument
   - If empty: STOP with "Branch name required"

## Execution

1. **Create and checkout branch**:
   ```bash
   git checkout -b $ARGUMENTS
   ```

2. **Resolve and create spec directory**:
   ```bash
   # Source the bundled spec resolver from this pi package
   source "../../assets/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"
   ```
   - Path: Auto-resolved based on .env configuration
     - External: `.specs/specs/<YYYY>/<MM>/<branch-name>/`
     - Local: `specs/<YYYY>/<MM>/<branch-name>/`
   - Creates `000-backlog.md` (empty file)

3. **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"
   ```
   - **CRITICAL**: Must commit BEFORE creating worktree, otherwise spec files are lost

4. **Confirm**:
   ```
   - Branch: $ARGUMENTS
   - Spec dir: <resolved-path>
   - Backlog: 000-backlog.md (committed)
   ```

## Conditional Documentation

When configuring external specs repository or modifying spec path resolution, read:
- `../../assets/scripts/spec-resolver.sh`
- `../../assets/scripts/external-specs.sh`
- `../../assets/scripts/lib/config-loader.sh`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.