plugins/claude-code-dev-hermit/skills/dev-branch/SKILL.md
Create a feature branch from a clean tree before delegating to the implementer or starting direct edits. Validates working state, picks the right base from protected_branches, and refuses on collisions.
npx skillsauth add gtapps/claude-code-hermit dev-branchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a feature branch with the same gating discipline the rest of the plugin enforces. Run before delegating to the implementer or starting direct edits on a fresh task.
.claude-code-hermit/sessions/ exists (core + dev hermit initialized)/claude-code-hermit:hatch and /claude-code-dev-hermit:hatch first, then exitAccepts two forms:
feature/PROJ-123-add-auth, fix/login-redirect — used as-is (no further transformation).PROJ-123 add auth flow, add auth flow — ask the operator once which prefix to use (feature / fix / chore / hotfix), then slugify the rest.If the operator skips the prefix question, default to feature.
Slugification rules — applied to the description portion only (never the prefix):
-[a-z0-9-]- to a single --/ is preserved only as the prefix separator. If the input contains / mid-description (feature/foo/bar), only the first / is kept as prefix-boundary; subsequent / is replaced with - (feature/foo-bar).
Read claude-code-dev-hermit.protected_branches from .claude-code-hermit/config.json and run git rev-parse --abbrev-ref HEAD in parallel. Cache the config for Gate 3. If the current branch is NOT in the resolved protected-branches set, short-circuit. Glob matching: treat * as zero-or-more chars within a branch segment — release/* matches release/v1 but not release; * alone matches anything.
already on feature/PROJ-123-add-auth — nothing to do
Do NOT append to SHELL.md (no work happened).
Run git status --porcelain. If non-empty, stop and surface the diff summary:
working tree is dirty — /commit or stash before creating a branch
Run git fetch origin (or the configured default remote). Soft-fail on network error — warn fetch failed (offline?) — proceeding with local refs and continue. Record the offline state for Gate 5.
Try each option in order, silently falling through on failure. Do NOT warn at each step — only surface the final result. Reuse the config.json already read in Gate 0.
claude-code-dev-hermit.protected_branches from config that does NOT contain * or ? (skip glob entries like release/*).git symbolic-ref refs/remotes/origin/HEAD — returns a literal ref like refs/remotes/origin/develop; strip the refs/remotes/origin/ prefix to get the branch name. Exits 128 when origin/HEAD is unset (fresh clones, mirror clones, CI flows); treat as a normal fall-through.main exists. When online (Gate 2 succeeded): git ls-remote --exit-code --heads origin main. When offline: git rev-parse --verify refs/remotes/origin/main (local cache only).master — git ls-remote when online, local git rev-parse --verify refs/remotes/origin/master when offline.cannot resolve base branch — configure claude-code-dev-hermit.protected_branches.Surface the resolved base in the output. Emit no intermediate "fell back" lines.
Run git worktree prune, then git worktree list --porcelain | grep -F "branch refs/heads/<name>". If matched:
worktree exists at <path> — finish or remove it before recreating the branch
recovery: git worktree remove --force <path>
Do not call --force from this skill. Surface the path and let the operator decide.
Check for existing branches:
git rev-parse --verify <name> — FAIL if branch existsgit ls-remote --exit-code --heads origin <name> — FAIL if branch exists; soft-fail this check if Gate 2 went offlineOn collision:
branch <name> already exists (local / remote) — choose a different name
git checkout -b <name> origin/<base>
Use the remote-tracking ref so the new branch is not stale relative to origin.
Append a one-line entry to .claude-code-hermit/sessions/SHELL.md Progress Log in the existing format (e.g., [HH:MM] created branch <name> from <base>). Only on actual creation — never on Gate 0 short-circuit or any earlier abort.
dev-branch
base: main (from claude-code-dev-hermit.protected_branches[0])
name: feature/PROJ-123-add-auth
status: created
When Gate 0 short-circuits, emit only:
already on feature/PROJ-123-add-auth — nothing to do
git fetch and git ls-remote. No push, no remote branch creation, no remote deletion.claude-code-dev-hermit:implementer agent creates its own branch inside its worktree independently — that is a separate code path and does not interact with /dev-branch. Operators may still invoke the implementer directly without running /dev-branch first.tools
Composes and delivers the daily fitness brief — a forward-looking morning read (readiness + today's plan) or a backward-looking evening read (today's training, or an earned-rest note, + tomorrow's setup) — in the operator's configured voice. Invoke with /claude-code-fitness-hermit:fitness-brief --morning|--evening|--slot <name>. Becomes the plugin's two daily beats — the morning Strava connectivity check and the evening activity sync, RPE binding, and Run deep-dive.
development
Renew the hermit's long-lived Claude login token over the channel, before it expires. Relays a one-time sign-in link to the operator, takes the code back, installs the new token, and restarts. Activates on messages like 'relogin', 'renew my login', 'reauth', 'the login is expiring', or when doctor's credential-expiry check flags setup-token.
development
Synthesizes the past 7 days of archived briefs into a weekly digest — top stories, emerging vs faded themes, category activity, and per-source performance built from archive frontmatter. Delivers to the operator's configured channel and archives a weekly note. Designed as a weekly routine. Invoke with /feed-hermit:weekly-digest.
development
Manage developing story arcs tracked across briefs — add, resolve, and list active arcs in compiled/story-arcs-*.md. Arc Watch keywords drive the feed-brief arc-tagging enrichment. Invoke with /feed-hermit:story-arcs add|resolve|list.