agentleFS
computesdkcomputesdk/benchmarks/.claude/skills/add-sandbox-provider/SKILL.md

add-sandbox-provider

Skill131 starsChanged 18 days agoMITView on GitHub

Prep a new sandbox provider for the ComputeSDK benchmarks (wire up the dependency, env var, providers list, and CI workflow). Use when asked to add, onboard, or stage a new sandbox/compute provider — e.g. "add provider X", "onboard the foo sandbox", "set up bar for benchmarks".

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. computesdk/computesdk★ 289same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never guess the factory name or config keys — confirm against the published package:

    line 19
  2. Very specific:

    Add a commented import near the other imports: // import { <name> } from '@computesdk/<name>'.

    line 58
  3. Very specific:

    Add a commented entry in the providers[] array (direct-mode section, alphabetical):

    line 59
  4. Very specific:

    Keep the entry minimal — only name, requiredEnvVars, createCompute.

    line 69
  5. Distinctive:

    No tests enumerate providers.

    line 86
  6. Very specific:

    Run git diff and confirm the change set is exactly: package.json, package-lock.json, benchmarks/.env.example, …

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add a sandbox provider to the benchmarks

This repo benchmarks ComputeSDK sandbox providers. A provider is wired across four files. New providers are staged (every change commented out) until the provider's API secret exists as a GitHub repo secret — then they're activated by uncommenting. The beam provider is the reference example of a staged provider.

Inputs you need from the user (ask if missing): the provider name (lowercase, as it appears on npm @computesdk/<name>) and the env var(s) it authenticates with (e.g. FOO_API_KEY).

1. Verify the package and its factory shape

Never guess the factory name or config keys — confirm against the published package:

npm view @computesdk/<name> version          # confirm it exists, get the version
cd /tmp && npm pack @computesdk/<name>        # then inspect the type defs:
tar -xzf computesdk-<name>-*.tgz -O package/dist/index.d.ts | grep -nE 'declare const|Config|export'

Note the exported factory (usually <name>) and its config interface — which key holds the API key, and whether the key falls back to an env var. Most factories take { apiKey }; some take { token }, { token, workspace }, etc.

2. Add the dependency

In package.json add "@computesdk/<name>": "^<version>" to dependencies, in alphabetical order. Then sync the lockfile:

pnpm install

Confirm the diff only added the new package — git diff --stat package-lock.json (npm may report removing/changing packages while reconciling node_modules on disk; that's fine as long as the committed lockfile only gained the new entry).

3. Document the env var(s)

In benchmarks/.env.example append a section (staged providers live near the bottom, by BEAM):

######### <NAME> ########
<NAME>_API_KEY=your_<name>_api_key

4. Stage the provider entry (commented)

In benchmarks/sandbox/providers.ts:

  • Add a commented import near the other imports: // import { <name> } from '@computesdk/<name>';
  • Add a commented entry in the providers[] array (direct-mode section, alphabetical):
// {
//   name: '<name>',
//   requiredEnvVars: ['<NAME>_API_KEY'],
//   createCompute: () => <name>({ apiKey: process.env.<NAME>_API_KEY! }),
// },

Keep the entry minimal — only name, requiredEnvVars, createCompute. Do NOT copy sandboxOptions, destroyTimeoutMs, etc. from a neighboring provider; those are provider-specific (e.g. autoStopInterval is Daytona-only). Add an option only if the factory's own config documents it.

5. Stage the CI workflow (commented)

In .github/workflows/sandbox-benchmarks.yml, two spots, both commented like the beam lines:

  • The matrix.provider list: # - <name>
  • The Run benchmark step's env: block: # <NAME>_API_KEY: ${{ secrets.<NAME>_API_KEY }}

What you do NOT need to touch

  • A bench:<name> script in package.json is optional; CI invokes --provider ${{ matrix.provider }} directly. Skip it unless asked.
  • No tests enumerate providers.

Why staged (and why it's safe to activate later)

The runner gracefully skips any provider whose requiredEnvVars are missing — it returns a skipped: true result rather than failing (see benchmarks/sandbox/benchmark.ts, the missingVars check). So activating without the secret wouldn't break CI; staging is a convention to keep the provider list reflecting what's actually being benchmarked until the secret is added.

Activation (later, once the repo secret exists)

Uncomment all four staged blocks: the import and providers[] entry in providers.ts, the matrix line, and the workflow env: line. Add the <NAME>_API_KEY secret in the repo settings first.

Final check

Run git diff and confirm the change set is exactly: package.json, package-lock.json, benchmarks/.env.example, benchmarks/sandbox/providers.ts, .github/workflows/sandbox-benchmarks.yml — and that every provider-specific line is commented out (staged).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.