npm Supply Chain Security
bodadotsh/npm-security-best-practices
Applies safer package manager defaults and dependency vetting to JavaScript and TypeScript projects to reduce supply-chain attack risk.
Runs untrusted or AI-generated code in isolated Deno Sandbox microVMs using the @deno/sandbox SDK, with lifecycle, process and streaming guidance.
$ npx skills add denoland/skills --skill deno-sandbox -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install denoland/skills deno-sandbox --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/denoland/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/deno-sandbox .claude/skills/deno-sandbox && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "deno-sandbox" agent skill from https://github.com/denoland/skills/tree/main/skills/deno-sandbox into .claude/skills/deno-sandbox/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deno-sandbox", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/denoland/skills/tree/main/skills/deno-sandboxType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add denoland/skills --skill deno-sandbox -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install denoland/skills deno-sandbox --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/denoland/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/deno-sandbox .agents/skills/deno-sandbox && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "deno-sandbox" agent skill from https://github.com/denoland/skills/tree/main/skills/deno-sandbox into .agents/skills/deno-sandbox/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deno-sandbox", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add denoland/skills --skill deno-sandbox -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install denoland/skills deno-sandbox --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/denoland/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/deno-sandbox .cursor/skills/deno-sandbox && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "deno-sandbox" agent skill from https://github.com/denoland/skills/tree/main/skills/deno-sandbox into .cursor/skills/deno-sandbox/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deno-sandbox", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/denoland/skills.git --path skills/deno-sandbox--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add denoland/skills --skill deno-sandbox -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install denoland/skills deno-sandbox --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/denoland/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/deno-sandbox .gemini/skills/deno-sandbox && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "deno-sandbox" agent skill from https://github.com/denoland/skills/tree/main/skills/deno-sandbox into .gemini/skills/deno-sandbox/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deno-sandbox", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install denoland/skills deno-sandboxInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add denoland/skills --skill deno-sandbox -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/denoland/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/deno-sandbox .github/skills/deno-sandbox && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "deno-sandbox" agent skill from https://github.com/denoland/skills/tree/main/skills/deno-sandbox into .github/skills/deno-sandbox/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deno-sandbox", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add denoland/skills --skill deno-sandbox -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install denoland/skills deno-sandbox --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/denoland/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/deno-sandbox .opencode/skills/deno-sandbox && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "deno-sandbox" agent skill from https://github.com/denoland/skills/tree/main/skills/deno-sandbox into .opencode/skills/deno-sandbox/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deno-sandbox", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
deno-sandboxRuns untrusted or AI-generated code in isolated Deno Sandbox microVMs using the @deno/sandbox SDK, with lifecycle, process and streaming guidance.
Deno Sandboxes give each run its own Linux microVM, built on Firecracker, the same technology as AWS Lambda, with a separate filesystem, network and process space. The skill covers installing `jsr:@deno/sandbox` with `deno add`, creating a sandbox, and running commands with `spawn`, including piped stdin, streaming I/O for interactive processes and killing processes.
Sandboxes must be disposed when done, so examples always use the `await using` pattern and never show a bare create call. Scope is strict: it applies only to Deno Sandbox questions, and for Docker, vm2, Web Workers, Lambda isolation or other technologies the agent answers with that technology rather than suggesting Deno Sandboxes. It suits code playgrounds, running AI agent tool output, multi-tenant execution and isolated tests.
Read from SKILL.md and the folder at commit d5f6ace. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
denoFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
deno.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Deno Sandbox SDK loads about 2.7k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 429 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from denoland/skills at commit d5f6ace, republished under its MIT licence (© denoland). 429 words, ~2,656 tokens.
.claude/skills/deno-sandbox/SKILL.md (or your agent's skills folder).Deno Sandboxes provide secure, isolated environments for running untrusted code. Each sandbox runs in its own Linux microVM (using Firecracker, the same technology as AWS Lambda) with a separate filesystem, network, and process space. This makes them ideal for code playgrounds, AI agent tool execution, and multi-tenant applications.
Reference: https://deno.com/deploy/sandboxes
Use Deno Sandboxes when you need to:
This skill applies only to Deno Sandbox (@deno/sandbox) questions. Follow
these rules:
@deno/sandbox imports, Sandbox.create(), or
sandbox.spawn() in responses about other isolation technologies.deno add jsr:@deno/sandboximport { Sandbox } from "@deno/sandbox";
// Create a sandbox (auto-disposed when scope ends)
await using sandbox = await Sandbox.create();
// Run a command
const child = await sandbox.spawn("echo", { args: ["Hello from sandbox!"] });
const output = await child.output();
console.log(new TextDecoder().decode(output.stdout));
// Output: Hello from sandbox!Sandboxes are resources that must be disposed when done. Always use
await using for automatic cleanup:
await using sandbox = await Sandbox.create();
// Sandbox is automatically destroyed when this scope endsCRITICAL: Never show const sandbox = await Sandbox.create() without
await using. Always use the await using pattern for sandbox creation. Do not
show manual disposal alternatives.
The spawn method runs commands inside the sandbox:
const child = await sandbox.spawn("deno", {
args: ["run", "script.ts"],
stdin: "piped", // Enable stdin
stdout: "piped", // Capture stdout
stderr: "piped", // Capture stderr
});
// Wait for completion and get output
const output = await child.output();
console.log("Exit code:", output.code);
console.log("Stdout:", new TextDecoder().decode(output.stdout));
console.log("Stderr:", new TextDecoder().decode(output.stderr));For interactive processes or long-running commands:
const child = await sandbox.spawn("deno", {
args: ["repl"],
stdin: "piped",
stdout: "piped",
});
// Write to stdin
const writer = child.stdin!.getWriter();
await writer.write(new TextEncoder().encode("console.log('Hello')\n"));
await writer.close();
// Read from stdout
const reader = child.stdout!.getReader();
while (true) {
const { done, value } = await reader.read();
if (done) break;
console.log(new TextDecoder().decode(value));
}const child = await sandbox.spawn("sleep", { args: ["60"] });
// Kill with SIGTERM (default)
await child.kill();
// Or with specific signal
await child.kill("SIGKILL");
// Wait for exit
const status = await child.status;
console.log("Exited with signal:", status.signal);import { Sandbox } from "@deno/sandbox";
async function runUserCode(code: string): Promise<string> {
await using sandbox = await Sandbox.create();
// Write user code to a file in the sandbox
await sandbox.fs.writeFile("/tmp/user_code.ts", code);
// Run with restricted permissions
const child = await sandbox.spawn("deno", {
args: [
"run",
"--allow-none", // No permissions
"/tmp/user_code.ts",
],
stdout: "piped",
stderr: "piped",
});
const output = await child.output();
if (output.code !== 0) {
throw new Error(new TextDecoder().decode(output.stderr));
}
return new TextDecoder().decode(output.stdout);
}import { Sandbox } from "@deno/sandbox";
interface ExecutionResult {
success: boolean;
output: string;
error?: string;
executionTime: number;
}
async function executePlayground(code: string): Promise<ExecutionResult> {
const start = performance.now();
await using sandbox = await Sandbox.create();
await sandbox.fs.writeFile("/playground/main.ts", code);
const child = await sandbox.spawn("deno", {
args: ["run", "--allow-net", "/playground/main.ts"],
stdout: "piped",
stderr: "piped",
});
const output = await child.output();
const executionTime = performance.now() - start;
return {
success: output.code === 0,
output: new TextDecoder().decode(output.stdout),
error: output.code !== 0
? new TextDecoder().decode(output.stderr)
: undefined,
executionTime,
};
}import { Sandbox } from "@deno/sandbox";
async function executeAgentTool(
toolCode: string,
input: unknown,
): Promise<unknown> {
await using sandbox = await Sandbox.create();
// Create a wrapper that handles input/output
const wrapper = `
const input = ${JSON.stringify(input)};
const tool = await import("/tool.ts");
const result = await tool.default(input);
console.log(JSON.stringify(result));
`;
await sandbox.fs.writeFile("/tool.ts", toolCode);
await sandbox.fs.writeFile("/run.ts", wrapper);
const child = await sandbox.spawn("deno", {
args: ["run", "--allow-net", "/run.ts"],
stdout: "piped",
stderr: "piped",
});
const output = await child.output();
if (output.code !== 0) {
throw new Error(new TextDecoder().decode(output.stderr));
}
return JSON.parse(new TextDecoder().decode(output.stdout));
}Sandboxes have configurable resources:
Each sandbox comes with:
Sandboxes can be deployed directly to Deno Deploy:
deno deploy --prodThe sandbox SDK works seamlessly in the Deno Deploy environment.
For the complete API, run:
deno doc jsr:@deno/sandboxKey classes:
Sandbox - Main class for creating/managing sandboxesChildProcess - Represents a running processClient - For managing Deploy resources (apps, volumes)| Task | Code |
|---|---|
| Create sandbox | await using sandbox = await Sandbox.create() |
| Run command | sandbox.spawn("cmd", { args: [...] }) |
| Get output | const output = await child.output() |
| Write file | await sandbox.fs.writeFile(path, content) |
| Read file | await sandbox.fs.readFile(path) |
| Kill process | await child.kill() |
| Check status | const status = await child.status |
Forgetting automatic disposal
// ❌ Wrong - always use "await using" for sandbox creation
// Never write: const sandbox = await Sandbox.create() without "await using"
// ✅ Correct - use "await using" for automatic cleanup
await using sandbox = await Sandbox.create();
await sandbox.spawn("echo", { args: ["hello"] });
// sandbox automatically disposed when scope endsGiving user code too many permissions
// ❌ Wrong - gives untrusted code full access
const child = await sandbox.spawn("deno", {
args: ["run", "--allow-all", "/tmp/user_code.ts"],
});
// ✅ Correct - restrict permissions to what's needed
const child = await sandbox.spawn("deno", {
args: ["run", "--allow-none", "/tmp/user_code.ts"], // No permissions
});
// Or if network is truly needed:
const child = await sandbox.spawn("deno", {
args: ["run", "--allow-net", "/tmp/user_code.ts"], // Only network
});Not handling process output properly
// ❌ Wrong - forgetting to pipe stdout/stderr
const child = await sandbox.spawn("deno", { args: ["run", "script.ts"] });
const output = await child.output();
// output.stdout is empty because we didn't pipe it!
// ✅ Correct - pipe the streams you need
const child = await sandbox.spawn("deno", {
args: ["run", "script.ts"],
stdout: "piped",
stderr: "piped",
});
const output = await child.output();
console.log(new TextDecoder().decode(output.stdout));Not setting timeouts for user code execution
// ❌ Wrong - user code could run forever
const child = await sandbox.spawn("deno", {
args: ["run", "/tmp/user_code.ts"],
});
await child.output(); // Could hang indefinitely
// ✅ Correct - implement timeout handling
const child = await sandbox.spawn("deno", {
args: ["run", "/tmp/user_code.ts"],
stdout: "piped",
stderr: "piped",
});
// Set a timeout to kill the process
const timeoutId = setTimeout(() => child.kill(), 5000); // 5 second limit
try {
const output = await child.output();
return output;
} finally {
clearTimeout(timeoutId);
}Trusting sandbox output without validation
// ❌ Wrong - directly using untrusted output as code
const result = await runUserCode(code);
// Never execute or inject untrusted output!
// ✅ Correct - validate and sanitize output
const result = await runUserCode(code);
try {
const parsed = JSON.parse(result); // Parse as data, not code
if (isValidResponse(parsed)) {
return parsed;
}
} catch {
throw new Error("Invalid response from sandbox");
}© denoland, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/deno-sandbox of denoland/skills.
Open the folder on GitHubat commit d5f6ace
Deno Sandbox SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Deno Sandbox SDK this skilldenoland/skills | 100 | — | ~2.7k | Automated safety check: Pass | MIT | |
| npm Supply Chain Securitybodadotsh/npm-security-best-practices | 858 | — | ~1k | Automated safety check: Warn | MIT | |
| Dddswamp-club/swamp | 646 | — | ~1.4k | Automated safety check: Pass | Custom licence | |
| TS SDK Authormindfold-ai/Trellis | 15k | — | ~6.1k | Automated safety check: Pass | MIT | |
| Deno Scriptcataclysmbn/Cataclysm-BN | 1.3k | — | ~1.8k | Automated safety check: Pass | Custom licence | |
| evlog Framework Integrationevloghq/evlog | 1.9k | — | ~5k | Automated safety check: Notes | MIT |
bodadotsh/npm-security-best-practices
Applies safer package manager defaults and dependency vetting to JavaScript and TypeScript projects to reduce supply-chain attack risk.
swamp-club/swamp
Domain Driven Design guidance for TypeScript/Deno codebases.
mindfold-ai/Trellis
Design, build, verify, and publish production-grade TypeScript SDKs as npm packages inside a pnpm monorepo.
cataclysmbn/Cataclysm-BN
Write or modify Cataclysm-BN Deno/TypeScript scripts. An agent skill from cataclysmbn/Cataclysm-BN.
evloghq/evlog
Walks a contributor through adding a new HTTP framework integration to the evlog logging package: middleware source, build entry, exports, tests, example app and docs.
deinsoftware/swpm
Manage cmds and args props in SWPM package manager configs (src/packages/managers/.ts), including adding, modifying or removing command and argument mappings across npm, yarn, pnpm, bun, deno.
denoland/skills
Guides writing, running and configuring Deno 2.9+ projects: installing npm and JSR dependencies, permissions, config file precedence and the built-in fmt, lint, test and compile toolchain.
denoland/skills
Chooses between running regular npm frontend frameworks under Deno and building with Fresh, Deno's island-architecture framework, with Fresh 2.x guidance.
denoland/skills
Guides deploying Deno apps with the deno deploy CLI, including pre-flight checks, environment variables, Deno KV, custom domains and the --tunnel flag for local development.
denoland/skills
Moves a Node.js, npm, Yarn, pnpm or Bun project to Deno in reversible steps, starting with Deno as the package manager and changing no code unless needed.
Works with
Categories
Runs untrusted or AI-generated code in isolated Deno Sandbox microVMs using the @deno/sandbox SDK, with lifecycle, process and streaming guidance. Deno Sandboxes give each run its own Linux microVM, built on Firecracker, the same technology as AWS Lambda, with a separate filesystem, network and process space. The skill covers installing `jsr:@deno/sandbox` with `deno add`, creating a sandbox, and running commands with `spawn`, including piped stdin, streaming I/O for interactive processes and killing processes.
Deno Sandbox SDK fits situations like: building a feature that runs user-submitted code safely; executing AI-generated code in an isolated environment; creating a code playground or multi-tenant execution service in Deno.
Run `npx skills add denoland/skills --skill deno-sandbox -a claude-code`. Or copy the skill folder (skills/deno-sandbox in denoland/skills) into .claude/skills/deno-sandbox in your project. Claude Code loads it when a task matches its description.
Run `npx skills add denoland/skills --skill deno-sandbox -a codex`. Or copy the skill folder (skills/deno-sandbox in denoland/skills) into .agents/skills/deno-sandbox in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add denoland/skills --skill deno-sandbox -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deno-sandbox, .gemini/skills/deno-sandbox, .github/skills/deno-sandbox and .opencode/skills/deno-sandbox in your project.
Going by SKILL.md and its folder, Deno Sandbox SDK needs the command-line tools its instructions call (deno). Our summary lists: Deno; The `@deno/sandbox` package from JSR.
SKILL.md names 1 domain. As links in the text: deno.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Deno Sandbox SDK is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Deno Sandbox SDK: npm Supply Chain Security (bodadotsh/npm-security-best-practices, 858 stars), Ddd (swamp-club/swamp, 646 stars), TS SDK Author (mindfold-ai/Trellis, 15k stars) and Deno Script (cataclysmbn/Cataclysm-BN, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
denoland (a GitHub organization, an official publisher) maintains it in denoland/skills, which has 100 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 29, 2026.
Source: denoland/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.