Token导航 LogoToken导航

Agent Skill · 研究检索

interactive-shell(交互式外壳)

interactive-shell 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

interactive-shell 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 38,817。

总安装 1,505周安装 64GitHub Stars 774下载 527核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:interactive-shell(交互式外壳)
来源仓库:https://github.com/dicklesworthstone/pi_agent_rust
仓库路径:skills/interactive-shell
安装命令:
npx skills add https://github.com/dicklesworthstone/pi_agent_rust --skill interactive-shell
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dicklesworthstone/pi_agent_rust --skill interactive-shell

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。适合根据关键词、任务场景或来源线索快速定位候选结果。可结合来源仓库和原始 README 进一步核验具体用法。

安装命令:npx skills add https://github.com/dicklesworthstone/pi_agent_rust --skill interactive-shell。建议确认权限范围、维护状态及是否会触发联网、命令执行或文件读写。

来源仓库内路径:skills/interactive-shell

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dicklesworthstone/pi_agent_rust --skill intera…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

interactive-shell 怎么安装?

在终端执行 npx skills add https://github.com/dicklesworthstone/pi_agent_rust --skill interactive-shel…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

interactive-shell 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

interactive-shell 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/dicklesworthstone/pi_agent_rust --skill interactive-shell 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

interactive-shell 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

interactive-shell 用的人多吗?

公开数据是累计安装 1,505 次,近一周安装 64 次,下载 527 次,GitHub 774 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

interactive-shell 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
interactive-shell

交互式外壳 · 本页

1,505774执行命令未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Interactive Shell (Skill)

Last verified: 2026-01-18

Foreground vs Background Subagents

Pi has two ways to delegate work to other AI coding agents:

Foreground SubagentsDispatch SubagentsBackground Subagents
Toolinteractive_shellinteractive_shell (dispatch)subagent
VisibilityUser sees overlayUser sees overlay (or headless)Hidden from user
Agent modelPolls for statusNotified on completionFull output captured
Default agentpi (others if user requests)pi (others if user requests)Pi only
User controlCan take over anytimeCan take over anytimeNo intervention
Best forLong tasks needing supervisionFire-and-forget delegationsParallel tasks, structured delegation

Foreground subagents run in an overlay where the user watches (and can intervene). Use interactive_shell with mode: "hands-free" to monitor while receiving periodic updates, or mode: "dispatch" to be notified on completion without polling.

Dispatch subagents also use interactive_shell but with mode: "dispatch". The agent fires the session and moves on. When the session completes, the agent is woken up via triggerTurn with the output in context. Add background: true for headless execution (no overlay).

Background subagents run invisibly via the subagent tool. Pi-only, but captures full output and supports parallel execution.

When to Use Foreground Subagents

Use interactive_shell (foreground) when:

  • The task is long-running and the user should see progress
  • The user might want to intervene or guide the agent
  • You want hands-free monitoring with periodic status updates
  • You need a different agent's capabilities (only if user specifies)

Use subagent (background) when:

  • You need parallel execution of multiple tasks
  • You want full output capture for processing
  • The task is quick and deterministic
  • User doesn't need to see the work happening

Default Agent Choice

Default to pi for foreground subagents unless the user explicitly requests a different agent:

User saysAgent to use
"Run this in hands-free"pi
"Delegate this task"pi
"Use Claude to review this"claude
"Have Gemini analyze this"gemini
"Run aider to fix this"aider

Pi is the default because it's already available, has the same capabilities, and maintains consistency. Only use Claude, Gemini, Codex, or other agents when the user specifically asks for them.

Foreground Subagent Modes

Interactive (default)

User has full control, types directly into the agent.

interactive_shell({ command: 'pi' })

Interactive with Initial Prompt

Agent starts working immediately, user supervises.

interactive_shell({ command: 'pi "Review this codebase for security issues"' })

Dispatch (Fire-and-Forget) - NON-BLOCKING, NO POLLING

Agent fires a session and moves on. Notified automatically on completion via triggerTurn.

// Start session - returns immediately, no polling needed
interactive_shell({
  command: 'pi "Fix all TypeScript errors in src/"',
  mode: "dispatch",
  reason: "Fixing TS errors"
})
// Returns: { sessionId: "calm-reef", mode: "dispatch" }
// → Do other work. When session completes, you receive notification with output.

