harn-sandbox-policy

harn-sandbox-policy is a skill for Claude Code from burin-labs/harn. It costs 50 tokens per session (1,980 once invoked), scanned A, original, Apache-2.0.

A guide to the process sandbox used by Harn to control which files child processes can read or write, including credential restrictions and platform-specific enforcement.

In plain words
What is it for?
Use it when configuring read or write roots, checking credential deny rules, or debugging sandbox behavior on macOS, Linux, or Windows.
Why use it?
It clarifies different kinds of file access and helps diagnose why an agent or spawned process cannot reach a path.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Use it when configuring read or write roots, checking credential deny rules, or debugging sandbox behavior on macOS, Linux, or Windows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/burin-labs/harn/harn-sandbox-policy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add burin-labs/harn --skill harn-sandbox-policy
Clone the repo
git clone --depth 1 https://github.com/burin-labs/harn

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for harn-sandbox-policy

README.md
[![agentmods](https://agentmods.dev/badge/skills/burin-labs/harn/harn-sandbox-policy/github.svg)](https://agentmods.dev/skills/burin-labs/harn/harn-sandbox-policy)
Your own site
<a href="https://agentmods.dev/skills/burin-labs/harn/harn-sandbox-policy"><img src="https://agentmods.dev/badge/skills/burin-labs/harn/harn-sandbox-policy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for harn-sandbox-policy

Your own site · 80×15
<a href="https://agentmods.dev/skills/burin-labs/harn/harn-sandbox-policy"><img src="https://agentmods.dev/badge/skills/burin-labs/harn/harn-sandbox-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,980 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01980
Opus 5.5 $0.00020 $0.00792
Sonnet 5.5 $0.00010 $0.00396
Haiku 4.5 $0.00005 $0.00198

Measured 1mo ago against content hash c614b2ba59b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

harn-sandbox-policy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

crates/harn-skills/src/corpus/harn-sandbox-policy/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Harn sandbox policy

The sandbox decides what a child process spawned by an agent tool call may read and write. It has one owner, crates/harn-vm/src/stdlib/sandbox/, and three backends that project the same CapabilityPolicy onto their platform.

Pair it with [[harn-agent]] for autonomy gating and [[harn-orchestration]] for where the policy comes from.

The three axes, which are not the same axis

Confusing these is the most common mistake here.

  1. workspace_roots / read_only_roots scope Harn's own file builtins (read_file, harness.fs.*), through check_fs_path_scope.
  2. process_sandbox.{presets,read_roots,write_roots,read_deny_roots} scope child processes only, through the OS backend. These never widen Harn's file builtins. allow_tcp_loopback and unix_socket_roots are the two socket grants on this axis: loopback admits IP on localhost, socket roots admit Unix-domain sockets whose socket file lives under a root, and neither opens remote egress. Both are host-owned: a nested policy cannot invent them. Whether a child may write any of its writable roots is CapabilityPolicy::children_may_write: the workspace write capability, or process_sandbox.allow_child_workspace_write for a role that runs commands but edits nothing. Every backend reads that one predicate.
  3. sandbox_profile decides whether either is enforced at all. enforces_path_scope() gates axis 1 and the toolchain-cache environment; confines_processes() gates axis 2.

A grant on one axis is not a grant on another, and a bug report that says "the agent cannot read X" needs to name which one before it can be diagnosed.

Adding a read root

Add it to the policy the embedder builds, or to a preset in sandbox/mod.rs if it belongs to every run. Presets are additive and expand per-platform in macos.rs / linux.rs / windows.rs.

Do not add a root by inferring it from the command being run. A read surface that is a function of the tool call is not auditable and fails order-dependently: the same command succeeds or fails depending on what ran before it.

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed c614b2ba59b7
  2. 1mo ago Changed · +5 lines f5ee8e176520
  3. 2mo ago Changed · +8 lines scan C → A 9e3295b688a0
  4. 2mo ago Changed · +1 lines · +1 tokens per session 1943de75ffb3
  5. 2mo ago Changed · +23 lines e83168031f7b
  6. 3mo ago First seen · 109 lines · 49 tokens per session scan C d5892ec2cd0d

Subscribe to this mod's changes

harn-sandbox-policy is a skill published in the GitHub repository burin-labs/harn (34 stars, last pushed 2d ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,980 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

harn-sandbox-policy compared with skills from other repositories

harn-sandbox-policy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
harn-sandbox-policyburin-labs/harnSkill342d agoApache-2.0A50Claude Code
translateRTGS2017/NagaAgentSkill1.5k29d agoAGPL-3.0A40Claude Code, Codex
self-host-studiodecocms/studioSkill419yesterdayMITA117Claude Code, Codex
flutter-appdecocms/studioSkill419yesterdayMITA78Claude Code, Codex
decocms-uidecocms/studioSkill419yesterdayMITA95Claude Code
slidesdecocms/studioSkill419yesterdayMITA40Claude Code, Codex
jira-releasedecocms/studioSkill419yesterdayMITA60Claude Code