safehouse-worktrees

safehouse-worktrees is a skill for Claude Code from kucherenko/gangsta. It costs 32 tokens per session (1,256 once invoked), scanned A, original, MIT.

A set of instructions for using Git worktrees, which are separate working folders connected to the same Git repository. It helps create an isolated workspace for feature work.

In plain words
What is it for?
Use it when starting feature work that should be isolated from the current branch. It checks for an existing worktree directory, project preferences, and Git ignore settings before setup.
Why use it?
It reduces the chance that experimental changes interfere with the current working folder and requires safety checks before creating the separate workspace.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions AGENTS.md.

Part of the gangsta plugin — 19 skills, 6 agents, 1 hook shipped together

Good fit Use it when starting feature work that should be isolated from the current branch. It checks for an existing worktree directory, project preferences, and Git ignore settings before setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kucherenko/gangsta/safehouse-worktrees
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kucherenko/gangsta --skill safehouse-worktrees
Clone the repo
git clone --depth 1 https://github.com/kucherenko/gangsta

Made for: Claude Code.

Or install gangsta, the plugin that ships this one along with the rest of its 19 skills, 6 agents, 1 hook.

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 safehouse-worktrees

README.md
[![agentmods](https://agentmods.dev/badge/skills/kucherenko/gangsta/safehouse-worktrees/github.svg)](https://agentmods.dev/skills/kucherenko/gangsta/safehouse-worktrees)
Your own site
<a href="https://agentmods.dev/skills/kucherenko/gangsta/safehouse-worktrees"><img src="https://agentmods.dev/badge/skills/kucherenko/gangsta/safehouse-worktrees/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 safehouse-worktrees

Your own site · 80×15
<a href="https://agentmods.dev/skills/kucherenko/gangsta/safehouse-worktrees"><img src="https://agentmods.dev/badge/skills/kucherenko/gangsta/safehouse-worktrees.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,256 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 warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 10
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 36
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 176
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.01256
Opus 5 $0.00016 $0.00628
Sonnet 5 $0.00006 $0.00251
Haiku 4.5 $0.00003 $0.00126

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

Security

Grade A, and why

safehouse-worktrees 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 10d 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.

skills/safehouse-worktrees/SKILL.md · 197 lines

How it starts

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

The Safehouse: Git Worktrees

Overview

Git worktrees create isolated operational bases sharing the same repository. Work on multiple branches simultaneously without compromising the main workspace.

Core principle: Systematic directory selection + safety verification = reliable isolation.

Announce at start: "Setting up a safehouse for isolated operations."

Directory Selection Process

Follow this priority order:

1. Check Existing Safehouses

# Check in priority order
ls -d .worktrees 2>/dev/null     # Preferred (hidden)
ls -d worktrees 2>/dev/null      # Alternative

If found: Use that directory. If both exist, .worktrees/ wins.

2. Check Project Config

grep -i "worktree.*director" AGENTS.md 2>/dev/null

If preference specified: Use it without asking.

3. Ask the Don

If no directory exists and no config preference:

No safehouse directory found. Where should I set up?

1. .worktrees/ (project-local, hidden)
2. ~/.config/gangsta/worktrees/<project-name>/ (global location)

Which would you prefer?

Safety Verification

For Project-Local Directories (.worktrees or worktrees)

MUST verify directory is gitignored before creating safehouse:

# Check if directory is ignored (respects local, global, and system gitignore)
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null

If NOT ignored:

  1. Add appropriate line to .gitignore
  2. Commit the change immediately
  3. Proceed with safehouse creation

Why critical: Prevents accidentally committing safehouse contents to repository.

For Global Directory (~/.config/gangsta/worktrees)

No .gitignore verification needed — outside project entirely.

Creation Steps

1. Detect Project Name

project=$(basename "$(git rev-parse --show-toplevel)")

2. Create Safehouse

# Determine full path
case $LOCATION in
  .worktrees|worktrees)
    path="$LOCATION/$BRANCH_NAME"
    ;;
  ~/.config/gangsta/worktrees/*)
    path="~/.config/gangsta/worktrees/$project/$BRANCH_NAME"
    ;;
esac

# Create worktree with new branch
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"

Read the full file on GitHub · 197 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. 10d ago First seen · 197 lines · 32 tokens per session scan A 25358cc1cb49

Subscribe to this mod's changes

safehouse-worktrees is a skill published in the GitHub repository kucherenko/gangsta (81 stars, last pushed 26d ago), licensed MIT. It adds 32 tokens to every session and 1,256 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

pod-init

Initialize CocoPlus project bundle in the current directory. Creates .cocoplus/ directory structure, copies all templates, initializes AGENTS.md, project.md, flow.json, and creates the initial git commit. Run this once per project before using any other CocoPlus command.

Snowflake-Labs/cocoplus · 57 tokens

ship

Enter the Ship phase of CocoBrew. Reads review.md approval, generates structured commit, creates semantic version tag, optionally creates PR via gh CLI, and records deployment details. Requires approved review.

Snowflake-Labs/cocoplus · 41 tokens

lean-review

CocoLean diff-scoped over-engineering audit — scans uncommitted git diff and applies five classification tags (delete/stdlib/native/yagni/shrink) to identify unnecessary surface area before commit.

Snowflake-Labs/cocoplus · 44 tokens

map-diff

Analyze the impact of staged git changes against the committed Cortex function knowledge graph — shows which downstream functions are affected before you commit.

Snowflake-Labs/cocoplus · 28 tokens

apply-semantic-versioning

Apply semantic versioning (SemVer 2.0.0) to determine the correct version bump based on change analysis. Covers major/minor/patch classification, pre-release identifiers, build metadata, and breaking change detection. Use when preparing a new release to determine the correct version number, after merging changes…

pjt222/agent-almanac · 94 tokens

commit-changes

Stage, commit, and amend changes with conventional commit messages. Covers reviewing changes, selective staging, writing descriptive commit messages using HEREDOC format, and verifying commit history. Use when saving a logical unit of work to version control, creating a commit with a conventional message, amending the…

pjt222/agent-almanac · 72 tokens