Agent skill
branch
Creates new git branch with corresponding spec directory structure. Triggers on keywords: create branch, new branch, branch with spec
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/branch-waterplanai-agentic-config
SKILL.md
Create Branch with Spec Directory
Create a new git branch and its corresponding spec directory.
Pre-Flight Checks
-
Verify clean git state:
- If dirty: STOP and list uncommitted changes
-
Validate branch name:
- Must be provided as argument
- If empty: STOP with "Branch name required"
Execution
-
Create and checkout branch:
bashgit checkout -b $ARGUMENTS -
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"- Path: Auto-resolved based on .env configuration
- External:
.specs/specs/<YYYY>/<MM>/<branch-name>/ - Local:
specs/<YYYY>/<MM>/<branch-name>/
- External:
- Creates
000-backlog.md(empty file)
- Path: Auto-resolved based on .env configuration
-
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
-
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:
${CLAUDE_PLUGIN_ROOT}/scripts/spec-resolver.sh${CLAUDE_PLUGIN_ROOT}/scripts/external-specs.sh${CLAUDE_PLUGIN_ROOT}/scripts/lib/config-loader.sh
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?