Logo Sandbox Unblock

Sandbox Unblock

Cộng đồngPhổ biến
FlorianBruniaux
sandbox-unblock

Quy trình chẩn đoán cần chạy trước khi báo cáo sự cố do sandbox chặn hoặc yêu cầu thay đổi cấu hình. Gồm tám bước kiểm tra để loại trừ kết quả dương tính giả, sau đó là mẫu báo cáo để người quản lý cài đặt có thể xử lý. Trong một ngày được đo lường, sáu trong số tám sự cố được báo cáo hóa ra là dương tính giả, tất cả đều bắt nguồn từ cùng một vài lỗi phương pháp.

Add to TypingMind

Tổng quan

Nhà phát hànhFlorianBruniaux
Kho mãclaude-code-ultimate-guide
Tên kỹ năngsandbox-unblock
Sao
6.1K
Bản fork
807
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépCC-BY-SA-4.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được FlorianBruniaux công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Sandbox Unblock trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/main/examples/skills/sandbox-unblock
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-ultimate-guide.git /tmp/claude-code-ultimate-guide
mkdir -p .claude/skills
cp -r /tmp/claude-code-ultimate-guide/examples/skills/sandbox-unblock .claude/skills/sandbox-unblock
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Sandbox Unblock trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Sandbox Unblock ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Sandbox Unblock với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Unblock a session slowed by the sandbox

A blocker report is cheap to write and expensive to act on. This skill front-loads the verification so the report that reaches a maintainer is worth their time.

The measurements quoted below come from a single macOS machine on Claude Code 2.1.220, July 2026. Treat the numbers as illustrative and the method as the point.

Self-diagnosis, all eight checks, before you complain

Run these in order. Each step says what to run, what to read, and what the result lets you conclude. Steps 5b and 5c pay for themselves fastest.

1. Do not trust the sandbox description in your system prompt.

It lists the permissions.deny Read(...) patterns under read.denyOnly, things like **/*.pem or **/.env*. Those patterns govern the Read tool and nothing else. A subprocess launched from Bash reads those files without obstacle. One session concluded an entire Python pipeline was unrunnable on that basis; every step of it worked when measured. Never infer a Bash restriction from that list.

2. Confirm the command you are testing actually ran sandboxed.

bash
echo $TMPDIR

A path under the sandbox temp root means the measurement counts. The system temp directory means the invocation escaped, and nothing that follows it proves anything about sandboxed behavior.

3. Put the cd and the command in the same call.

The shell working directory resets between Bash calls. A cd in one call does not survive into the next, so the command you meant to test in a project ran somewhere else entirely. Two independent audits declared a package manager broken this way; the binary was simply absent from the directory they landed in.

bash
# wrong: two calls, the cd does not carry over
cd /path/to/project
pnpm exec prisma migrate status

# right: one call
cd /path/to/project && pnpm exec prisma migrate status

4. Check the binary exists before blaming the sandbox.

Wrappers that compress output often replace a clear message with a bare errno. A missing binary and a security refusal then look identical on screen.

bash
command -v <binary>
./node_modules/.bin/<binary> --version

Nothing returned means you have an installation problem, not a policy problem.

5. Read the real exit code, not a pipe's.

cmd | head returns the exit status of head, never of cmd. A refused read earlier in the session also emits a warning on every later command, including the ones that succeed, so read the last message rather than the first.

bash
cmd > "$TMPDIR/out.log" 2>&1
echo "exit: $?"
cat "$TMPDIR/out.log"

5b. Check whether a command rewriter sits between you and the matcher.

This one explained most of the blockers on the day it was found. If a PreToolUse hook rewrites Bash commands, for example a token-compression proxy that turns pnpm exec tsx x.ts into proxy pnpm exec tsx x.ts, then an excludedCommands entry written as pnpm exec * no longer matches anything. Only the rewritten form matches.

The tell is an inconsistency: some excluded commands escape the sandbox and others do not, with no obvious pattern. Look at whether the ones that work happen to have a prefixed entry in the list.

Proof shape, three measurements. A throwaway entry for an otherwise-sandboxed binary flips a Unix socket bind() from failure to success, which shows the mechanism works at all. The same command under an unprefixed entry stays sandboxed. Adding the prefixed form releases it immediately.

Any entry you request should be asked for in both forms, bare and prefixed.

5c. An entry matches the command exactly as written.

git fetch origin matches git fetch *. git -C /path fetch origin does not. pnpm --dir /path exec tsx x.ts does not match pnpm exec *. A trailing star requires at least one argument, so bare git fetch does not match git fetch * either and stays sandboxed. Rewrite your command in its canonical form before concluding anything.

