run-in

Execute shell commands in specified directories within isolated subshells.

39|6|Updated Jan 5, 2026
One-click install
npx skills add https://github.com/the-agency-ai/the-agency --skill run-in
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-in
Source: https://github.com/the-agency-ai/the-agency/tree/main/.claude/skills/run-in
Command: npx skills add https://github.com/the-agency-ai/the-agency --skill run-in

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill allows users to run commands in specific directories without affecting the parent shell's current working directory, preventing context leakage.

Core Features & Use Cases

  • Isolated Command Execution: Runs commands in a subshell within a specified directory, ensuring the parent environment remains unchanged.
  • Application in Workflows: Execute Git commands in different worktrees or run scripts in temporary directories during automation processes.
  • Use Case: Run a verification script on a downstream repository without leaving your current shell location or affecting your environment.

Quick Start

Use the run-in skill to run a git status in your worktree directory without changing your shell's current directory.

Frequently Asked Questions about run-in

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute a shell command in a different directory without changing my current working directory?

To execute shell commands without changing your current working directory, you can run them inside a subshell within the specified target directory. This ensures the parent shell's context remains completely unaffected after the operation finishes.

Can I run git commands in a separate worktree without leaving my current shell location?

Yes, you can run git commands in a separate worktree without leaving your current shell location. By executing the command in an isolated subshell targeting the worktree path, your main shell environment stays unchanged.

How does subshell command execution prevent directory context leakage in automation workflows?

Subshell command execution prevents directory context leakage by spawning an isolated environment for the specified directory. Once the command completes, the subshell closes, ensuring no environmental variables or path changes leak into the parent shell.

Do I need external dependencies to run scripts in temporary directories during automation processes?

You do not need external dependencies to run scripts in temporary directories during automation processes. The tool handles path specification explicitly and operates independently without requiring additional packages or external libraries.

What is the best way to run a verification script on a downstream repository without affecting my shell environment?

The best way to run a verification script on a downstream repository without affecting your shell environment is to execute it within a subshell. This isolates the directory context, preventing any changes to your parent shell configuration.