ワンクリックで
playground
Use a sandboxed JavaScript worker to execute small snippets for calculation, data shaping, and behavior verification.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use a sandboxed JavaScript worker to execute small snippets for calculation, data shaping, and behavior verification.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Use a sandboxed JavaScript worker to execute small snippets for calculation, data shaping, and behavior verification.
Author and preview a Cent widget. Use this skill before calling `createWidget` to ensure the generated code follows the Widget DSL contract (header metadata, permissions, config schema, default export, DSL builders).
SOC 職業分類に基づく
| name | playground |
| description | Use a sandboxed JavaScript worker to execute small snippets for calculation, data shaping, and behavior verification. |
playground lets the assistant run JavaScript module code in an isolated web-worker sandbox.
The tool expects:
code (required): JavaScript module source codeargs (optional): array of arguments passed to default exporttimeoutMs (optional): execution timeout, default is 2000whiteList (optional): allowed global APIs inside sandboxThe runtime also injects a global helper:
getFile(index) (1-based): get uploaded file payload from the current session historygetFile(index) returns:
index: file index (starts from 1)name: original filenametype: MIME typesize: file size (bytes)lastModified: file timestamptext: file text content⚠️ Important: always limit the length of the returned text to reduce token consumption.
textcan be very large. When calling the tool, make sure the processing (slicing, filtering, aggregating, counting) happens inside the snippet and only return the necessary result instead of the whole text. Read and return the full file content only when it is truly necessary.
code must export a default function:
export default function main(input) {
return { ok: true, size: Array.isArray(input) ? input.length : 0 };
}
{
"name": "playground",
"params": {
"code": "export default function () { const file = getFile(1); return { fileName: file?.name ?? null, first20: file?.text?.slice(0, 20) ?? null }; }"
}
}
The runtime also injects a global async tools object. Every other tool registered in this
session is available as tools.<toolName>(params) and returns a Promise:
params must match that tool's argument schema (shown in the tool's definition).tools do not appear in the conversation — they are internal to this
playground run (just like getFile), so they do not consume context tokens.playground cannot call itself.This lets you compute a payload and act on it in a single snippet, instead of emitting a large payload as a separate tool call. Example — list the available skills:
export default async function () {
const skills = await tools.listSkills({});
return skills.slice(0, 10);
}
success: true with result when execution succeedssuccess: false with error when parsing/execution/timeout failsgetFile(index) when you need to parse or inspect user-uploaded files