6. If the configuration changed after your session opened, restart first.

The OS sandbox profile is compiled at session start. Exit and relaunch before measuring anything on a session that predates a settings change.

Two keys were measured as hot-reloaded, credentials.files and excludedCommands, along with the network allowlist. The rest were not tested that way, so keep the restart as your default.

If all eight checks pass and the blocker holds, move to the report template.

Network: blocked host or nonexistent host

The domain allowlist filters even when strict mode is off. Do not assume a permissive default means no filtering; measure with a host you know is outside both your list and the product's built-in defaults.

Duration tells you which failure you hit. A refusal by the allowlist hangs for roughly 5 to 7 seconds. A hostname that does not resolve fails in under 30 milliseconds, including when a wildcard in the list already covers it. On one run, two hosts named in a blocker report failed in about 25 ms while covered by their wildcards: neither host existed. Verify the apex answers before asking for a domain to be added.

Raw TCP to an external host is a separate matter. When the sandbox routes HTTP through a local proxy and cuts direct DNS, anything that is not HTTP has no path out. Cloud Postgres, MySQL, Redis and raw SSH all fail, and no domain entry can fix that. The command has to be excluded, or run outside the sandbox.

Report template

Fill this literally. Do not paraphrase the error: a reworded message cost a full day of misdirected work on the chantier this skill came from.

Exact command typed: <literal copy-paste, every argument included>
Raw error received: <literal copy-paste, not summarized>
$TMPDIR at test time: <exact value>
Sandboxed: <yes if under the sandbox temp root, no otherwise>
Session opened before or after the last config change: <before / after / unknown>
Protocol steps already run: <1, 2, 3, 4, 5, 5b, 5c, 6, with each result>
Workarounds already tried: <list, or "none">
Real impact: <which task is blocked, since when>

Escalation

Hand the filled template to whoever can edit the settings file. Do not edit it yourself from Bash: writes to it are refused from a sandboxed command, and only the Edit tool goes through.

The keys worth knowing under sandbox are excludedCommands, credentials.files, credentials.envVars, filesystem.allowWrite, network.allowedDomains and network.strictAllowlist. Two of them mislead.

credentials.envVars in deny mode does not remove the variable from Bash subprocesses. A listed key stays readable in full. Only credentials.files blocks a read, and only for absolute paths, never for a **/ glob. Moving a secret out of a denied file and into a denied environment variable therefore weakens it.

allowUnsandboxedCommands: false does not neutralize excludedCommands. They are independent: the first closes the per-invocation escape hatch, the second excludes named commands regardless of the first.

Limits with no fix

Verified. Do not reopen an investigation on these.

LimitFindingKnown workaround
Setuid binariesps, top, su, login cannot execlsof -nP -iTCP -sTCP:LISTEN
AF_UNIX socketsbind() refused everywhere, local-binding settings cover TCP onlyrun the loader directly, or bundle then run plain node
Direct DNScut for everyone, all HTTP goes through the local proxyexclude the tool if it needs raw sockets
.idea/ and .vscode/creating the directory works, writing a file inside is refused, in the current project onlyexclude the install command, in both forms

On DNS, never propose adding a generic diagnostic tool such as dig to the excluded list. It would return correct resolutions while the rest of the session stays cut off, which manufactures exactly the kind of false diagnosis this skill exists to prevent.

The .idea scoping matters more than it looks. The refusal applies to the current project, so an audit run from a neighbouring repository will report that nothing is blocked, and be wrong.

See also

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

Kỹ năng AI Sandbox Unblock làm được gì?

Quy trình chẩn đoán cần chạy trước khi báo cáo sự cố do sandbox chặn hoặc yêu cầu thay đổi cấu hình. Gồm tám bước kiểm tra để loại trừ kết quả dương tính giả, sau đó là mẫu báo cáo để người quản lý cài đặt có thể xử lý. Trong một ngày được đo lường, sáu trong số tám sự cố được báo cáo hóa ra là dương tính giả, tất cả đều bắt nguồn từ cùng một vài lỗi phương pháp.

Vì sao nên dùng Sandbox Unblock trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Sandbox Unblock là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Sandbox Unblock trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/main/examples/skills/sandbox-unblock. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Sandbox Unblock?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Sandbox Unblock với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Sandbox Unblock với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Sandbox Unblock có miễn phí không?

Có. Kỹ năng này được FlorianBruniaux phát hành trên GitHub theo giấy phép CC-BY-SA-4.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