Skip to content

Guide · Agent skill

How to use the smolvm Credential Binding agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains the credentials agent skill for smolvm, which lets code running inside an isolated smolvm machine call an API with your key without being able to read it. It is written for readers who have not used agent skills before. By the end you will know how to install the skill, how to ask for it in plain language, and how to check that your key stayed out of the machine.

Credential Binding for Smolvm Machinessmol-machines/smolvm · Apache-2.0

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or your project's .claude/skills/ folder. In the Claude apps, upload it under Settings, Capabilities, Skills.
  2. 2Export your API key. Set the key as a host environment variable with your secrets manager, and keep it exported in the same shell for every script.
  3. 3Run preflight. Run scripts/preflight.sh with --var and --host. Continue only when it reports result=ready.
  4. 4Create the credentialed machine. Run scripts/create-credentialed.sh with the same --var and --host. It creates and starts a machine that holds only the placeholder.
  5. 5Verify containment. Run scripts/verify-containment.sh with --other-host. Continue only when it reports result=contained.
  6. 6Make your request and clean up. Send the placeholder in an Authorization header to the bound host, judge the answer from the API, then run scripts/cleanup.sh --purge.

What is an agent skill, and what does this one make the agent do?

An agent skill is a folder of instructions and scripts that an AI agent can load when a task matches it. This skill, named credentials, covers one job: giving a workload inside a smolvm machine an API key or token it can use but never read.

It does this by binding the credential to named HTTPS hosts. The guest machine holds only a placeholder. When a request leaves the machine for a bound host, the host substitutes the real value into the request header. The skill then proves on the host that the value never entered the machine.

  • Use it when an agent or untrusted code inside a machine must call an API with your key.
  • Use it to decide between a credential binding and --secret-env.
  • Use it when a request from a credentialed machine returns 403 or 502 from smolvm itself.
  • Use it when you need evidence that a key stayed out of a machine.
  • Do not use it for a value the program must read and parse, such as a database URL. That is --secret-env. Do not use it for git or ssh keys either; those are handled by SSH agent forwarding.

How do you install the credentials skill?

Download the ZIP of the skill from this page and unzip it. For a personal setup, place the folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.

If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the skill there.

The package contains SKILL.md, README.md, two reference files (references/platforms.md and references/traps.md) and four scripts in scripts/: preflight.sh, create-credentialed.sh, verify-containment.sh and cleanup.sh.

  • Requirements: smolvm, a macOS arm64 or Linux aarch64 host, a Bash shell, and network access to the API host you bind.
  • The verification step installs openssl and curl with apk in an Alpine guest image.
  • Your API key must be set as a host environment variable.

How do you set up a credential binding, step by step?

Follow the procedure in SKILL.md in order. Each step has a script and a expected output, so you can see whether it passed.

First, run the preflight check. It is read-only and never prints the value or its length. Keep the variable exported in the same shell for every later script, because each script reads the value from its own environment.

Then create the machine bound to one host, and run the containment check before any workload of yours runs in it. Only then make your own request, and clean up when finished.

  • Preflight reports result=ready when the machine can carry a credential.
  • create-credentialed.sh prints result=up and guest_sees=placeholder when the guest holds only the placeholder.
  • verify-containment.sh should print result=contained, with value_in_guest and value_in_record both at 0 matches.
export API_TOKEN=... ; scripts/preflight.sh --var API_TOKEN --host api.example.com

How do you trigger the skill with natural requests?

You do not need to name the skill or its scripts. Describe the situation in plain words and the agent should match it against the skill's description.

Requests that fit well describe a machine, a key and a host together. Be specific about the API host so the binding can be limited to it.

  • Set up a smolvm machine so the agent can call api.example.com with my API token, and prove the token never gets into the machine.
  • Should I pass this database URL to my smolvm machine with a credential binding or with --secret-env?
  • My request from the smolvm machine came back 403. Is that smolvm or the API?
  • Give me evidence that my key stayed out of this sandbox.

What do the verification results mean?

The containment check looks for the value in several places and reports each one. value_in_guest searches every process environment and the writable trees inside the guest. value_in_record searches the machine's directory and smolvm's database on the host.

interception confirms that the bound host's certificate is issued by the machine's own CA, named smolvm followed by the machine name and credential CA, while the other host you pass keeps its real issuer. passthrough and query_refused confirm that unbound traffic is relayed normally and that a placeholder in a query string is refused.

  • A 403 whose body says placeholders are substituted in request headers only means smolvm refused a placeholder outside a header.
  • A 403 that says this credential is not allowed for this host means the placeholder belongs to a binding for another host.
  • A 405 means the binding does not allow that HTTP method.
  • A 502 with a smolvm credentials body comes from smolvm, not the API.

What should you watch for when you use it?

Read the safety notes before you run anything. The skill runs scripts on your host and makes network requests to the bound API. The containment check runs grep inside the guest, so a workload that can replace grep could read the value. Run the check before any of your workloads start in that machine.

Port 80 is not intercepted. Plaintext HTTP is relayed untouched, so a placeholder sent there reaches the API as the literal string. Use HTTPS to the bound host.

If you need the workload to read the value, use --secret-env instead. The value is then plaintext inside the guest, where any process can read it and send it anywhere the network allows.

  • Rotating an environment value takes effect only after the machine restarts.
  • Never put the real value on an exec command line, because smolvm writes exec commands into the machine's console log on the host.
  • Ephemeral machines retire after their run returns, so cleanup.sh waits up to 20 seconds for them to leave the machine list.

What people use it for

  • Letting an AI agent call a third-party API from inside an isolated smolvm machine without giving it the key.
  • Running untrusted code that needs one API token, while the token stays out of the machine's environment.
  • Producing a record that shows a secret never reached a sandbox, for a security review.
  • Deciding whether a value belongs in a credential binding or in --secret-env.

Frequently asked questions

Is the smolvm credentials skill free?

The skill is published under the Apache-2.0 licence, as listed on this page. smolvm itself is required, and you install it separately. Check the licence files in the repository for the exact terms.

What do I need before I install the credentials skill?

You need smolvm, a macOS arm64 or Linux aarch64 host, a Bash shell, and network access to the API host you bind. Your API key must be set as a host environment variable. The verification step also installs openssl and curl with apk in an Alpine guest.

Where do I put the skill folder?

Unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. You can also upload the ZIP in the Claude apps under Settings, Capabilities, Skills.

Should I use a credential binding or --secret-env?

Use a credential binding when the workload only needs to send the key in a header and should never read it. Use --secret-env when the program must read and parse the value, such as a database URL. Git and ssh keys belong to SSH agent forwarding.

Why does my request return 403 or 502 from smolvm?

A 403 or 502 whose body starts with smolvm credentials comes from smolvm itself, not the API. Read the body: it names the rule, such as a placeholder in the path or query, a placeholder for a different host, or a 405 for a method the binding does not allow. If the machine was started with the variable unset, the request returns 502 credential unavailable.

Does this skill work on Windows or with port 80?

The skill was verified on macOS arm64 and Linux aarch64 only. Plaintext HTTP on port 80 is not intercepted, so a placeholder sent there reaches the API as the literal string. Use HTTPS to the bound host.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if an agent or untrusted code in a smolvm machine must call one API with your key and you want evidence the key stayed out. Pick --secret-env if the program must read the value, and SSH agent forwarding for git or ssh keys. It is also a poor fit if you cannot run scripts on your host or your workload can replace grep inside the guest.

Download the skill