git-town
This skill should be used when the user asks to "create a feature branch", "start a new feature", "sync my branch", "sync with main", "update from main", "create a PR", "create a pull request", "ship a feature", "merge and clean up", "handle merge conflicts", "resolve conflicts in git-town", "create stacked branches", "work on dependent features", "configure git-town", "set up git-town", "use git-town offline", "manage git workflow", or mentions git-town commands (hack, sync, propose, ship, continue, undo, kill).
What this skill does
# Git-Town Workflow Skill
**Skill Type**: Technical Workflow
**Estimated Learning Time**: 30 minutes
**Proficiency Levels**: Beginner, Intermediate, Advanced
---
## Mission
Provide comprehensive git-town workflow integration for Claude Code agents, enabling autonomous branch management, PR creation, and error recovery without interactive prompts. This skill empowers agents to execute complex git workflows with zero user intervention by leveraging git-town's CLI flags for non-interactive operation. Target audience includes orchestrator agents (tech-lead-orchestrator, git-workflow) and developer agents (frontend-developer, backend-developer) performing feature development, bug fixes, and release workflows. Key capabilities include validation-first execution with structured exit codes, standardized error handling patterns for merge conflicts and remote failures, stacked branch workflows for complex features, offline development mode support, and GitHub CLI integration for automated PR creation. Agents using this skill can autonomously manage the complete feature lifecycle from branch creation through PR merge without requiring user intervention for routine git operations.
---
## Skill Loading Mechanism
### Discovery Paths
Git-town skill files are located using XDG Base Directory Specification with the following search priority:
1. **Primary**: `$XDG_CONFIG_HOME/ensemble/skills/git-town/` (user-specific configuration)
2. **Fallback**: `~/.config/ensemble/skills/git-town/` (default XDG location)
3. **Legacy**: `~/.ensemble/skills/git-town/` (backward compatibility)
4. **Plugin**: `<plugin-root>/packages/git/skills/git-town/` (bundled with ensemble-git plugin)
Agents should check paths in order and use the first match. Plugin-bundled files serve as the fallback when user configuration is absent.
### Loading Performance
Git-town skill loading is optimized for agent efficiency with the following performance characteristics:
- **Target**: <100ms for full skill load (SKILL.md + REFERENCE.md + ERROR_HANDLING.md combined)
- **Caching**: Skill content is cached in agent context memory after first load, with cache invalidation triggered by file modification timestamps (mtime comparison)
- **Lazy loading**: Templates and migration guides are loaded on-demand only when agents query specific sections, reducing initial memory footprint
- **Indexing**: Section headers are indexed during initial load using hash maps for O(1) lookup of subsections, enabling fast targeted queries
Performance is measured across three tiers: full skill load for orchestrators requiring comprehensive git-town knowledge, section queries for developers needing specific command documentation, and template loads for one-time configuration tasks. Benchmark results show 95th percentile latency of 85ms for full loads and 28ms for section queries on standard SSD hardware.
### Integration Patterns
Agents integrate this skill using two primary patterns optimized for different workflow requirements:
1. **Full skill load**: Load all three core files (SKILL, REFERENCE, ERROR_HANDLING) into agent context at session start. Recommended for orchestrator agents (tech-lead-orchestrator, git-workflow) that perform frequent git operations.
2. **Section queries**: Query specific subsections using namespaced identifiers like `git-town:REFERENCE:git-town hack` for targeted information retrieval. Ideal for developer agents needing occasional git-town command reference.
Example integration in agent YAML frontmatter:
```yaml
---
name: git-workflow
skills:
- git-town:SKILL
- git-town:REFERENCE
- git-town:ERROR_HANDLING
---
```
The skill system automatically handles path resolution, caching, and version compatibility checks during load operations.
---
## Quick Start
### Prerequisites
Before using git-town commands, ensure the following requirements are met:
- **Git-town installation**: Version 14.0.0 or higher installed and in PATH
- **Repository configuration**: Main branch configured via `git town config set-main-branch main`
- **Git repository**: Working directory must be inside a git repository
### Validation
Run the validation script before executing git-town workflows to ensure all prerequisites are met:
```bash
# From the git-town skill directory
bash ./scripts/validate-git-town.sh
# Or with absolute path using skill root
bash ${ENSEMBLE_SKILL_ROOT}/scripts/validate-git-town.sh
```
**Exit codes:**
- `0`: All checks passed, ready to use git-town
- `1`: git-town not installed (install via `brew install git-town` or equivalent)
- `2`: git-town not configured (run `git town config set-main-branch main`)
- `3`: git-town version < 14.0.0 (upgrade required)
- `4`: Not in a git repository (navigate to repository root)
### Basic Workflow
The core git-town workflow consists of five primary commands:
1. **Create feature branch**: `git-town hack feature-name --parent main`
- Creates new feature branch from specified parent
- Non-interactive with explicit `--parent` flag
2. **Make commits**: Standard git commit workflow
- `git add .`
- `git commit -m "feat: implement feature"`
3. **Sync with parent**: `git-town sync`
- Rebases current branch on parent
- Pushes changes to remote
4. **Create PR**: `git-town propose --title "Feature Title" --body "Description"`
- Creates pull request via GitHub CLI (gh)
- Non-interactive with explicit title and body
5. **Complete feature**: `git-town ship`
- Merges feature branch to parent
- Deletes feature branch locally and remotely
### Common Flags for Non-Interactive Operation
To ensure zero-prompt execution, always use these flags:
- `--parent <branch>`: Specify parent branch explicitly (prevents interactive parent selection)
- `--prototype`: Mark branch as prototype (won't sync with parent, useful for experiments)
- `--draft`: Create draft PR instead of ready-for-review PR
- `--abort`: Abort in-progress git-town operation and return to pre-operation state
- `--continue`: Continue git-town operation after resolving merge conflicts
---
## Common Patterns
### Pattern 1: Feature Branch Creation (Non-Interactive)
**Use case**: Create new feature branch without interactive prompts
```bash
# Explicit parent specification (recommended for agents)
git-town hack implement-user-auth --parent main
# Prototype branch (experimental work, won't sync with parent)
git-town hack experiment-new-architecture --prototype
# Check current branch configuration
git town config get-parent # Returns: main
```
**Why this works**: The `--parent` flag eliminates interactive prompts that would block agent execution.
### Pattern 2: Stacked Branches for Complex Features
**Use case**: Build dependent feature branches (e.g., refactor → implement → polish)
```bash
# Create parent feature branch
git checkout main
git-town hack refactor-auth-layer --parent main
# Make commits to refactor
git commit -m "refactor: extract auth service"
# Create child branch from current feature branch
git-town hack implement-oauth --parent refactor-auth-layer
# Git-town automatically tracks parent relationship
git town config get-parent # Returns: refactor-auth-layer
```
**Why this works**: Git-town maintains parent-child relationships, enabling agents to build complex feature hierarchies.
### Pattern 3: Error Recovery After Merge Conflicts
**Use case**: Handle merge conflicts during sync or ship operations
```bash
# Attempt sync, encounters merge conflict
git-town sync
# Exit code: 5 (EXIT_MERGE_CONFLICT)
# Resolve conflicts manually or via agent
git add src/auth.js # Mark conflict as resolved
# Continue git-town operation
git-town continue
# Exit code: 0 (success)
# Alternative: Abort if conflicts are unresolvable
git-town sync --abort
```
**Why this works**: Git-town provides explicit continue/abort commands with predictable exit codes for agent error handling.
### Pattern 4: Offline Development Mode
**Use case**: Develop without remote aRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.