the-agency-ai/the-agency/run-in

Claude Code and agent skill by the-agency-ai/the-agency

Trust tier 3
  • community
Source check pending

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

Run a command in a target directory without touching the parent shell's CWD. Use any time you would write "cd foo && bar" — that pattern is blocked by the block-compound-bash hookify rule.

Install

npx vskill@latest install the-agency-ai/the-agency/run-in

SKILL.md

run-in

Run a command in a target directory via a subshell. The parent shell's CWD is never touched. Exit code is propagated. Standard Agency telemetry.

When to use

  • You would otherwise write cd foo && bar && cd - — don't. Use run-in.
  • You need to run an Agency tool on another repo (e.g., agency verify on

a downstream installation).

  • You need to run a git command on another worktree without leaving your

shell parked in that worktree.

  • You want observability on the directory-scoped execution (log_start /

log_end are built in).

Signature

run-in <target-dir> -- <command> [args...]

The -- separator is required and distinguishes the target directory from the command and its argv.

Examples

bash
# Run a command on another repo without leaking CWD
./agency/tools/run-in ~/code/presence-detect -- ./agency/tools/agency verify
# Run a git command in a worktree from your captain shell
./agency/tools/run-in .claude/worktrees/devex -- git status
# Run a test suite in a sandbox dir
./agency/tools/run-in "$BATS_TEST_TMPDIR/mock" -- bats mock.bats

What NOT to do

bash
# ❌ BLOCKED by hookify.block-compound-bash
cd ~/code/presence-detect && agency verify
# ❌ BLOCKED (parent shell CWD leaks)
cd .claude/worktrees/devex && git status && cd -
# ✅ Use run-in instead
./agency/tools/run-in ~/code/presence-detect -- agency verify
./agency/tools/run-in .claude/worktrees/devex -- git status

Why subshell isolation matters

Agent identity resolution uses the current working directory to determine which agent is running (via agent-identity). If a worktree agent cds to the main checkout and forgets to cd -, subsequent commands resolve the wrong identity, handoffs write to the wrong file, and dispatches go to the wrong agent. run-in runs the command in a subshell — the parent shell's CWD is untouchable by construction, so identity resolution stays correct.

Related

  • Hookify rule: agency/hookify/hookify.block-compound-bash.md
  • Tool: agency/tools/run-in
  • Companion seed: telemetry-mining for compound command patterns (flag #54)

OFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!

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
5

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/the-agency-ai/the-agency/run-in/badge)](https://verified-skill.com/skills/the-agency-ai/the-agency/run-in)

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