Dispatch defaults autoExitOnQuiet: true. The agent can still query the sessionId if needed, but doesn't have to.

Background Dispatch (Headless)

No overlay opens. Multiple headless dispatches can run concurrently:

interactive_shell({
  command: 'pi "Fix lint errors"',
  mode: "dispatch",
  background: true
})
// → No overlay. User can /attach to watch. Agent notified on completion.

Hands-Free (Foreground Subagent) - NON-BLOCKING

Agent works autonomously, returns immediately with sessionId. You query for status/output and kill when done.

// 1. Start session - returns immediately
interactive_shell({
  command: 'pi "Fix all TypeScript errors in src/"',
  mode: "hands-free",
  reason: "Fixing TS errors"
})
// Returns: { sessionId: "calm-reef", status: "running" }

// 2. Check status and get new output
interactive_shell({ sessionId: "calm-reef" })
// Returns: { status: "running", output: "...", runtime: 30000 }

// 3. When you see task is complete, kill session
interactive_shell({ sessionId: "calm-reef", kill: true })
// Returns: { status: "killed", output: "final output..." }

This is the primary pattern for foreground subagents - you delegate to pi (or another agent), query for progress, and decide when the task is done.

Hands-Free Workflow

Starting a Session

const result = interactive_shell({
  command: 'codex "Review this codebase"',
  mode: "hands-free"
})
// result.details.sessionId = "calm-reef"
// result.details.status = "running"

The user sees the overlay immediately. You get control back to continue working.

Querying Status

interactive_shell({ sessionId: "calm-reef" })

Returns:

  • status: "running" | "user-takeover" | "exited" | "killed" | "backgrounded"
  • output: Last 20 lines of rendered terminal (clean, no TUI animation noise)
  • runtime: Time elapsed in ms

Rate limited: Queries are limited to once every 60 seconds. If you query too soon, the tool will automatically wait until the limit expires before returning. The user is watching the overlay in real-time - you're just checking in periodically.

Ending a Session

interactive_shell({ sessionId: "calm-reef", kill: true })

Kill when you see the task is complete in the output. Returns final status and output.

Fire-and-Forget Tasks

For single-task delegations where you don't need multi-turn interaction, enable auto-exit so the session kills itself when the agent goes quiet:

interactive_shell({
  command: 'pi "Review this codebase for security issues. Save your findings to /tmp/security-review.md"',
  mode: "hands-free",
  reason: "Security review",
  handsFree: { autoExitOnQuiet: true }
})
// Session auto-kills after ~5s of quiet
// Read results from file:
// read("/tmp/security-review.md")

Instruct subagent to save results to a file since the session closes automatically.

Multi-Turn Sessions (default)

For back-and-forth interaction, leave auto-exit disabled (the default). Query status and kill manually when done:

interactive_shell({
  command: 'cursor-agent -f',
  mode: "hands-free",
  reason: "Interactive refactoring"
})

// Send follow-up prompts
interactive_shell({ sessionId: "calm-reef", input: "Now fix the tests\n" })

// Kill when done
interactive_shell({ sessionId: "calm-reef", kill: true })

Sending Input

interactive_shell({ sessionId: "calm-reef", input: "/help\n" })
interactive_shell({ sessionId: "calm-reef", inputKeys: ["ctrl+c"] })
interactive_shell({ sessionId: "calm-reef", inputPaste: "multi\nline\ncode" })
interactive_shell({ sessionId: "calm-reef", input: "y", inputKeys: ["enter"] })  // combine text + keys

Query Output

