Skip to content
Back to skills

Emperor Worktree

ASecurity

Emperor Time worktree isolation. Use before standard or heavy BUILD so the client's current checkout stays clean. Detect isolation first, prefer native harness tools, verify check-ignore, create a git worktree only as fallback, prove a green baseline, then implement the work-order there.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 25, 2026
ai-agentspythonbashgit

Works with

  • cli

Security analysis

A100/100

Scanned September 28, 2026

npx -y skills add arbi-elezi/emperor-time --skill emperor-worktree --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Emperor Worktree?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Emperor Worktree
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/arbi-elezi-emperor-worktree/badge)](https://www.skillsdirectory.com/skills/arbi-elezi-emperor-worktree)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: emperor-worktree
description: >-
  Emperor Time worktree isolation. Use before standard or heavy BUILD so the
  client's current checkout stays clean. Detect isolation first, prefer native
  harness tools, verify check-ignore, create a git worktree only as fallback,
  prove a green baseline, then implement the work-order there.
license: MIT
metadata:
  version: 0.4.33
  part-of: emperor-time
---

# Worktree isolation

Standard and heavy tasks do not mutate the client's dirty tree.

## MUST — isolation checklist first

Before creating a worktree or starting standard/heavy BUILD, open
`skills/emperor-worktree/isolation-checklist.md`
(Chain Jail leaf from Superpowers `using-git-worktrees` → detect / create /
setup / baseline only)
and/or run `scripts/emperor iso` (prints the mechanical WORKTREE / STEP / MUST
card).

No `git worktree add` without Step 1 detect. Do not load whole
`using-git-worktrees`; ET + emperor-worktree orchestrate.

## Hard rules

1. Run `scripts/emperor iso` → quote `WORKTREE checklist=yes`. Advance with
   `scripts/emperor iso --advance N N+1` (skips fail). Blind create →
   `scripts/emperor iso --reject-blind-create` (HARD-GATE exit 1).
2. If already in a linked worktree (`git rev-parse --git-dir` !=
   `--git-common-dir`) and **not** a submodule, stay. Do not nest.
3. Prefer a native harness worktree tool when one exists. Else git fallback:
   ```bash
   mkdir -p .worktrees
   git check-ignore -q .worktrees || { echo ".worktrees/" >> .gitignore; }
   scripts/emperor worktree <task-id>  # Python core: scripts/lib/worktree.py
   # or: git worktree add .worktrees/<task-id> -b emperor/<task-id>
   ```
4. Install project deps in the worktree. Run the baseline suite. Quote the tail.
5. Implement only inside that worktree. Ledger the path + isolation mode.
6. Review pack diffs that worktree against the base branch SHA.
7. Merge/copy back only after G4 PASS (finish menu owns cleanup).

Trivial tasks may stay on the current tree. Record `worktree: skipped (trivial)`
and still quote Step 1 detect.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.