terminal-opener
它能做什么
这个程序可以在一个单独的窗口中打开你电脑上的某个程序或命令。它的运行方式很安全,不会把多条命令混在一起,并且能让你看到正在发生的事情。
适用场景
- ✓当你需要运行一个交互式程序时。
- ✓当你需要启动一个安全连接(SSH)时。
- ✓当你想测试或调试命令,但又不想真正执行它们时。
技能链接
https://github.com/affaan-m/ECC/blob/main/skills/terminal-opener/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在新窗口中打开程序 'my_app',并传入参数 '--config' 和 'config.json'。”
每周 5 个新技能,1 分钟读完。
工作原理
它会把程序名称和所有参数分开处理,然后打开一个新窗口来运行这个程序,确保整个过程是隔离的、安全的。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Terminal Opener
Use scripts/open-terminal.js to preserve an executable and every argument as
separate process entries. Never interpolate a shell command string. Keep every
spawn on shell: false. Default to a non-launching plan. Use --launch only
after the user explicitly requests a real window and the argv has been reviewed.
The launched process inherits the full environment of the calling process,
including secret-bearing variables. The launcher does not filter the
environment. Run it from a shell whose environment is safe to expose to the
target command.
Launch a command
Pass launcher options before --, then pass exactly one executable followed by
its argument array:
node skills/terminal-opener/scripts/open-terminal.js \
--launch \
--cwd /absolute/host/path \
-- ssh -t example.test command-with-arguments
Run normal mode first. Let WezTerm try its mux with a new window, then let the
launcher fall back to a detached wezterm start process if the mux is not
available. When fallback is used, read muxFailure from JSON output (or the
human-readable failure line) to diagnose why the mux path failed.
Recover from terminal configuration
Add --recover or --standalone when user configuration or mux state may
interfere with the requested command. Start a detached WezTerm process with:
--skip-config start --always-new-process
Expect recovery mode to skip all user terminal configuration intentionally.
Inspect before launch
Omit --launch (or add --dry-run) and add --json to inspect the exact
executable, argv, working directory, terminal adapter, primary launch, and
fallback without opening a window. Treat the JSON plan as the composition
boundary for callers.
Run --detect --json without a command to probe terminal availability. Follow
the returned action when the adapter is missing or unsupported. Use WezTerm
for the current adapter; treat other requested terminals as unsupported plans,
not as commands to execute.
常见问题
“不混合命令”是什么意思?
这是指它不会把多条命令合并成一段文本,从而避免出错,也提高了安全性。
什么是“dry-run 模式”?
这是一种只展示程序将如何被打开、但并不真正打开它的模式。在正式运行之前,用它检查一切是否正确很有用。
打开之前能先看到相关信息吗?
可以。使用 `--json` 选项,你就能看到程序将如何被打开的所有细节,而不会真正执行。
详情
作者的原始描述
Open an executable and its argument array in a visible terminal window through a reusable, shell-free launch plan with dry-run, JSON, capability detection, detached fallback, and standalone recovery modes. Use when Codex needs to open an interactive CLI, SSH session, local development process, sandbox, or other argv-based command in a new host terminal; diagnose whether a supported terminal is ava
repo: affaan-m/ECC
热度
- GitHub 星标
- 280k
- 排名
- #422
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
accessibility
280k帮你的智能体创建人人都能使用的界面。确保网站和应用对残障人士友好,比如失明或行动不便的用户也能顺畅使用。
agent-architecture-audit
280k让你的智能体检查一切是否正常运行。它能找出并修复 AI 系统中的问题,确保系统按预期工作。
agent-eval
280k帮你的智能体比较不同的 AI 编程工具。它能衡量哪个工具在特定任务上更快、更便宜、更可靠。
agent-harness-construction
280k让你的智能体更好地理解如何完成任务。它会优化智能体使用的工具和指令,提高成功的几率。