Shell tool — provides bash command execution in a hermetic child environment.
Registered through skills: like any other kit:
SkillKit.start_agent(
skills: [
{SkillKit.Tools.Shell, cwd: File.cwd!(), env: %{"LANG" => "en_US.UTF-8"}},
{SkillKit.Kit.Local, dir: ".skills"}
]
)Options
:cwd— working directory for commands (default:File.cwd!()):env— map of non-secret ambient env vars to inject into the child process (%{"LANG" => "en_US.UTF-8"}). NOT a secret channel — useSkillKit.CredentialProviderfor secrets.
Hermetic execution
Commands run under /usr/bin/env -i, which starts the child with an
empty environment. SkillKit then sets exactly what the child should
see, in this order:
- Hardcoded base:
PATH=/usr/bin:/binandHOMEcopied from BEAM. - The tool-config
:envmap (non-secret ambient vars). - Credentials returned by the configured
SkillKit.CredentialProvider. Credentials win on key collision.
BEAM's own environment (including ANTHROPIC_API_KEY and anything else
the host app has set) does not leak into the child.
Summary
Functions
Returns the agent definition from AGENT.md, or nil if not present.
Tool input schema. Override to declare parameters; defaults to an
empty object. Called from the generated definition/0.