Status queries return rendered terminal output (what's actually on screen), not raw stream:

  • Default: 20 lines, 5KB max per query
  • No TUI animation noise (spinners, progress bars, etc.)
  • Configurable via outputLines (max: 200) and outputMaxChars (max: 50KB)
// Get more output when reviewing a session
interactive_shell({ sessionId: "calm-reef", outputLines: 50 })

// Get even more for detailed review
interactive_shell({ sessionId: "calm-reef", outputLines: 100, outputMaxChars: 30000 })

Incremental Reading

Use incremental: true to paginate through output without re-reading:

// First call: get first 50 lines
interactive_shell({ sessionId: "calm-reef", outputLines: 50, incremental: true })
// → { output: "...", hasMore: true }

// Next call: get next 50 lines (server tracks position)
interactive_shell({ sessionId: "calm-reef", outputLines: 50, incremental: true })
// → { output: "...", hasMore: true }

// Keep calling until hasMore: false
interactive_shell({ sessionId: "calm-reef", outputLines: 50, incremental: true })
// → { output: "...", hasMore: false }

The server tracks your read position - just keep calling with incremental: true to get the next chunk.

Reviewing Output

Query sessions to see progress. Increase limits when you need more context:

// Default: last 20 lines
interactive_shell({ sessionId: "calm-reef" })

// Get more lines when you need more context
interactive_shell({ sessionId: "calm-reef", outputLines: 50 })

// Get even more for detailed review
interactive_shell({ sessionId: "calm-reef", outputLines: 100, outputMaxChars: 30000 })

Sending Input to Active Sessions

Use the sessionId from updates to send input to a running hands-free session:

Basic Input

// Send text
interactive_shell({ sessionId: "shell-1", input: "/help\n" })

// Send text with keys
interactive_shell({ sessionId: "shell-1", input: "/model", inputKeys: ["enter"] })

// Navigate menus
interactive_shell({ sessionId: "shell-1", inputKeys: ["down", "down", "enter"] })

// Interrupt
interactive_shell({ sessionId: "shell-1", inputKeys: ["ctrl+c"] })

Named Keys

KeyDescription
up, down, left, rightArrow keys
enter, returnEnter/Return
escape, escEscape
tab, shift+tab (or btab)Tab / Back-tab
backspace, bspaceBackspace
delete, del, dcDelete
insert, icInsert
home, endHome/End
pageup, pgup, ppagePage Up
pagedown, pgdn, npagePage Down
f1-f12Function keys
kp0-kp9, kp/, kp*, kp-, kp+, kp., kpenterKeypad keys
ctrl+c, ctrl+d, ctrl+zControl sequences
ctrl+a through ctrl+zAll control keys

Note: ic/dc, ppage/npage, bspace are tmux-style aliases for compatibility.

Modifier Combinations

Supports ctrl+, alt+, shift+ prefixes (or shorthand c-, m-, s-):

// Cancel
inputKeys: ["ctrl+c"]

// Alt+Tab
inputKeys: ["alt+tab"]

// Ctrl+Alt+Delete
inputKeys: ["ctrl+alt+delete"]

// Shorthand syntax
inputKeys: ["c-c", "m-x", "s-tab"]

Hex Bytes (Advanced)

Send raw escape sequences:

inputHex: ["0x1b", "0x5b", "0x41"]  // ESC[A (up arrow)

Bracketed Paste

Paste multiline text without triggering autocompletion/execution:

inputPaste: "function foo() {\n  return 42;\n}"

Model Selection Example

// Step 1: Open model selector
interactive_shell({ sessionId: "shell-1", input: "/model", inputKeys: ["enter"] })

// Step 2: Filter and select (after ~500ms delay)
interactive_shell({ sessionId: "shell-1", input: "sonnet", inputKeys: ["enter"] })

// Or navigate with arrows:
interactive_shell({ sessionId: "shell-1", inputKeys: ["down", "down", "down", "enter"] })

Context Compaction

interactive_shell({ sessionId: "shell-1", input: "/compact", inputKeys: ["enter"] })

Changing Update Settings

Adjust timing during a session:

// Change max interval (fallback for on-quiet mode)
interactive_shell({ sessionId: "calm-reef", settings: { updateInterval: 120000 } })

// Change quiet threshold (how long to wait after output stops)
interactive_shell({ sessionId: "calm-reef", settings: { quietThreshold: 3000 } })

// Both at once
interactive_shell({ sessionId: "calm-reef", settings: { updateInterval: 30000, quietThreshold: 2000 } })

CLI Quick Reference

AgentInteractiveWith PromptHeadless (bash)Dispatch
claudeclaudeclaude "prompt"claude -p "prompt"mode: "dispatch"
geminigeminigemini -i "prompt"gemini "prompt"mode: "dispatch"
codexcodexcodex "prompt"codex exec "prompt"mode: "dispatch"
agentagentagent "prompt"agent -p "prompt"mode: "dispatch"
pipipi "prompt"pi -p "prompt"mode: "dispatch"

Gemini model: gemini -m gemini-3-flash-preview -i "prompt"

Prompt Packaging Rules

The reason parameter is UI-only - it's shown in the overlay header but NOT passed to the subprocess.

To give the agent an initial prompt, embed it in the command:

// WRONG - agent starts idle, reason is just UI text
interactive_shell({ command: 'claude', reason: 'Review the codebase' })

// RIGHT - agent receives the prompt
interactive_shell({ command: 'claude "Review the codebase"', reason: 'Code review' })

Handoff Options

Transfer (Ctrl+T) - Recommended

When the subagent finishes, the user presses Ctrl+T to transfer output directly to you:

[Subagent finishes work in overlay]
        ↓
[User presses Ctrl+T]
        ↓
[You receive: "Session output transferred (150 lines):

  Completing skill integration...
  Modified files:
  - skills.ts
  - agents/types/..."]

This is the cleanest workflow - the subagent's response becomes your context automatically.

Configuration: transferLines (default: 200), transferMaxChars (default: 20KB)

Tail Preview (default)

Last 30 lines included in tool result. Good for seeing errors/final status.

Snapshot to File

Write full transcript to ~/.pi/agent/cache/interactive-shell/snapshot-*.log:

interactive_shell({
  command: 'claude "Fix bugs"',
  handoffSnapshot: { enabled: true, lines: 200 }
})

Artifact Handoff (for complex tasks)

Instruct the delegated agent to write a handoff file:

Write your findings to .pi/delegation/claude-handoff.md including:
- What you did
- Files changed
- Any errors
- Next steps for the main agent

Safe TUI Capture

Never run TUI agents via bash - they hang even with --help. Use interactive_shell with timeout instead:

interactive_shell({
  command: "pi --help",
  mode: "hands-free",
  timeout: 5000  // Auto-kill after 5 seconds
})

The process is killed after timeout and captured output is returned in the handoff preview. This is useful for:

  • Getting CLI help from TUI applications
  • Capturing output from commands that don't exit cleanly
  • Any TUI command where you need quick output without user interaction

For pi CLI documentation, you can also read directly: /opt/homebrew/lib/node_modules/@mariozechner/pi-coding-agent/README.md

Background Session Management

// Background an active session (close overlay, keep running)
interactive_shell({ sessionId: "calm-reef", background: true })

// List all background sessions
interactive_shell({ listBackground: true })

// Reattach to a background session
interactive_shell({ attach: "calm-reef" })                    // interactive (blocking)
interactive_shell({ attach: "calm-reef", mode: "hands-free" })  // hands-free (poll)
interactive_shell({ attach: "calm-reef", mode: "dispatch" })    // dispatch (notified)

// Dismiss background sessions (kill running, remove exited)
interactive_shell({ dismissBackground: true })               // all
interactive_shell({ dismissBackground: "calm-reef" })        // specific

Quick Reference

Dispatch subagent (fire-and-forget, default to pi):

interactive_shell({
  command: 'pi "Implement the feature described in SPEC.md"',
  mode: "dispatch",
  reason: "Implementing feature"
})
// Returns immediately. You'll be notified when done.

Background dispatch (headless, no overlay):

interactive_shell({
  command: 'pi "Fix lint errors"',
  mode: "dispatch",
  background: true,
  reason: "Fixing lint"
})

Start foreground subagent (hands-free, default to pi):

interactive_shell({
  command: 'pi "Implement the feature described in SPEC.md"',
  mode: "hands-free",
  reason: "Implementing feature"
})
// Returns sessionId in updates, e.g., "shell-1"

Send input to active session:

// Text with enter
interactive_shell({ sessionId: "calm-reef", input: "/compact\n" })

// Text + named keys
interactive_shell({ sessionId: "calm-reef", input: "/model", inputKeys: ["enter"] })

// Menu navigation
interactive_shell({ sessionId: "calm-reef", inputKeys: ["down", "down", "enter"] })

Change update frequency:

interactive_shell({ sessionId: "calm-reef", settings: { updateInterval: 60000 } })

Foreground subagent (user requested different agent):

interactive_shell({
  command: 'claude "Review this code for security issues"',
  mode: "hands-free",
  reason: "Security review with Claude"
})

Background subagent:

subagent({ agent: "scout", task: "Find all TODO comments" })

平台分布

Codex

33.41%
按下载量换算176

Claude

31.17%
按下载量换算164

Cursor

17.79%
按下载量换算94

Gemini CLI

8.69%
按下载量换算46

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/dicklesworthstone/pi_agent_rust --skill interactive-shell 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills