Chuyển đến nội dung
Skillpedia
Lập trình chung280k · #422

terminal-opener

Skill này làm gì

Chương trình này mở một chương trình hoặc lệnh trên máy tính trong một cửa sổ riêng. Nó làm việc này an toàn, không trộn lẫn các lệnh, và cho phép bạn thấy điều gì đang diễn ra.

Khi nào nên dùng

  • ✓Khi bạn cần chạy một chương trình tương tác.
  • ✓Khi bạn cần mở một kết nối an toàn (SSH).
  • ✓Khi bạn muốn kiểm thử hoặc gỡ lỗi lệnh mà không thực sự chạy chúng.

Liên kết skill

https://github.com/affaan-m/ECC/blob/main/skills/terminal-opener/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/affaan-m/ECC/blob/main/skills/terminal-opener/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Mở chương trình “my_app” với các tham số “--config” và “config.json” trong một cửa sổ mới.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ nhận tên chương trình và tất cả tham số của nó riêng biệt. Sau đó, nó mở một cửa sổ mới để chạy chương trình này, đảm bảo mọi thứ được thực hiện theo cách cô lập và an toàn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.

Câu hỏi thường gặp

“Không trộn lẫn các lệnh” nghĩa là gì?

Nghĩa là công cụ không gộp nhiều lệnh thành một chuỗi văn bản duy nhất, điều này giúp tránh lỗi và tăng tính an toàn.

“Dry-run mode” là gì?

Đây là chế độ chỉ hiển thị cách chương trình sẽ được mở, nhưng không thực sự mở. Hữu ích để kiểm tra mọi thứ đúng trước khi chạy.

Tôi có thể xem thông tin trước khi mở không?

Có, bằng cách dùng tùy chọn “--json”, bạn có thể xem toàn bộ chi tiết về cách chương trình sẽ được mở mà không thực thi.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
280k
Vị trí xếp hạng
#422
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự