一键导入
golem-add-npm-package
Add a new npm package dependency to a TypeScript Golem project. Use when the user asks to add a library, package, or dependency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a new npm package dependency to a TypeScript Golem project. Use when the user asks to add a library, package, or dependency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Adding a new TypeScript agent to a Golem component. Use when the user asks to create, add, or define a new agent type, implement an agent class, or add agent methods in a TypeScript Golem project.
Exposing a TypeScript Golem agent over HTTP. Use when the user asks to add HTTP endpoints, mount an agent to a URL path, or expose agent methods as a REST API.
Adding LLM and AI capabilities to a TypeScript Golem agent. Use when the user wants to add LLM chat, embeddings, or any AI provider integration to a TypeScript agent.
Adding secrets to TypeScript Golem agents. Use when the user asks to add secrets, store API keys, manage sensitive config values, or use Secret<T> in TypeScript agents.
Calling Golem agents from external TypeScript/Node.js applications using generated bridge SDKs. Use when the user wants to invoke agents from outside the Golem platform, from a Node.js server, script, or any TypeScript application.
Choosing between durable and ephemeral agents in a TypeScript Golem project. Use when the user asks about agent durability modes, making an agent stateless, or configuring agent persistence.
| name | golem-add-npm-package |
| description | Add a new npm package dependency to a TypeScript Golem project. Use when the user asks to add a library, package, or dependency. |
node:child_process, node:cluster, node:http2, node:worker_threads.fetch, Headers, Request, Response, FormData, Blob, File, URL, URLSearchParams, console, timers, AbortController, TextEncoder/TextDecoder, Streams (ReadableStream, WritableStream, TransformStream), structuredClone, crypto.randomUUID/crypto.getRandomValues, Event/EventTarget, MessageChannel/MessagePort, Intlnode:buffer, node:crypto (hashes, HMAC, ciphers, key generation, sign/verify, DH, ECDH, X509), node:dgram (UDP), node:dns, node:events, node:fs and node:fs/promises (comprehensive filesystem), node:http/node:https (client and server), node:net (TCP sockets and servers), node:os, node:path, node:perf_hooks, node:process, node:querystring, node:readline, node:sqlite (embedded, requires feature flag), node:stream, node:test, node:timers, node:url, node:util, node:v8, node:vm, node:zlib (gzip, deflate, brotli)Check the wasm-rquickjs README for the up-to-date list.
Install the package
From the project root (where package.json is):
npm install <package-name>
For dev-only dependencies (build tools, type definitions):
npm install --save-dev <package-name>
Build to verify
golem build
Do NOT run npx rollup or npx tsc directly — always use golem build.
If the build or runtime fails
X is not defined): the package depends on a Node.js or browser API not available in the QuickJS runtime. Look for an alternative package.These are already in the project's package.json — do NOT add them again:
@golemcloud/golem-ts-sdk — Golem agent framework, durability, transactions, RPC@golemcloud/golem-ts-typegen (dev) — type metadata generationrollup with plugins (dev) — bundling pipelinetypescript (dev) — TypeScript compilerUse the built-in fetch API — it is available globally.
Use any third party AI/LLM library from npmjs.com, but it has to only depend on the supported runtime APIs.