lewibs/dark-factory/short-circuit-self-managed-route

Claude Code and agent skill by lewibs/dark-factory

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

When a worker agent manages its own worktree, PR, and cleanup internally, the orchestrator must invoke it and stop before running prep-feature-dir.sh — not after.

Install

npx vskill@latest install lewibs/dark-factory/short-circuit-self-managed-route

SKILL.md

The same SKILL.md was published earlier as lewibs/dark-factory/short-circuit-self-managed-route.

When to use

Any time a new route is added to dark-factory-agent.md where the target agent is responsible for its own isolation (worktree creation), PR, and cleanup — rather than relying on the orchestrator to do those steps.

Steps

  1. Identify whether the new agent creates its own worktree (calls prep-feature-dir.sh internally) and opens its own PR.
  2. If yes, place the route check at the very top of the orchestration block — before the prep-feature-dir.sh call in Step 2.
  3. After invoking the self-managed agent, capture prUrl from its return value and STOP immediately. Do not fall through to the worktree prep, code review, doc update, skill update, or cleanup steps.
  4. The reason: if the orchestrator runs prep-feature-dir.sh first, a duplicate worktree will be created. When the self-managed agent also calls prep-feature-dir.sh with the same taskName, it will collide or fail.

Notes

  • Self-managed routes also intentionally skip code review, skill-update-agent, and the full doc cycle. Document these omissions explicitly in the route comment so future readers know the skips are deliberate, not accidental.
  • Agents that do NOT manage their own worktree (feature-agent, debugger-agent, repair-agent) should not be placed before Step 2, because they rely on the orchestrator's worktree and cleanup.
  • Historical note: repair-agent was previously a self-managed route (called prep-feature-dir.sh internally and short-circuited the orchestrator). It was unified into the full orchestrator flow in April 2026. The repair-agent is no longer a self-managed route — it is invoked in Step 3 like any other worker and relies on the orchestrator for worktree, review, docs, skills, PR, and cleanup.

Inverse: unifying a self-managed route back into the orchestrator

When an agent that previously used the early-exit pattern is folded back into the full orchestrator flow, reverse all of the steps above:

  1. Remove the early-exit block from the orchestrator (the block that appears before Step 2 and ends with STOP).
  2. Add the route to the Step 3 routing table (alongside other workers).
  3. Update the brain.json classification field comment to include the new classification value.
  4. Update the worker agent's description (frontmatter and prose) to clarify that it no longer manages its own worktree, PR, or cleanup — the orchestrator does.
  5. Remove any prep-feature-dir.sh call and PR/cleanup logic from the worker agent itself.
  6. Verify the worker agent's tools: list does not include tools it no longer needs (e.g. if it previously used Bash only for prep-feature-dir.sh and cleanup scripts, those can be removed if no other Bash usage remains).

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lewibs/dark-factory/short-circuit-self-managed-route/badge)](https://verified-skill.com/skills/lewibs/dark-factory/short-circuit-self-managed-route)

Something wrong with this skill or its page? Tell us.