egregore: Skill for Claude Code

.claude/skills/branch/SKILL.md

branch is a skill for Claude Code from egregore-labs/egregore. It costs 32 tokens per session (1,318 once invoked), scanned A, original, MIT.

A Git workflow for creating a separate working branch before making changes. A branch is an isolated line of development where edits can be made without changing the main code line immediately.

In plain words
What is it for?
Use it when starting a feature, bug fix, or other piece of development work that should have its own branch and worktree.
Why use it?
It prevents unfinished work from mixing with other work and gives the changes a clear place to be reviewed or merged later.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: positional $N argument.

This is egregore-labs/egregore's own configuration. It tells Claude Code how to work on egregore itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything egregore configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git -C ../frontend fetch origin main --quiet.

Reuse

Borrowing it

Nothing to install: this file belongs to egregore-labs/egregore. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/egregore-labs/egregore/main/.claude/skills/branch/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/egregore-labs/egregore

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for branch

README.md
[![agentmods](https://agentmods.dev/badge/skills/egregore-labs/egregore/branch/github.svg)](https://agentmods.dev/skills/egregore-labs/egregore/branch)
Your own site
<a href="https://agentmods.dev/skills/egregore-labs/egregore/branch"><img src="https://agentmods.dev/badge/skills/egregore-labs/egregore/branch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for branch

Your own site · 80×15
<a href="https://agentmods.dev/skills/egregore-labs/egregore/branch"><img src="https://agentmods.dev/badge/skills/egregore-labs/egregore/branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,318 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01318
Opus 5 $0.00016 $0.00659
Sonnet 5 $0.00006 $0.00264
Haiku 4.5 $0.00003 $0.00132

Measured 6d ago against content hash ad1e92b86711, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/branch/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create a working branch from what you're working on.

When to invoke

User says: "/branch", "create a branch", "start a new branch", or any request to begin a working branch for what they're about to do

Description: $ARGUMENTS

What to do

Resolve the core repo's configured base first:

BASE_BRANCH=$(bash -c 'SCRIPT_DIR="$PWD"; CONFIG="$PWD/egregore.json"; . "$PWD/bin/lib/config.sh" && _get_base_branch') ||
  { echo "Could not resolve the configured base branch; stopping before Git changes." >&2; exit 1; }
  1. Derive a topic slug from the description (lowercase, hyphens, no special chars, max 40 chars)
  2. Determine branch type from description:
    • dev/{author}/{topic-slug} — default for session work
    • feature/{topic-slug} — explicit feature work
    • bugfix/{topic-slug} — bug fixes
  3. Call EnterWorktree with name set to the topic slug

The WorktreeCreate hook handles everything: fetches the configured base branch, creates the branch, creates the worktree, sets up symlinks.

Fallback: If EnterWorktree fails, fall back to: git checkout --no-track -b {branch-name} "origin/$BASE_BRANCH"

The task branch must not inherit origin/$BASE_BRANCH as its upstream. Its first push uses git push -u origin "$BRANCH", which creates and tracks the same-name remote task branch.

Deriving the topic slug

Extract the essence of what the user said into a short, meaningful slug:

  • "auth flow in frontend" → auth-flow
  • "fix the payment endpoint bug" → fix-payment-endpoint
  • "refactoring the token store" → refactor-token-store
  • "working on oauth implementation" → oauth-implementation

If no description is given, use today's date: YYYY-MM-DD

Branch type detection

  • Description mentions "fix", "bug", "broken", "crash" → bugfix/
  • Description mentions "feature", "add", "implement", "new" → feature/
  • Otherwise → dev/{author}/ (general session work)

Resuming existing branches

Before creating, check if a matching branch already exists:

git branch --list "dev/$AUTHOR/*$SLUG*" "feature/*$SLUG*" "bugfix/*$SLUG*"

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +4 lines ad1e92b86711
  2. 10d ago First seen · 144 lines · 32 tokens per session scan A 6d82968c5f1f

Subscribe to this mod's changes

branch is a skill published in the GitHub repository egregore-labs/egregore (289 stars, last pushed 6d ago), licensed MIT. It adds 32 tokens to every session and 1,318 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gwm

Manage git worktrees across any repository with the gwm Rust binary (CLI + ratatui TUI). Use when the user asks to create / list / remove / bootstrap / switch / link worktrees, run a command across worktrees (gwm exec) or reclaim build artifacts (gwm clean), materialise a PR into a worktree (gwm review), drive a…

kbrdn1/gwm-cli · 0 tokens

agentplane

Use when a repository uses AgentPlane or the user wants a governed git-native workflow for planning, task execution, verification, and closure.

basilisk-labs/agentplane · 30 tokens

aigon-next

Suggest the most likely next workflow action based on current context.

jayvee/aigon · 15 tokens

dos-verify-done-claims

Before accepting an agent's 'done / shipped / fixed' claim, verify it against ground truth (git ancestry + the commit's own diff) using the DOS kernel's dos verify and dos commit-audit — never the agent's own narration.

anthony-chaudhary/dos-kernel · 61 tokens

take-task

A workflow for claiming a tracker task and preparing the development branch for it. It verifies the task, marks it as in progress, checks for uncommitted changes, and handles branch setup according to the task state.

restarter/lets-workflow · 76 tokens

release

Release Aigon — push to origin, cut a version+tag, or publish to npm. Wraps scripts/ship.js with CHANGELOG draft + dry-run preview. Triggers when the user types "/release", "/push", "/ship", or says "ship a release", "publish a beta", "cut a version", "push to origin", "release X to npm".

jayvee/aigon · 79 tokens