Agent Skillsnodetool-ai/nodetool › sandbox-aws

sandbox-aws

GitHub

提供 AWS SigV4 签名能力,支持在沙箱环境中为 S3 及其他服务生成请求签名或预签名 URL,解决 Guest 无法直接签名的问题。

packages/sandbox-packs/sandbox-aws/SKILL.md nodetool-ai/nodetool

Trigger Scenarios

需要向 AWS S3 发送 HTTP 请求 生成 AWS API 的预签名 URL 在代码节点中处理 AWS 认证

Install

npx skills add nodetool-ai/nodetool --skill sandbox-aws -g -y
More Options

Non-standard path

npx skills add https://github.com/nodetool-ai/nodetool/tree/main/packages/sandbox-packs/sandbox-aws -g -y

Use without installing

npx skills use nodetool-ai/nodetool@sandbox-aws

指定 Agent (Claude Code)

npx skills add nodetool-ai/nodetool --skill sandbox-aws -a claude-code -g -y

安装 repo 全部 skill

npx skills add nodetool-ai/nodetool --all -g -y

预览 repo 内 skill

npx skills add nodetool-ai/nodetool --list

SKILL.md

Frontmatter
{
    "name": "sandbox-aws",
    "description": "Sign AWS requests (S3 and every other SigV4 service) in a Code node or CodeAct action, with NodeTool's signer running on the host"
}

AWS SigV4 in the sandbox

Specifier: @nodetool-ai/sandbox-aws. Import it at the top of the body.

S3 is an HTTP API, so fetch already reaches it. What the guest cannot do is sign the request: SigV4 is an HMAC-SHA256 chain over a canonical form of the request, and one wrong byte gives a signature mismatch that names nothing. This pack is a host module: the chain runs on the host and hands back headers.

Nothing here sends a request. Both exports are pure — they take a request and return a signed one. The call goes out through the guest's own fetch, so the run's fetch cap and its SSRF guard still apply.

sigv4 — sign a request

import { sigv4 } from "@nodetool-ai/sandbox-aws";

const accessKeyId = await nodetool.secrets.get("AWS_ACCESS_KEY_ID");
const secretAccessKey = await nodetool.secrets.get("AWS_SECRET_ACCESS_KEY");

const signed = await sigv4({
  method: "GET",
  url: "https://my-bucket.s3.us-east-1.amazonaws.com/?list-type=2&max-keys=100",
  region: "us-east-1",
  service: "s3",
  accessKeyId,
  secretAccessKey
});

const res = await fetch(signed.url, { method: signed.method, headers: signed.headers });
return { xml: await res.text() };

Options: method (default GET), url (required, absolute), region (default us-east-1), service (default s3), accessKeyId and secretAccessKey (required), sessionToken (for temporary STS credentials), headers, body, payloadHash.

Returns {url, method, headers} — never the body. Pass the same body value to fetch yourself, so bytes make one trip, not two.

Writing an object

const body = JSON.stringify(inputs.record);
const signed = await sigv4({
  method: "PUT",
  url: `https://my-bucket.s3.us-east-1.amazonaws.com/${inputs.key}`,
  region: "us-east-1", service: "s3",
  accessKeyId, secretAccessKey,
  headers: { "content-type": "application/json" },
  body
});
await fetch(signed.url, { method: "PUT", headers: signed.headers, body });

A Uint8Array body works the same way — from workspace.readBytes or a previous response.bytes().

presign — a URL that authorizes itself

import { presign } from "@nodetool-ai/sandbox-aws";

const url = await presign({
  method: "GET",
  url: "https://my-bucket.s3.us-east-1.amazonaws.com/report.pdf",
  region: "us-east-1", service: "s3",
  expiresIn: 3600,
  accessKeyId, secretAccessKey
});
return { url };

Returns the URL as a string. expiresIn is seconds, clamped to a week. The payload is unsigned, which is what makes a presigned PUT usable — whoever holds the URL supplies the body.

Gotchas

  • Every export is async. A host call is a round trip.
  • It signs; it does not send. Nothing reaches the network until you call fetch.
  • The signature is time-bound. It is stamped when you call sigv4, and AWS rejects one more than 15 minutes old. Sign immediately before fetching, not at the top of a long function.
  • Other services work too. Set service and regiondynamodb, sqs, lambda, bedrock. Only s3 skips path normalization, because an object key is a key.
  • 10 MB of body per signature. Hash a bigger upload yourself and pass payloadHash, or use a presigned PUT.

Version History

  • a6a7e57 Current 2026-08-20 09:51

Same Skill Collection

.claude/skills/ask-matt/SKILL.md
.claude/skills/ast-grep-outline/SKILL.md
.claude/skills/ast-grep/SKILL.md
.claude/skills/codebase-design/SKILL.md
.claude/skills/companion-clis/SKILL.md
.claude/skills/diagnosing-bugs/SKILL.md
.claude/skills/domain-modeling/SKILL.md
.claude/skills/flash/SKILL.md
.claude/skills/implement/SKILL.md
.claude/skills/improve-codebase-architecture/SKILL.md
.claude/skills/nodetool-api-reference/SKILL.md
.claude/skills/nodetool-browser-agent/SKILL.md
.claude/skills/nodetool-chat-cli/SKILL.md
.claude/skills/nodetool-custom-node-developer/SKILL.md
.claude/skills/nodetool-deployment/SKILL.md
.claude/skills/nodetool-model-provider-config/SKILL.md
.claude/skills/nodetool-rag-indexing/SKILL.md
.claude/skills/nodetool-troubleshooter/SKILL.md
.claude/skills/nodetool-workflow-builder/SKILL.md
.claude/skills/prototype/SKILL.md
.claude/skills/research/SKILL.md
.claude/skills/resolving-merge-conflicts/SKILL.md
.claude/skills/setup-matt-pocock-skills/SKILL.md
.claude/skills/tdd/SKILL.md
.claude/skills/to-spec/SKILL.md
.claude/skills/to-tickets/SKILL.md
.claude/skills/triage/SKILL.md
.claude/skills/wayfinder/SKILL.md
.claude/skills/wizard/SKILL.md
.claude/skills/yts806379-everything-claude-code-e2e-testing/SKILL.md
packages/sandbox-packs/sandbox-chrono/SKILL.md
packages/sandbox-packs/sandbox-color/SKILL.md
packages/sandbox-packs/sandbox-csv/SKILL.md
packages/sandbox-packs/sandbox-dates/SKILL.md
packages/sandbox-packs/sandbox-decimal/SKILL.md
packages/sandbox-packs/sandbox-diff/SKILL.md
packages/sandbox-packs/sandbox-docx/SKILL.md
packages/sandbox-packs/sandbox-dsl/SKILL.md
packages/sandbox-packs/sandbox-epub/SKILL.md
packages/sandbox-packs/sandbox-exif/SKILL.md
packages/sandbox-packs/sandbox-expr/SKILL.md
packages/sandbox-packs/sandbox-fabric/SKILL.md
packages/sandbox-packs/sandbox-flow/SKILL.md
packages/sandbox-packs/sandbox-gif/SKILL.md
packages/sandbox-packs/sandbox-html/SKILL.md
packages/sandbox-packs/sandbox-ics/SKILL.md
packages/sandbox-packs/sandbox-jmespath/SKILL.md
packages/sandbox-packs/sandbox-mammoth/SKILL.md
packages/sandbox-packs/sandbox-markdown/SKILL.md

Metadata

Files
0
Version
a6a7e57
Hash
5f8c8705
Indexed
2026-08-20 09:51

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-24 21:44
浙ICP备14020137号-1 $방문자$