authoring-box-profile
Write or edit a box profile (`~/.strands/box/profiles/<name>/profile.toml`) or a pack (`~/.strands/box/packs/<name>/pack.toml`, or `resources/packs/<name>/pack.toml` in this repository) that runs an agent in a Strands Box. Use when asked to add an agent or a model provider to box, to change what a profile grants, or to fix a profile or pack that `box profile show` or Box Core refuses. Not for Box Core's own `box.toml` or for a Dogwood policy alone (use Box Core's authoring-box-policy skill for a policy).
- Star
- 662
- 分类
- 写作与翻译
- 许可证
- Apache-2.0
- 最近提交
- 2026年12月1日
.agents/skills/authoring-box-profile/SKILL.md
在 GitHub 上查看Authoring a box profile or pack
A profile lists packs in packs and sets their inputs in [options]. A pack declares inputs in
[inputs] and holds the reusable tables. Write a pack that runs one agent in a box on any host,
grants only what the agent needs, and loads clean. Write a profile that holds only the operator's
values and additions.
docs/cli/profiles-reference.md is the reference for
every profile key and every shared rule, and
docs/cli/packs-reference.md for every key that only a
pack writes. docs/cli/profiles.md shows the common
profile changes. Read the reference before you write a profile or a pack. This page gives the
workflow and the rules that an agent breaks most often.
Choose the file
- A change for one operator goes in their profile: a value in
[options], a tool table, a second project in[agent.filesystem], a credential in[egress.<name>.secret], or a rule in a file listed in the profile'spolicies. See What a profile holds. - A new agent or provider goes in a pack. A pack that other profiles reuse goes in
~/.strands/box/packs/<name>/, or inresources/packs/<name>/when it ships withbox.
Workflow
- Start from a shipped pack. Read
resources/packs/*/pack.toml. An agent pack extends@box/base. The model for a new agent is in Example: a pack of your own. - Write the header. Each pack has
[pack]withname,version, andkind.nameequals the import name:@box/<folder>for a shipped pack, the folder name for an operator pack.kindis"agent","tool", or"support", as What a pack holds states. Add[requires]withbox = ">=X.Y.Z"when the pack needs a key that an olderboxdoes not read. See[pack]and[requires]. - Pair the agent with a provider. A provider pack is a
supportpack that holds the route to a model host and itssecret.ref, and declares nothing else. An agent pack (a pack that declares[agent] command, or extends an agent pack) declares nothing for it either: a profile names one agent pack and one provider beside it, andboxdoes not check the provider. A setting the agent needs for one provider stays in the agent pack, behind an<agent>.hostinput and a{ variable, equals }when. See Providers. - Declare every input. Each value from the operator or the host is an
[inputs.<full name>]declaration. Give the name a prefix that is unlikely to clash, such as the agent's name. Add an input only when it changes what the box allows or how the box is set up. Read a host value withfrom = "env:<NAME>". See Inputs. - Use placeholders in fields that support them. Use
${{ home }},${{ pack }},${{ storage.<dir> }},${{ agent.<name> }}, and${{ inputs.<name> }}. Do not write a path of your own machine. - Put agent state in storage. Declare
[storage] directories, and point the agent's configuration and temporary directories at${{ storage.<dir> }}. Do not write files in the workspace. See Storage. To bring the operator's own instruction files into the box, add a[[storage.files]]row with asourceand atargetin a storage directory. Never copy a whole file that can hold a credential. Setkindand name the parts the agent needs withkeep(Copy only part of a settings file), and usesetfor a value that has to differ in the box (Set a value in the copy on every run). - Make a profile that uses the pack. For a shipped agent pack, run
box profile create <name> --with <agent>,<provider>. A short name is the operator's pack in~/.strands/box/packs/<name>when it exists, else@box/<name>. Write@box/<name>to name the shipped pack. - Check it. In a project directory, run
box profile show <name>(each pack, and each input with its value and its source) andbox profile show --full <name>(the same, then thebox.tomlandpolicy.dwof a run). Remove each grant in--fullthat the agent does not need. - Run it and read the denials.
box run <name>prints the path ofrecords.jsonl. Read eachdenywith the command in The agent can't reach a file or a host, and fix it with a filesystem entry, a route, a tool pack, or a rule in a listed policy file. - Repeat steps 8 and 9 until the agent does its task and each
denyis one you expect.
Rules that agents break
Each rule links to the section of the reference that states it in full.
- A profile holds no
extend,[inputs], or[pack]. A pack holds nopacks,policies, or[options]. See What a pack holds. boxgenerates rules from profile and pack settings. Put additional rules in files listed in the profile'spolicies, for examplepolicies = ["service.dw"]. Keep existing list entries. Policy paths are literal; relative paths resolve besideprofile.toml. Keep each file and symbolic-link target in that folder or its subdirectories. Use separate copies, not hard links. See Generated policy.- An
[options]value is literal. It holds no placeholder, it names an input that a pack in the chain declares, and it passes that declaration.boxchecks it at the merge. - An input that reaches a command or a route's host needs
patternorvalues. Inputs that reachcommandor a route lists the fields and the exemptions. Pass free text through[agent.env]. - The value order is: the profile's
[options], thenfrom, thendefault. See Where the value comes from. - Two packs that declare one input agree on
type. Different defaults orfromsources are an error until the profile sets the value. See Two packs that declare one input. - Do not read a credential variable with
from = "env:<NAME>". The route'ssecret.refholds the credential, and the box adds it to each request. - A placeholder goes only in the fields that Which fields take a placeholder lists. Every other field is literal.
- In path fields for commands, filesystem entries, and storage copy sources, the first piece is a placeholder or an absolute path. Each later placeholder fills one path component.
- An agent pack finds its agent with a
type = "program"input that namesprogramand, if needed,search. See Inputs. whentakesmacos,linux,${{ inputs.<bool> }}, or{ variable, equals }. One value, such as onecommandelement, takes it as{ value = ..., when = ... }. It applies after the merge, so awhenon a shared table such as[agent.env]removes what every layer put there. Put it on an entry, one value, or a table that one pack owns. Seewhen.- A later layer replaces a whole
command. To change one flag, write the completecommand. See Merge order. - Two packs cannot declare the same
[egress.<name>], and two packs cannot read the sameenv://variable. A profile names one provider. - An
[egress.<name>]route with anenv://secret.refputs the key on each host indestinations. Two routes of one pack, or of the profile, that read one variable need the samesecret.phantom_prefix, or none on both. A route that holds onlydestinationsopens hosts that need no credential, with no policy file. See Routes and other hosts. - Box Core expands
${NAME}in acommandargument and refuses each name that is not one of its telemetry variables.boxdoes not check this. - Mark a filesystem entry
optional = truewhen some hosts do not have the path. Box Core refuses a grant on a missing path when the run starts. - A tool comes from a tool pack that names its
program, andboxwrites the permit that starts it. For a program with no shipped pack, write a tool pack. See Tool packs. - A tool pack can ship a Box Core tool grammar in
grammar.toml. Box Core then decides that program's commands asTool::<name>::Action::"<action>", andboxpermits every action,unmodeledincluded. To restrict the tool, write aforbidon a grammar action or effect, not ashell:spawnrule, and pair it with an unconditionalforbidonTool::<name>::Action::"unmodeled", because a command with one undeclared option isunmodeledand escapes the first rule. See Tool grammars. - Give each authored rule a unique
@idacross all policy files. Do not reuse an ID from Generated policy.box profile showrefuses duplicate IDs. - Do not put a program under a
writegrant, and do not grantwritein~/.strands/boxoutside storage.box runrefuses both. - Every pack in the chain gets the same trust as the operator's own profile. Do not tell an operator to install a pack they have not read.
When a check fails
Read the message first: most messages name the fix. For a message that does not, see A profile has a mistake.
相似的 Skill
writing-fragments
MAmattpocock/skills336k近 7 天新增 4,217 个 star
writing-shape
MAmattpocock/skills336k近 7 天新增 4,217 个 star
writing-beats
MAmattpocock/skills336k近 7 天新增 4,217 个 star
perfect-docs
MAmattpocock/skills336k近 7 天新增 4,217 个 star
writing-skills
OBobra/superpowers331k近 7 天新增 5,030 个 star