Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(prompts): publish the prompt library at /prompts, plus JSON and text feeds
ni3aca941f306362
diff --git a/STRUCTURE.md b/STRUCTURE.mdindex 95c34cc23..cff4317e4 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -23,6 +23,7 @@ bottom.| Pocket Console (`/pocket`) | [pages/pocket.html](pages/pocket.html) `→ /pocket`, app [src/pocket.js](src/pocket.js), styles [src/pocket.css](src/pocket.css), screen [pages/walk-embed.html](pages/walk-embed.html) via the typed contract in [src/walk-embed-events.js](src/walk-embed-events.js) | Live | A handheld with a live 3D agent inside the screen, built for the thing people actually share: the D-pad walks the agent, A waves, B jumps, L/R change the cartridge, START swaps the screen between PLAY, STATS (the agent record read live) and SELECT (a game menu over `GET /api/agents/public`), and the power LED is a real switch that unmounts the frame so an off screen stops rendering. Keyboard, touch and the Gamepad API drive the same controls. Four shell finishes and four scenes, all carried in the URL, so a share link is the device as you left it. `?chrome=off` is the embed: the device alone on a transparent background with no nav, footer or language pill, addressed by avatar id so the GLB streams through the same-origin proxy and renders identically on a third-party domain. The screen runs the walk embed at `zoom=0.74` (the param this surface added, documented in [docs/tutorials/walk-companion.md](docs/tutorials/walk-companion.md)). Docs: [docs/pocket.md](docs/pocket.md) || Live Docs (runnable code samples) | Pure decisions [public/docs-live-core.js](public/docs-live-core.js), runner [public/docs-live.js](public/docs-live.js), styles [public/docs-live.css](public/docs-live.css), mounted by the docs viewer [docs/index.html](docs/index.html) | Live | Every code sample across the ~318 documentation pages is editable, and the runnable ones execute in place: an `html` snippet containing `<agent-3d>` renders a real animated avatar in a sandboxed frame directly under the code, a single-`curl` `bash` block sends a real request and reports status, latency, size, body and response headers, and a `js` snippet runs as a module with its console streamed back. Slots such as `$API_KEY` or `<agent-id>` become input fields, with credential-shaped names held in memory and never written to storage. The safety split is the design: everything deciding what a reader may fire lives in the pure core and is unit-tested rather than trusted to a click handler. Only three.ws hosts are reachable, any path that can move funds or mint is refused outright on every verb, writes arm before they send, every fetch goes out with `credentials: omit`, and frames run `sandbox="allow-scripts"` without `allow-same-origin`. Authors opt a block out with `<!-- live:off -->`. Loaded lazily after the first page render, so a page with no runnable samples costs nothing. Docs: [docs/live-docs.md](docs/live-docs.md) `→ /docs/live-docs`. Tests: [tests/docs-live-core.test.js](tests/docs-live-core.test.js) || Docs World (immersive 3D docs) | [pages/docs-world.html](pages/docs-world.html) `→ /docs/world`, app [src/docs-world/](src/docs-world) (world/player/controls/overlays), styles [public/docs-world.css](public/docs-world.css), shared manifest [docs/nav.json](docs/nav.json) | Live | The documentation as a walkable place: each section of the docs sidebar is a glowing pavilion on a ring; walk up (WASD / touch joystick, four shared camera modes via [src/game/camera-modes.js](src/game/camera-modes.js)) or tap one to list its pages, and read the live markdown in an in-world DOM reader ([src/shared/markdown.js](src/shared/markdown.js)). One content source: both surfaces read `docs/nav.json` + `/docs/<slug>.md`, so classic and immersive docs cannot drift. Deep links mirror the classic hash routes (`/docs/world#forge`); the classic header's "3D world" button carries the open page across. Avatar is the platform's default rigged body (the same one `/walk` uses, since the agent mannequin ships unskinned and cannot be clip-driven) or any rigged GLB via `?avatar=`, animated by the canonical clip library. No-WebGL devices get a designed fallback routing to `/docs`. Docs: [docs/docs-world.md](docs/docs-world.md). Tests: [tests/docs-world.test.js](tests/docs-world.test.js) |+| Prompt library (`/prompts`) | Source [data/prompt-library.json](data/prompt-library.json), builder [scripts/build-prompt-library.mjs](scripts/build-prompt-library.mjs) → `public/prompts.json` + `public/prompts.txt`, page [pages/prompts.html](pages/prompts.html) `→ /prompts` + [src/prompt-library/](src/prompt-library) (page.js, page.css) | Live | Prompts written to be copied out and pasted into someone else's assistant, grouped by what they build (3D models and rigged avatars, site embeds, the x402 economy, platform integrations) and by what they need first (nothing at all, the free MCP server, the skills pack, a funded wallet). Every prompt names a real endpoint or tool, says what to do when a job comes back pending, and says what to hand back; the ones that can spend money are written so the assistant stops and shows the amount and the recipient first. Each card copies to the clipboard or opens straight in claude.ai with the text already in the box, and the whole library is fetchable as `/prompts.json` or `/prompts.txt` so an agent can read it without scraping. The builder validates the data on every build (unique kebab-case ids, known category and setup, balanced `<placeholder>` brackets, internal links that resolve to routes in [data/pages.json](data/pages.json)) and `npm run check:prompt-library` holds the published copies in sync inside `npm run gate`. Docs: [docs/prompts.md](docs/prompts.md) `→ /docs/prompts`. Tests: [tests/prompt-library.test.js](tests/prompt-library.test.js) || React avatar creator | [avatar-sdk/](avatar-sdk) `→ /react` `/creator` | Published as `@three-ws/avatar` | Same package, React subpath || Avatar CLI (manifests in the build pipeline) | [packages/avatar-cli/](packages/avatar-cli), landing [pages/avatar-cli.html](pages/avatar-cli.html) `→ /avatar-cli`, styles [public/avatar-cli.css](public/avatar-cli.css), page runtime [src/avatar-cli-page.js](src/avatar-cli-page.js) | Published as `@three-ws/avatar-cli` | The terminal half of the avatar story, and the half that makes an avatar auditable. Four commands over one file: `init` scaffolds a schema-valid manifest from a wallet plus a mesh (reading the GLB once to compute its SHA-256 and size, so the document cannot disagree with the bytes it was built from), `validate` checks it against [packages/avatar-schema/](packages/avatar-schema) and exits non-zero so it works as a build gate, `hash` prints a bare digest that composes in a shell, and `preview` emits a resolver URL, an `<agent-3d>` snippet paired with the loader that registers it, and a zero-install iframe. Offline and deterministic throughout: no account, no API key, no network call, which is what makes it safe in a release script. `preview` warns instead of printing a dead snippet when `mesh.uri` is still a local `file://` path. The landing page proves the emitted markup by rendering it live rather than screenshotting it. Docs: [docs/avatar-cli.md](docs/avatar-cli.md) `→ /docs/avatar-cli`, tutorial [docs/tutorials/ship-an-avatar-manifest.md](docs/tutorials/ship-an-avatar-manifest.md). Tests: [packages/avatar-cli/test/](packages/avatar-cli/test) || Asset catalog (one search over every ready-made asset) | join + ranking [api/_lib/asset-catalog.js](api/_lib/asset-catalog.js), code generation [api/_lib/asset-snippets.js](api/_lib/asset-snippets.js), REST [api/catalog.js](api/catalog.js) `→ /api/catalog`, MCP tools [api/_mcp/tools/library.js](api/_mcp/tools/library.js), CLI [packages/assets-cli/](packages/assets-cli) | Published as `@three-ws/assets` | The CC0 prop library, the ready-made character library and the motion-clip library joined into one ranked catalog (3,492 items) that also hands back paste-ready source: the `<model-viewer>` tag the browse grids render with, `<agent-3d>` pinned to the exact published version plus its SRI hash, plain three.js, or React. Reachable three ways off one implementation: `GET /api/catalog`, the free MCP tools `search_catalog` / `get_catalog_item` / `get_item_source` (on the dispatcher's public allowlist, so no OAuth and no x402), and `npx @three-ws/assets add <id>`, which downloads the asset into the caller's project and rewrites the snippet to the local path. Every word of a query must match, with a labelled partial-match fallback so a phrase never dead-ends. Docs: [docs/mcp.md](docs/mcp.md) `→ /docs/mcp`, [docs/api-reference.md](docs/api-reference.md). Tests: [tests/api/mcp-asset-catalog.test.js](tests/api/mcp-asset-catalog.test.js), [tests/api/catalog-endpoint.test.js](tests/api/catalog-endpoint.test.js), [packages/assets-cli/test/](packages/assets-cli/test) |diff --git a/data/pages.json b/data/pages.jsonindex e1d82978c..dc2a71ae3 100644--- a/data/pages.json+++ b/data/pages.json@@ -549,6 +549,15 @@"auth": null,"added": "2026-06-24"},+ {+ "path": "/prompts",+ "title": "Prompt Library",+ "description": "Copy-paste prompts for Claude and any AI agent: generate a 3D model or a rigged avatar, embed one on a site, validate a GLB, find or sell a paid API in the agent economy. Most of them need no account, no key and no setup.",+ "priority": 0.9,+ "changefreq": "weekly",+ "added": "2026-09-20",+ "showcase": true+ },{"path": "/start","title": "Get Started",@@ -3845,6 +3854,12 @@"description": "The VS Code extension that renders .glb and .gltf files in an editor tab, reports on them, generates and rigs new models on the free lane, and writes a pinned <agent-3d> embed.","added": "2026-09-05"},+ {+ "path": "/docs/prompts",+ "title": "Docs · The prompt library",+ "description": "How the three.ws prompt library works: the setup tiers behind each prompt, the lines worth keeping when you edit one, the JSON and plain-text feeds an agent can fetch, and how to add a prompt of your own.",+ "added": "2026-09-20"+ },{"path": "/docs/mcp-studio","title": "Docs · 3D Studio MCP (free)",diff --git a/data/prompt-library.json b/data/prompt-library.jsonnew file mode 100644index 000000000..128b2597a--- /dev/null+++ b/data/prompt-library.json@@ -0,0 +1,585 @@+{+ "version": "1.0.0",+ "title": "three.ws Prompt Library",+ "tagline": "Copy a prompt. Paste it into your Claude. Get a real result.",+ "intro": "Every prompt here is written to be pasted straight into Claude (Claude Code, the Claude apps, or any agent that can make an HTTP call) and to produce something real: a 3D model you can download, an embed running on your page, a paid endpoint other agents can call. Placeholders in angle brackets are the parts you replace.",+ "setups": [+ {+ "id": "none",+ "label": "No setup",+ "blurb": "Nothing to install. Works in any Claude that can make an HTTP request or run a command.",+ "how": []+ },+ {+ "id": "mcp-studio",+ "label": "Free MCP server",+ "blurb": "Connect the free three.ws 3D Studio once. No account, no API key, no payment.",+ "how": [+ "Claude Code: claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio",+ "Claude apps: add https://three.ws/api/mcp-studio as a custom connector with authentication set to None."+ ]+ },+ {+ "id": "skills",+ "label": "Skills pack",+ "blurb": "Install the three.ws Agent Skills so Claude already knows the platform's endpoints and rules.",+ "how": [+ "Claude Code plugins: add the marketplace nirholas/three.ws, then install three-ws-core@three-ws.",+ "Anything else: copy a folder from .agents/skills/ into your project's .claude/skills/."+ ]+ },+ {+ "id": "wallet",+ "label": "Agent wallet",+ "blurb": "Needs a funded agent wallet. These prompts can move real money, so they are written to stop for your yes first.",+ "how": [+ "Sign in and fund the wallet before you paste one of these: https://three.ws/start"+ ]+ }+ ],+ "categories": [+ {+ "id": "setup",+ "label": "Connect it to your Claude",+ "blurb": "Two prompts that leave your Claude able to build 3D for you in every session after this one."+ },+ {+ "id": "create",+ "label": "Make 3D things",+ "blurb": "Models, rigged avatars, refinements, and the checks that keep you from shipping a broken mesh."+ },+ {+ "id": "web",+ "label": "Put it on your site",+ "blurb": "The embed, the framework wrapper, the concierge, and what to do when an embed goes dark."+ },+ {+ "id": "economy",+ "label": "The agent economy",+ "blurb": "Find a paid API, sell your own, pay for a call. Anything that moves money stops for your confirmation."+ },+ {+ "id": "build",+ "label": "Build on the platform",+ "blurb": "Wire three.ws into your own agent, your own toolchain, your own dashboards."+ }+ ],+ "prompts": [+ {+ "id": "connect-free-3d-studio",+ "title": "Connect the free 3D studio to Claude",+ "summary": "One prompt that installs the free MCP server and proves it works by generating a model.",+ "category": "setup",+ "setup": "none",+ "tags": ["mcp", "setup", "free"],+ "prompt": [+ "Connect the free three.ws 3D Studio to this session so you can make 3D models for me.",+ "",+ "It is a remote MCP server with no account, no API key and no payment:",+ "",+ " claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio",+ "",+ "If this environment has no Claude Code CLI, tell me where to paste the URL instead: the Claude apps take it as a custom connector with authentication set to None.",+ "",+ "Once it is connected, list the tools it exposes with one line each, then prove the path end to end by generating \"a small brass desk lamp\" and handing me the GLB URL and the viewer link."+ ],+ "returns": "A connected MCP server, its tool list, and one real GLB you can open in the browser.",+ "links": [+ { "label": "3D Studio docs", "href": "/docs/mcp-studio" },+ { "label": "All MCP servers", "href": "/docs/mcp" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "install-skills-pack",+ "title": "Install the three.ws skills in your project",+ "summary": "Teach your Claude the platform once, so later prompts can be one sentence long.",+ "category": "setup",+ "setup": "none",+ "tags": ["skills", "setup", "claude-code"],+ "prompt": [+ "Set up the three.ws Agent Skills in this project so you know how to drive the platform without me explaining it every time.",+ "",+ "Read https://three.ws/docs/agent-skills first, then take whichever install path fits this environment:",+ "- Claude Code with plugins: add the marketplace nirholas/three.ws and install three-ws-core@three-ws.",+ "- Anything else: copy the skill folders out of github.com/nirholas/three.ws/tree/main/.agents/skills into .claude/skills/.",+ "",+ "I want the 3D set at minimum: find-3d-assets, generate-3d-model, create-3d-avatar, rig-a-model.",+ "",+ "Tell me which path you took, which skills landed, and give me one sentence per skill on what it triggers on. Do not install the wallet or trading skills unless I ask for them."+ ],+ "returns": "The skills installed in the right place for your setup, plus a table of what each one does.",+ "links": [{ "label": "Agent Skills docs", "href": "/docs/agent-skills" }],+ "added": "2026-09-20"+ },+ {+ "id": "text-to-3d-free",+ "title": "Turn a sentence into a 3D model",+ "summary": "The free, keyless text to GLB lane, with the polling your agent usually gets wrong.",+ "category": "create",+ "setup": "none",+ "tags": ["forge", "glb", "free", "api"],+ "prompt": [+ "Make me a 3D model of <a weathered brass diving helmet>. Use the free three.ws API: no key, no account.",+ "",+ " POST https://three.ws/api/3d/generate {\"prompt\": \"<one subject, specific about material and style>\"}",+ "",+ "If the response comes back pending it hands you a job id: poll GET https://three.ws/api/3d/generate?job=<id> until it is done. Generation takes a minute or two, so keep polling instead of declaring failure on the first pending response.",+ "",+ "Give me the glbUrl exactly as returned (do not rebuild the URL yourself), the viewer link, the AR link and the file size. One subject per generation: if what I asked for is really a scene, split it into separate models and tell me you did."+ ],+ "returns": "A downloadable GLB, a viewer link, and an AR link that opens on a phone.",+ "links": [+ { "label": "3D API reference", "href": "/docs/3d-api" },+ { "label": "Forge in the browser", "href": "/forge" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "rigged-avatar-one-step",+ "title": "Generate a rigged avatar from a description",+ "summary": "Mesh plus humanoid skeleton in one call, then looked at before it is handed to you.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": ["avatar", "rigging", "mcp"],+ "prompt": [+ "Generate a rigged, animation-ready 3D avatar from this description: <a tall elf ranger in a weathered green cloak>.",+ "",+ "Use the three.ws 3D Studio MCP server. forge_avatar does the mesh and the humanoid skeleton in one step, so use that rather than generating and rigging separately. If it returns a pending job, collect it with check_job.",+ "",+ "Before you tell me it is done, call look_at_model on the result and actually look at the frames. If the silhouette or the proportions are wrong, fix it with refine_model and a one-line instruction rather than starting over, and show me both versions.",+ "",+ "Hand me the rigged GLB URL, the renders, and the link that opens it in the pose studio."+ ],+ "returns": "A rigged GLB you can animate, plus rendered frames so you can judge it without downloading anything.",+ "links": [+ { "label": "Animation Studio", "href": "/pose" },+ { "label": "Avatar Studio", "href": "/avatar-studio" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "photo-to-avatar",+ "title": "Turn a photo into a 3D avatar",+ "summary": "A reference image becomes a rigged humanoid, with an honest verdict on the likeness.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": ["avatar", "image-to-3d", "mcp"],+ "prompt": [+ "Turn this reference image into a 3D avatar: <https://example.com/photo.jpg>",+ "",+ "Use forge_avatar on the three.ws 3D Studio MCP server with image_url set to that image, so I get a rigged humanoid rather than a static bust. Collect it with check_job if it comes back pending.",+ "",+ "Then look_at_model it from the front and the three-quarter view and tell me honestly whether it reads as the reference. If it does not, say what in the image is fighting it (lighting, crop, occlusion, hair) and what I should re-shoot."+ ],+ "returns": "A rigged avatar from your photo, and a straight answer about the likeness.",+ "links": [+ { "label": "Selfie to avatar", "href": "/create/selfie" },+ { "label": "Image to 3D", "href": "/image-to-3d" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "rig-my-glb",+ "title": "Rig a GLB you already have",+ "summary": "Add a humanoid skeleton and skin weights to a static model, and hear whether it was worth it.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": ["rigging", "glb", "mcp"],+ "prompt": [+ "Rig this GLB so it can be animated: <https://example.com/character.glb>",+ "",+ "Use rig_mesh on the three.ws 3D Studio MCP server. It adds a humanoid skeleton and skin weights and returns a new GLB.",+ "",+ "Tell me whether the source mesh was actually humanoid enough to rig well, what came back, and give me the pose-studio link so I can check that the joints bend where they should. If the model is clearly not humanoid, say so before spending the call."+ ],+ "returns": "A rigged GLB plus a pose-studio link to check the joints.",+ "links": [{ "label": "Rig Doctor", "href": "/rig-doctor" }],+ "added": "2026-09-20"+ },+ {+ "id": "search-before-you-generate",+ "title": "Search the catalog before generating anything",+ "summary": "Thousands of ready-made CC0 objects, characters and motion clips. A real asset usually beats a fresh generation.",+ "category": "create",+ "setup": "none",+ "tags": ["catalog", "cc0", "assets", "free"],+ "prompt": [+ "I need <an industrial desk lamp> for a scene. Check the three.ws catalog before generating anything: it holds thousands of ready-made CC0 objects, rigged characters and motion clips.",+ "",+ " curl -s 'https://three.ws/api/catalog?q=<query>&kind=object&limit=8'",+ "",+ "Show me the top matches with title, license, file size and thumbnail. If one of them fits, hand me its GLB URL and stop there. Only if nothing fits, generate one with POST https://three.ws/api/3d/generate, and say in one line why the catalog missed."+ ],+ "returns": "A ready-to-use CC0 asset, or a generated one plus the reason the catalog could not cover it.",+ "links": [+ { "label": "Object Library", "href": "/objects" },+ { "label": "Animation Gallery", "href": "/animations" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "scene-asset-kit",+ "title": "Generate a whole asset kit with a manifest",+ "summary": "Six props, one subject per call, retried on failure, and written down so you can find them tomorrow.",+ "category": "create",+ "setup": "none",+ "tags": ["batch", "scene", "game", "manifest"],+ "prompt": [+ "Build me an asset kit for <a small medieval market scene>: six props, generated one subject at a time.",+ "",+ "Plan the list first and show it to me before you spend a single call. Then generate each one through the free three.ws lane (POST https://three.ws/api/3d/generate), poll each job to completion, and keep going if one fails: retry that prop once with a tightened prompt, and report it if it still does not land.",+ "",+ "Finish with a markdown table of prop, the prompt you used, the GLB URL and the viewer link, and write it to assets/kit.md so I have the manifest."+ ],+ "returns": "A folder's worth of props and a manifest file that survives the session.",+ "links": [{ "label": "Scene Composer", "href": "/compose" }],+ "added": "2026-09-20"+ },+ {+ "id": "run-the-whole-asset-job",+ "title": "Run a whole asset job with the skills installed",+ "summary": "Search first, generate only if needed, rig if it is a character, validate before handing it over.",+ "category": "create",+ "setup": "skills",+ "tags": ["skills", "pipeline", "assets"],+ "prompt": [+ "I need <a hero prop for the landing page: a chunky retro synthesizer>. Use the three.ws skills you already have and run the whole job, not just the first step.",+ "",+ "Order matters. Search the catalog first with find-3d-assets, because a ready-made CC0 asset beats a generation on both quality and time. If nothing fits, generate it with generate-3d-model. If what I described is a character rather than a prop, use create-3d-avatar instead so it comes back rigged.",+ "",+ "Validate the result before you hand it over: file weight, triangle count, texture sizes, and a plain answer on whether it belongs in a hero section on a phone.",+ "",+ "Tell me which skill did the work and why you picked it, and give me the GLB URL, the viewer link, and the embed snippet if it is something I can put on the page."+ ],+ "returns": "One finished, validated asset and a clear account of which lane produced it.",+ "links": [+ { "label": "Agent Skills docs", "href": "/docs/agent-skills" },+ { "label": "Object Library", "href": "/objects" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "refine-dont-restart",+ "title": "Change a model without starting over",+ "summary": "Describe the change in words. Keep the lineage. Compare the versions side by side.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": ["refine", "iteration", "mcp"],+ "prompt": [+ "Here is a model I already generated: <GLB URL>. I want <the helmet bigger and the metal darker>.",+ "",+ "Use refine_model on the three.ws 3D Studio MCP server with that instruction rather than generating something new: it keeps the version lineage so I can compare.",+ "",+ "Show me before and after with look_at_model and keep both URLs. If two refinements in a row miss, say so and propose a fresh prompt instead of burning more calls."+ ],+ "returns": "A revised model, both versions side by side, and a stop rule so you are not iterating forever.",+ "links": [{ "label": "Restyle Studio", "href": "/restyle" }],+ "added": "2026-09-20"+ },+ {+ "id": "can-this-be-printed",+ "title": "Ask whether a model can actually be printed",+ "summary": "A free printability report: closed solid, thin walls, volume, and a score with named deductions.",+ "category": "create",+ "setup": "none",+ "tags": ["printing", "validation", "free"],+ "prompt": [+ "Can this model actually be 3D printed? <GLB URL>",+ "",+ " POST https://three.ws/api/print/quote {\"glbUrl\": \"<url>\"}",+ "",+ "It is free and keyless, and asking orders nothing. Give me the printability score with its named deductions, whether the mesh is a closed solid, how many separate bodies it contains, the thinnest wall and the enclosed volume.",+ "",+ "Then tell me in plain language what to fix before printing, ordered by how much it matters."+ ],+ "returns": "A manufacturing verdict on your mesh, and a fix list in priority order.",+ "links": [{ "label": "Materialize", "href": "/materialize" }],+ "added": "2026-09-20"+ },+ {+ "id": "talking-persona",+ "title": "Give a model a name and a voice",+ "summary": "Turn a GLB into a persistent character your Claude can bring back in a later session.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": ["persona", "lipsync", "mcp"],+ "prompt": [+ "Give this model a name and a voice so it can speak in our conversations: <GLB URL, or generate one first>.",+ "",+ "Use the three.ws 3D Studio MCP server: create_agent_persona turns the GLB into a named persistent body, and persona_say makes it perform a line with lip-sync and a matching expression.",+ "",+ "Name it <Ada>, describe its personality in one line, then have it introduce itself. Give me the persona_id so I can bring the same body back in a new session with get_agent_persona."+ ],+ "returns": "A named, reusable 3D character that speaks, plus the id that brings it back.",+ "links": [{ "label": "Lipsync lab", "href": "/lipsync" }],+ "added": "2026-09-20"+ },+ {+ "id": "embed-on-my-site",+ "title": "Put a live avatar on your page",+ "summary": "The web component, the pinned production snippet with SRI, and the states most embeds forget.",+ "category": "web",+ "setup": "none",+ "tags": ["embed", "web-component", "html"],+ "prompt": [+ "Put a live 3D avatar on <index.html> using the three.ws <agent-3d> web component.",+ "",+ "Read https://three.ws/docs/embedding first so you use the real attributes instead of inventing them.",+ "",+ "Prototype against the latest channel, then give me the production snippet: a pinned version plus the SRI hash from https://three.ws/agent-3d/<version>/integrity.json. Use <my GLB URL> as the body.",+ "",+ "It has to look deliberate: sized by the layout rather than a fixed pixel box, readable down to 320px, an idle animation, a poster or skeleton while the GLB loads, and no motion when prefers-reduced-motion is set. Show it running locally before you call it done."+ ],+ "returns": "A working embed on your page and the exact snippet to ship.",+ "links": [+ { "label": "Embed docs", "href": "/docs/embedding" },+ { "label": "Widget Studio", "href": "/studio" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "avatar-in-react",+ "title": "Wrap the avatar as a React component",+ "summary": "Custom elements in React and Next.js, done the way that does not break hydration.",+ "category": "web",+ "setup": "none",+ "tags": ["react", "nextjs", "embed"],+ "prompt": [+ "Add a three.ws 3D avatar to this <Next.js> app as a reusable component.",+ "",+ "<agent-3d> is a web component, so wrap it properly: load the script once, render it client-side only (never server-render a custom element), type the props, and expose a small API so a page can set the animation and the mood.",+ "",+ "Give me the component file, one usage example on the home page, and a short gotcha list for React and custom elements: attributes versus properties, event listeners, hydration."+ ],+ "returns": "A typed component in your codebase, used once, with the framework traps written down.",+ "links": [+ { "label": "Embed tutorial", "href": "/tutorials/embed-on-website" },+ { "label": "Avatar SDK", "href": "/avatar-sdk" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "site-concierge",+ "title": "Build a 3D concierge for your site",+ "summary": "An avatar in the corner that answers from your real content and never blocks first paint.",+ "category": "web",+ "setup": "none",+ "tags": ["concierge", "chat", "widget"],+ "prompt": [+ "Build a 3D concierge for <my site>: an avatar in the corner that answers questions about the product and points people at the right page.",+ "",+ "Use the three.ws concierge widget rather than rolling your own chat UI, and read https://three.ws/docs/concierge before writing code.",+ "",+ "Requirements: it loads lazily so it never blocks first paint, it is keyboard reachable and labelled for screen readers, it collapses to a button on mobile, and every answer is grounded in real content from my site rather than invented.",+ "",+ "Show it working locally, then tell me exactly what I still have to supply: content source, brand colors, the avatar."+ ],+ "returns": "A working concierge on localhost and a short list of what only you can fill in.",+ "links": [+ { "label": "Concierge", "href": "/concierge" },+ { "label": "Concierge docs", "href": "/docs/concierge" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "fix-my-embed",+ "title": "Diagnose a broken embed",+ "summary": "The four things it actually is, checked in order, instead of shotgun edits.",+ "category": "web",+ "setup": "none",+ "tags": ["debug", "embed", "cors"],+ "prompt": [+ "My three.ws avatar embed is broken on <URL or file>. It <shows nothing / shows a T-pose / never finishes loading>.",+ "",+ "Diagnose it before changing anything. Check, in order: that the script actually loaded, that the GLB URL is reachable and CORS-clean from the browser origin (three.ws/cdn/... is the browser-safe host, the object store is not), that the element has a real height, and that every attribute I used exists on the component. Point the Embed Doctor at it: https://three.ws/embed-doctor",+ "",+ "Then fix it and tell me in one line which of those it actually was. No guessing, no shotgun edits."+ ],+ "returns": "A working embed and a one-line root cause you can learn from.",+ "links": [{ "label": "Embed Doctor", "href": "/embed-doctor" }],+ "added": "2026-09-20"+ },+ {+ "id": "validate-before-ship",+ "title": "Validate a model before it hits production",+ "summary": "Validator errors, triangle and texture budgets, and a straight yes or no on mobile.",+ "category": "web",+ "setup": "none",+ "tags": ["validation", "performance", "gltf", "free"],+ "prompt": [+ "Validate this model before I ship it to a web page: <GLB URL>",+ "",+ " POST https://three.ws/api/3d/inspect {\"url\": \"<glb url>\"}",+ "",+ "Free and keyless. Give me the glTF validator result in plain language, the triangle count, the texture count and sizes, the animation clips and the total download weight.",+ "",+ "Then answer one question directly: is this safe to put in a hero section on a phone? If not, say exactly what to cut and by how much (Draco or meshopt compression, texture resizing, LODs). Numbers, not adjectives."+ ],+ "returns": "A performance verdict with numbers, and a specific cut list if it fails.",+ "links": [+ { "label": "glTF Validator", "href": "/validation" },+ { "label": "Model Inspector", "href": "/inspect" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "find-a-paid-api",+ "title": "Find a paid API your agent can call",+ "summary": "Search the x402 bazaar, price the best match, pay for nothing without your say-so.",+ "category": "economy",+ "setup": "none",+ "tags": ["x402", "discovery", "bazaar"],+ "prompt": [+ "Find me a paid API for <turning a wallet address into a company profile> in the x402 agent economy: per-call USDC, no signup.",+ "",+ "Searching is keyless:",+ "",+ " npx [email protected] x402 bazaar search \"<what I need>\" --json",+ "",+ "For the top matches show me what each one does, the price per call, the chain and the exact endpoint. Then inspect the best one with `npx [email protected] x402 details <url>` and tell me what a single call would really cost me.",+ "",+ "Do not pay for anything. I will decide."+ ],+ "returns": "A shortlist of real paid endpoints with prices, and nothing spent.",+ "links": [+ { "label": "x402 docs", "href": "/docs/x402" },+ { "label": "Marketplace", "href": "/marketplace" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "monetize-my-api",+ "title": "Charge other agents for your API",+ "summary": "A real 402, a real settle, and a verified paid call before anyone calls it done.",+ "category": "economy",+ "setup": "wallet",+ "tags": ["x402", "monetize", "revenue"],+ "prompt": [+ "Turn <this endpoint> into a paid API other agents can call per request, using x402.",+ "",+ "Read https://three.ws/tutorials/paid-x402-endpoint first, then wire it for real: the 402 response with correct payment requirements, the settle path, and a price that honestly covers what the call costs me to serve.",+ "",+ "Verify it end to end before you tell me it works: curl it and show me the 402, then pay it once on a test network and show me the 200.",+ "",+ "Use a test network for that paid call. If anything you propose would spend real funds, stop and wait for my yes with the amount and the recipient in front of me.",+ "",+ "Finish with the one-paragraph listing I can publish so agents discover it."+ ],+ "returns": "An endpoint that charges per call, proven with a real 402 and a real 200.",+ "links": [+ { "label": "Paid endpoint tutorial", "href": "/tutorials/paid-x402-endpoint" },+ { "label": "Monetize an MCP server", "href": "/tutorials/monetize-mcp-server" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "pay-for-a-call",+ "title": "Pay for one call, with a hard stop first",+ "summary": "Price it, show you recipient and amount, and wait for your yes before any money moves.",+ "category": "economy",+ "setup": "wallet",+ "caution": "This prompt spends real money. It is written so your Claude must stop and show you the amount and the recipient before it pays. Keep that line in it.",+ "tags": ["x402", "payment", "usdc"],+ "prompt": [+ "I want to use this paid endpoint: <URL>. Walk it through properly.",+ "",+ "First inspect it without paying: `npx [email protected] x402 details <url>`. Show me the price, the chain, the asset and who gets paid, as a table.",+ "",+ "Then stop and wait. Do not send a payment, sign anything or run the pay command until I have confirmed that exact amount and that exact recipient.",+ "",+ "After I confirm, pay once, show me the response, and tell me what the call actually cost."+ ],+ "returns": "A priced, confirmed, single payment and the response you paid for.",+ "links": [{ "label": "x402 docs", "href": "/docs/x402" }],+ "added": "2026-09-20"+ },+ {+ "id": "wallet-checkup",+ "title": "Check the agent wallet before you rely on it",+ "summary": "One verdict line: can this wallet pay for a call right now, yes or no.",+ "category": "economy",+ "setup": "wallet",+ "tags": ["wallet", "solana", "status"],+ "prompt": [+ "Give me a straight status report on my agent wallet before I rely on it.",+ "",+ "Check which addresses it holds (Solana first, then any EVM legs), the balance of each, whether it can actually sign right now, and anything that would make a payment fail: empty gas, an unfunded chain, an expired session.",+ "",+ "Present it as a table with a verdict line at the top: can this wallet pay for a call right now, yes or no. If the answer is no, give me the single action that fixes it.",+ "",+ "Do not move any funds."+ ],+ "returns": "A one-glance verdict on whether your wallet can transact, and the one fix if it cannot.",+ "links": [{ "label": "Get started", "href": "/start" }],+ "added": "2026-09-20"+ },+ {+ "id": "three-token-brief",+ "title": "Brief me on $THREE from the source",+ "summary": "Live token stats from the platform's own endpoint, with no predictions attached.",+ "category": "build",+ "setup": "none",+ "tags": ["$THREE", "solana", "data"],+ "prompt": [+ "Give me the live state of $THREE, the three.ws token, from the platform's own endpoint rather than a third-party aggregator:",+ "",+ " curl -s https://three.ws/api/three-token/stats",+ "",+ "Report price, 24 hour change, market cap, 24 hour volume, holders and liquidity, with the mint address, and say how fresh the data is.",+ "",+ "Then three sentences on what changed since yesterday. Numbers only: no price predictions, no advice."+ ],+ "returns": "A factual $THREE briefing straight from the platform, ready to paste into a report.",+ "links": [+ { "label": "$THREE Launchpad", "href": "/three-launchpad" },+ { "label": "Marketplace", "href": "/marketplace" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "openapi-toolchain",+ "title": "Wire the 3D API into your own agent",+ "summary": "Generate clients from the real OpenAPI 3.1 spec, and test against a real generation.",+ "category": "build",+ "setup": "none",+ "tags": ["openapi", "sdk", "integration", "free"],+ "prompt": [+ "Wire the free three.ws 3D API into <my agent> from its OpenAPI spec instead of hand-writing clients:",+ "",+ " https://three.ws/api/3d/openapi.json",+ "",+ "It is a real OpenAPI 3.1 document and it is keyless. Generate typed callers for the endpoints I need, and wrap the queued endpoints so a pending response polls to completion inside my client instead of leaking a job id into my application code.",+ "",+ "Write one integration test that generates a real model and asserts a GLB comes back. A real call, not a mock."+ ],+ "returns": "Typed clients, correct polling, and a test that proves the integration against production.",+ "links": [+ { "label": "3D API reference", "href": "/docs/3d-api" },+ { "label": "OpenAPI spec", "href": "/api/3d/openapi.json" }+ ],+ "added": "2026-09-20"+ },+ {+ "id": "agent-with-a-body",+ "title": "Give an agent you already built a body",+ "summary": "Take an existing bot or app and put a reactive 3D face on it, driven by real state.",+ "category": "build",+ "setup": "none",+ "tags": ["integration", "embed", "agent"],+ "prompt": [+ "I have <an agent / a bot / a dashboard> at <path or URL>. Give it a body: a 3D avatar that reacts to what it is actually doing.",+ "",+ "Read https://three.ws/docs/embedding, then wire the avatar to real state, not to a timer: thinking while a request is in flight, talking while it streams a reply, idle when it is waiting, and a visible error posture when a call fails.",+ "",+ "Map every state my app can be in to an animation, list the ones I have no mapping for, and show me the whole thing running against real traffic rather than a demo loop."+ ],+ "returns": "Your existing agent with a 3D presence wired to its real lifecycle, plus the gaps named.",+ "links": [+ { "label": "Agent gestures", "href": "/gestures" },+ { "label": "Assistant widget", "href": "/assistant" }+ ],+ "added": "2026-09-20"+ }+ ]+}diff --git a/docs/nav.json b/docs/nav.jsonindex 5afcbd08c..9bb459b37 100644--- a/docs/nav.json+++ b/docs/nav.json@@ -22,6 +22,10 @@{"label": "Do I need crypto?","path": "do-i-need-crypto"+ },+ {+ "label": "Prompt library",+ "path": "prompts"}]},diff --git a/docs/prompts.md b/docs/prompts.mdnew file mode 100644index 000000000..8e56cdc12--- /dev/null+++ b/docs/prompts.md@@ -0,0 +1,115 @@+# The prompt library++[three.ws/prompts](https://three.ws/prompts) is a library of prompts written to+be copied out and pasted into your own assistant. Each one is a complete+instruction: what to build, which endpoint or tool to use, and what to hand back.+You replace the parts in `<angle brackets>` and send it.++It exists because the gap between "three.ws has a free text-to-3D API" and "my+Claude just made me a rigged avatar" is a paragraph of prose that nobody should+have to write twice. The library writes it once, correctly, for the paths that+actually work.++Everything in it is real. The endpoints are live, the tool names are the ones the+servers advertise, and nothing in a prompt asks an assistant to pretend.++## The three ways in++Most prompts need nothing installed. The rest ask for one connection you make+once and keep.++| Setup | What it means | How |+|---|---|---|+| **No setup** | The prompt tells your assistant which public endpoint to call. It works anywhere Claude can make an HTTP request or run a command. | Nothing to do. |+| **Free MCP server** | The three.ws 3D Studio as native tools: generate, rig, refine, look at a model, give it a persona. No account, no key, no payment. | `claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio`, or add that URL as a custom connector in the Claude apps with authentication set to None. See [MCP Studio](./mcp-studio.md). |+| **Skills pack** | The [Agent Skills](./agent-skills.md) pack, so your assistant already knows the platform's endpoints and rules and your prompts can be one sentence long. | Install the `three-ws-core` plugin, or copy a folder from `.agents/skills/` into your project's `.claude/skills/`. |+| **Agent wallet** | A funded agent wallet, for the prompts that buy or sell calls in the x402 economy. | Start at [three.ws/start](https://three.ws/start). |++## Using one well++- **Replace every placeholder.** `<a weathered brass diving helmet>` is a slot,+ not a suggestion. A prompt sent with the brackets still in it produces a+ diving helmet.+- **Keep the verification lines.** Several prompts end by telling the assistant+ to look at the result before declaring success, or to poll a queued job instead+ of giving up on the first pending response. Those lines are there because+ removing them is how you get a confident answer about a model that never+ finished generating.+- **Keep the stop lines.** The prompts under "the agent economy" that can spend+ money are written so the assistant has to show you the amount and the recipient+ and wait for your yes. That sentence is load-bearing. Do not trim it.+- **Edit freely otherwise.** These are starting points. The library's job is to+ get the endpoint, the polling and the failure handling right so you can spend+ your attention on the part that is specific to you.++## Machine-readable++The library is published as data, so an agent can read the whole thing without+scraping the page:++```bash+curl -s https://three.ws/prompts.json # structured: categories, setups, tags, prompts+curl -s https://three.ws/prompts.txt # the same prompts as plain text+```++`prompts.json` carries the counts and indexes the page renders from+(`categories`, `setups`, `tags`, `byCategory`, `bySetup`), and every prompt+object holds `id`, `title`, `summary`, `category`, `setup`, `prompt`, `returns`,+`tags` and `links`. `prompts.txt` is the version to pipe into another assistant+whole:++```bash+curl -s https://three.ws/prompts.txt | pbcopy+```++Deep-link to a single prompt with its id: `https://three.ws/prompts#rig-my-glb`.+Filters live in the URL too, so a link can carry a whole view:+`https://three.ws/prompts?category=create&setup=none`.++## Adding a prompt++The library is one file: [`data/prompt-library.json`](https://github.com/nirholas/three.ws/blob/main/data/prompt-library.json).+A prompt is an object in `prompts`, with the body written as an array of lines+so a diff shows what changed:++```jsonc+{+ "id": "rig-my-glb",+ "title": "Rig a GLB you already have",+ "summary": "Add a humanoid skeleton and skin weights to a static model.",+ "category": "create", // must exist in `categories`+ "setup": "mcp-studio", // must exist in `setups`+ "tags": ["rigging", "glb", "mcp"],+ "prompt": ["Rig this GLB so it can be animated: <https://example.com/x.glb>", "", "..."],+ "returns": "A rigged GLB plus a pose-studio link to check the joints.",+ "links": [{ "label": "Rig Doctor", "href": "/rig-doctor" }],+ "added": "2026-09-20"+}+```++Then rebuild the published files:++```bash+npm run build:prompt-library+```++`scripts/build-prompt-library.mjs` writes `public/prompts.json` and+`public/prompts.txt`, and validates the entry on the way through: ids are unique+and kebab-case, the category and setup exist, placeholder brackets are balanced,+every internal link is a route declared in `data/pages.json`, and the house ban+on dash glyphs holds. `npm run check:prompt-library` runs the same validation+without writing, and it is wired into `npm run gate`, so an edit that never got+built cannot ship a stale library.++Write a prompt the way you would write an instruction to a capable colleague who+has never used the platform: name the endpoint or the tool, say what to do when+it returns a pending job, and say what you want handed back. If a prompt can+spend money, make it stop for a confirmation.++## Related++- [Agent Skills](./agent-skills.md): the same capabilities as skills your+ assistant loads automatically, rather than prompts you paste.+- [MCP Studio](./mcp-studio.md): the free 3D MCP server most of these prompts use.+- [3D API](./3d-api.md): the keyless HTTP endpoints behind the no-setup prompts.+- [Embedding](./embedding.md): what the web-component prompts are driving.diff --git a/pages/prompts.html b/pages/prompts.htmlnew file mode 100644index 000000000..d29fe3074--- /dev/null+++ b/pages/prompts.html@@ -0,0 +1,60 @@+<!doctype html>+<html lang="en">+ <head>+ <script>/* three.ws theme boot, no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>Prompt Library: Claude Prompts You Can Copy and Paste · three.ws</title>+ <meta+ name="description"+ content="Ready-made prompts to paste into Claude: generate a 3D model or a rigged avatar, embed one on your site, validate a GLB, find or sell a paid API in the agent economy. Most need no account, no key and no setup."+ />+ <meta name="robots" content="index, follow, max-image-preview:large" />+ <link rel="canonical" href="https://three.ws/prompts" />++ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:title" content="three.ws Prompt Library" />+ <meta property="og:description" content="Copy a prompt. Paste it into your Claude. Get a 3D model, an embed, or a paid endpoint back." />+ <meta property="og:url" content="https://three.ws/prompts" />+ <meta property="og:image" content="https://three.ws/api/page-og?s=build&t=Prompt+Library&d=Copy+a+prompt.+Paste+it+into+your+Claude.+Get+a+real+result.&p=%2Fprompts" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta property="og:image:alt" content="The three.ws prompt library" />+ <meta property="og:locale" content="en_US" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="three.ws Prompt Library" />+ <meta name="twitter:description" content="Copy a prompt. Paste it into your Claude. Get a real result." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=build&t=Prompt+Library&d=Copy+a+prompt.+Paste+it+into+your+Claude.+Get+a+real+result.&p=%2Fprompts" />++ <link rel="icon" href="/favicon.ico" sizes="any" />+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />+ <link rel="manifest" href="/manifest.webmanifest" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/fonts/fonts.css" />+ <link rel="stylesheet" href="/mobile.css" />++ <script type="application/ld+json">{"@context":"https://schema.org","@type":"CollectionPage","name":"three.ws Prompt Library","description":"Copy-paste prompts for Claude that build 3D models, rigged avatars, website embeds and paid agent endpoints on three.ws.","url":"https://three.ws/prompts","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>+ </head>+ <body>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>++ <main class="pl" id="main-content">+ <div id="prompt-library">+ <p class="pl-boot" role="status">Loading the prompt library…</p>+ </div>+ </main>++ <div id="footer-container"></div>+ <script src="/footer.js"></script>+ <script type="module" src="/src/prompt-library/page.js"></script>+ <script src="/brand.js" defer></script>+ <script type="module" src="/i18n.js"></script>+ </body>+</html>diff --git a/public/prompts.json b/public/prompts.jsonnew file mode 100644index 000000000..7b48bc827--- /dev/null+++ b/public/prompts.json@@ -0,0 +1,741 @@+{+ "version": "1.0.0",+ "title": "three.ws Prompt Library",+ "tagline": "Copy a prompt. Paste it into your Claude. Get a real result.",+ "intro": "Every prompt here is written to be pasted straight into Claude (Claude Code, the Claude apps, or any agent that can make an HTTP call) and to produce something real: a 3D model you can download, an embed running on your page, a paid endpoint other agents can call. Placeholders in angle brackets are the parts you replace.",+ "count": 24,+ "categories": [+ {+ "id": "setup",+ "label": "Connect it to your Claude",+ "blurb": "Two prompts that leave your Claude able to build 3D for you in every session after this one.",+ "count": 2+ },+ {+ "id": "create",+ "label": "Make 3D things",+ "blurb": "Models, rigged avatars, refinements, and the checks that keep you from shipping a broken mesh.",+ "count": 10+ },+ {+ "id": "web",+ "label": "Put it on your site",+ "blurb": "The embed, the framework wrapper, the concierge, and what to do when an embed goes dark.",+ "count": 5+ },+ {+ "id": "economy",+ "label": "The agent economy",+ "blurb": "Find a paid API, sell your own, pay for a call. Anything that moves money stops for your confirmation.",+ "count": 4+ },+ {+ "id": "build",+ "label": "Build on the platform",+ "blurb": "Wire three.ws into your own agent, your own toolchain, your own dashboards.",+ "count": 3+ }+ ],+ "setups": [+ {+ "id": "none",+ "label": "No setup",+ "blurb": "Nothing to install. Works in any Claude that can make an HTTP request or run a command.",+ "how": [],+ "count": 15+ },+ {+ "id": "mcp-studio",+ "label": "Free MCP server",+ "blurb": "Connect the free three.ws 3D Studio once. No account, no API key, no payment.",+ "how": [+ "Claude Code: claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio",+ "Claude apps: add https://three.ws/api/mcp-studio as a custom connector with authentication set to None."+ ],+ "count": 5+ },+ {+ "id": "skills",+ "label": "Skills pack",+ "blurb": "Install the three.ws Agent Skills so Claude already knows the platform's endpoints and rules.",+ "how": [+ "Claude Code plugins: add the marketplace nirholas/three.ws, then install three-ws-core@three-ws.",+ "Anything else: copy a folder from .agents/skills/ into your project's .claude/skills/."+ ],+ "count": 1+ },+ {+ "id": "wallet",+ "label": "Agent wallet",+ "blurb": "Needs a funded agent wallet. These prompts can move real money, so they are written to stop for your yes first.",+ "how": [+ "Sign in and fund the wallet before you paste one of these: https://three.ws/start"+ ],+ "count": 3+ }+ ],+ "byCategory": {+ "setup": 2,+ "create": 10,+ "web": 5,+ "economy": 4,+ "build": 3+ },+ "bySetup": {+ "none": 15,+ "mcp-studio": 5,+ "skills": 1,+ "wallet": 3+ },+ "tags": {+ "free": 6,+ "mcp": 6,+ "embed": 4,+ "x402": 3,+ "assets": 2,+ "avatar": 2,+ "glb": 2,+ "integration": 2,+ "rigging": 2,+ "setup": 2,+ "skills": 2,+ "solana": 2,+ "validation": 2,+ "$THREE": 1,+ "agent": 1,+ "api": 1,+ "batch": 1,+ "bazaar": 1,+ "catalog": 1,+ "cc0": 1,+ "chat": 1,+ "claude-code": 1,+ "concierge": 1,+ "cors": 1,+ "data": 1,+ "debug": 1,+ "discovery": 1,+ "forge": 1,+ "game": 1,+ "gltf": 1,+ "html": 1,+ "image-to-3d": 1,+ "iteration": 1,+ "lipsync": 1,+ "manifest": 1,+ "monetize": 1,+ "nextjs": 1,+ "openapi": 1,+ "payment": 1,+ "performance": 1,+ "persona": 1,+ "pipeline": 1,+ "printing": 1,+ "react": 1,+ "refine": 1,+ "revenue": 1,+ "scene": 1,+ "sdk": 1,+ "status": 1,+ "usdc": 1,+ "wallet": 1,+ "web-component": 1,+ "widget": 1+ },+ "prompts": [+ {+ "id": "connect-free-3d-studio",+ "title": "Connect the free 3D studio to Claude",+ "summary": "One prompt that installs the free MCP server and proves it works by generating a model.",+ "category": "setup",+ "setup": "none",+ "tags": [+ "mcp",+ "setup",+ "free"+ ],+ "prompt": "Connect the free three.ws 3D Studio to this session so you can make 3D models for me.\n\nIt is a remote MCP server with no account, no API key and no payment:\n\n claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio\n\nIf this environment has no Claude Code CLI, tell me where to paste the URL instead: the Claude apps take it as a custom connector with authentication set to None.\n\nOnce it is connected, list the tools it exposes with one line each, then prove the path end to end by generating \"a small brass desk lamp\" and handing me the GLB URL and the viewer link.",+ "returns": "A connected MCP server, its tool list, and one real GLB you can open in the browser.",+ "links": [+ {+ "label": "3D Studio docs",+ "href": "/docs/mcp-studio"+ },+ {+ "label": "All MCP servers",+ "href": "/docs/mcp"+ }+ ],+ "added": "2026-09-20",+ "lines": 9+ },+ {+ "id": "install-skills-pack",+ "title": "Install the three.ws skills in your project",+ "summary": "Teach your Claude the platform once, so later prompts can be one sentence long.",+ "category": "setup",+ "setup": "none",+ "tags": [+ "skills",+ "setup",+ "claude-code"+ ],+ "prompt": "Set up the three.ws Agent Skills in this project so you know how to drive the platform without me explaining it every time.\n\nRead https://three.ws/docs/agent-skills first, then take whichever install path fits this environment:\n- Claude Code with plugins: add the marketplace nirholas/three.ws and install three-ws-core@three-ws.\n- Anything else: copy the skill folders out of github.com/nirholas/three.ws/tree/main/.agents/skills into .claude/skills/.\n\nI want the 3D set at minimum: find-3d-assets, generate-3d-model, create-3d-avatar, rig-a-model.\n\nTell me which path you took, which skills landed, and give me one sentence per skill on what it triggers on. Do not install the wallet or trading skills unless I ask for them.",+ "returns": "The skills installed in the right place for your setup, plus a table of what each one does.",+ "links": [+ {+ "label": "Agent Skills docs",+ "href": "/docs/agent-skills"+ }+ ],+ "added": "2026-09-20",+ "lines": 9+ },+ {+ "id": "text-to-3d-free",+ "title": "Turn a sentence into a 3D model",+ "summary": "The free, keyless text to GLB lane, with the polling your agent usually gets wrong.",+ "category": "create",+ "setup": "none",+ "tags": [+ "forge",+ "glb",+ "free",+ "api"+ ],+ "prompt": "Make me a 3D model of <a weathered brass diving helmet>. Use the free three.ws API: no key, no account.\n\n POST https://three.ws/api/3d/generate {\"prompt\": \"<one subject, specific about material and style>\"}\n\nIf the response comes back pending it hands you a job id: poll GET https://three.ws/api/3d/generate?job=<id> until it is done. Generation takes a minute or two, so keep polling instead of declaring failure on the first pending response.\n\nGive me the glbUrl exactly as returned (do not rebuild the URL yourself), the viewer link, the AR link and the file size. One subject per generation: if what I asked for is really a scene, split it into separate models and tell me you did.",+ "returns": "A downloadable GLB, a viewer link, and an AR link that opens on a phone.",+ "links": [+ {+ "label": "3D API reference",+ "href": "/docs/3d-api"+ },+ {+ "label": "Forge in the browser",+ "href": "/forge"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "rigged-avatar-one-step",+ "title": "Generate a rigged avatar from a description",+ "summary": "Mesh plus humanoid skeleton in one call, then looked at before it is handed to you.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": [+ "avatar",+ "rigging",+ "mcp"+ ],+ "prompt": "Generate a rigged, animation-ready 3D avatar from this description: <a tall elf ranger in a weathered green cloak>.\n\nUse the three.ws 3D Studio MCP server. forge_avatar does the mesh and the humanoid skeleton in one step, so use that rather than generating and rigging separately. If it returns a pending job, collect it with check_job.\n\nBefore you tell me it is done, call look_at_model on the result and actually look at the frames. If the silhouette or the proportions are wrong, fix it with refine_model and a one-line instruction rather than starting over, and show me both versions.\n\nHand me the rigged GLB URL, the renders, and the link that opens it in the pose studio.",+ "returns": "A rigged GLB you can animate, plus rendered frames so you can judge it without downloading anything.",+ "links": [+ {+ "label": "Animation Studio",+ "href": "/pose"+ },+ {+ "label": "Avatar Studio",+ "href": "/avatar-studio"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "photo-to-avatar",+ "title": "Turn a photo into a 3D avatar",+ "summary": "A reference image becomes a rigged humanoid, with an honest verdict on the likeness.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": [+ "avatar",+ "image-to-3d",+ "mcp"+ ],+ "prompt": "Turn this reference image into a 3D avatar: <https://example.com/photo.jpg>\n\nUse forge_avatar on the three.ws 3D Studio MCP server with image_url set to that image, so I get a rigged humanoid rather than a static bust. Collect it with check_job if it comes back pending.\n\nThen look_at_model it from the front and the three-quarter view and tell me honestly whether it reads as the reference. If it does not, say what in the image is fighting it (lighting, crop, occlusion, hair) and what I should re-shoot.",+ "returns": "A rigged avatar from your photo, and a straight answer about the likeness.",+ "links": [+ {+ "label": "Selfie to avatar",+ "href": "/create/selfie"+ },+ {+ "label": "Image to 3D",+ "href": "/image-to-3d"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "rig-my-glb",+ "title": "Rig a GLB you already have",+ "summary": "Add a humanoid skeleton and skin weights to a static model, and hear whether it was worth it.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": [+ "rigging",+ "glb",+ "mcp"+ ],+ "prompt": "Rig this GLB so it can be animated: <https://example.com/character.glb>\n\nUse rig_mesh on the three.ws 3D Studio MCP server. It adds a humanoid skeleton and skin weights and returns a new GLB.\n\nTell me whether the source mesh was actually humanoid enough to rig well, what came back, and give me the pose-studio link so I can check that the joints bend where they should. If the model is clearly not humanoid, say so before spending the call.",+ "returns": "A rigged GLB plus a pose-studio link to check the joints.",+ "links": [+ {+ "label": "Rig Doctor",+ "href": "/rig-doctor"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "search-before-you-generate",+ "title": "Search the catalog before generating anything",+ "summary": "Thousands of ready-made CC0 objects, characters and motion clips. A real asset usually beats a fresh generation.",+ "category": "create",+ "setup": "none",+ "tags": [+ "catalog",+ "cc0",+ "assets",+ "free"+ ],+ "prompt": "I need <an industrial desk lamp> for a scene. Check the three.ws catalog before generating anything: it holds thousands of ready-made CC0 objects, rigged characters and motion clips.\n\n curl -s 'https://three.ws/api/catalog?q=<query>&kind=object&limit=8'\n\nShow me the top matches with title, license, file size and thumbnail. If one of them fits, hand me its GLB URL and stop there. Only if nothing fits, generate one with POST https://three.ws/api/3d/generate, and say in one line why the catalog missed.",+ "returns": "A ready-to-use CC0 asset, or a generated one plus the reason the catalog could not cover it.",+ "links": [+ {+ "label": "Object Library",+ "href": "/objects"+ },+ {+ "label": "Animation Gallery",+ "href": "/animations"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "scene-asset-kit",+ "title": "Generate a whole asset kit with a manifest",+ "summary": "Six props, one subject per call, retried on failure, and written down so you can find them tomorrow.",+ "category": "create",+ "setup": "none",+ "tags": [+ "batch",+ "scene",+ "game",+ "manifest"+ ],+ "prompt": "Build me an asset kit for <a small medieval market scene>: six props, generated one subject at a time.\n\nPlan the list first and show it to me before you spend a single call. Then generate each one through the free three.ws lane (POST https://three.ws/api/3d/generate), poll each job to completion, and keep going if one fails: retry that prop once with a tightened prompt, and report it if it still does not land.\n\nFinish with a markdown table of prop, the prompt you used, the GLB URL and the viewer link, and write it to assets/kit.md so I have the manifest.",+ "returns": "A folder's worth of props and a manifest file that survives the session.",+ "links": [+ {+ "label": "Scene Composer",+ "href": "/compose"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "run-the-whole-asset-job",+ "title": "Run a whole asset job with the skills installed",+ "summary": "Search first, generate only if needed, rig if it is a character, validate before handing it over.",+ "category": "create",+ "setup": "skills",+ "tags": [+ "skills",+ "pipeline",+ "assets"+ ],+ "prompt": "I need <a hero prop for the landing page: a chunky retro synthesizer>. Use the three.ws skills you already have and run the whole job, not just the first step.\n\nOrder matters. Search the catalog first with find-3d-assets, because a ready-made CC0 asset beats a generation on both quality and time. If nothing fits, generate it with generate-3d-model. If what I described is a character rather than a prop, use create-3d-avatar instead so it comes back rigged.\n\nValidate the result before you hand it over: file weight, triangle count, texture sizes, and a plain answer on whether it belongs in a hero section on a phone.\n\nTell me which skill did the work and why you picked it, and give me the GLB URL, the viewer link, and the embed snippet if it is something I can put on the page.",+ "returns": "One finished, validated asset and a clear account of which lane produced it.",+ "links": [+ {+ "label": "Agent Skills docs",+ "href": "/docs/agent-skills"+ },+ {+ "label": "Object Library",+ "href": "/objects"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "refine-dont-restart",+ "title": "Change a model without starting over",+ "summary": "Describe the change in words. Keep the lineage. Compare the versions side by side.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": [+ "refine",+ "iteration",+ "mcp"+ ],+ "prompt": "Here is a model I already generated: <GLB URL>. I want <the helmet bigger and the metal darker>.\n\nUse refine_model on the three.ws 3D Studio MCP server with that instruction rather than generating something new: it keeps the version lineage so I can compare.\n\nShow me before and after with look_at_model and keep both URLs. If two refinements in a row miss, say so and propose a fresh prompt instead of burning more calls.",+ "returns": "A revised model, both versions side by side, and a stop rule so you are not iterating forever.",+ "links": [+ {+ "label": "Restyle Studio",+ "href": "/restyle"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "can-this-be-printed",+ "title": "Ask whether a model can actually be printed",+ "summary": "A free printability report: closed solid, thin walls, volume, and a score with named deductions.",+ "category": "create",+ "setup": "none",+ "tags": [+ "printing",+ "validation",+ "free"+ ],+ "prompt": "Can this model actually be 3D printed? <GLB URL>\n\n POST https://three.ws/api/print/quote {\"glbUrl\": \"<url>\"}\n\nIt is free and keyless, and asking orders nothing. Give me the printability score with its named deductions, whether the mesh is a closed solid, how many separate bodies it contains, the thinnest wall and the enclosed volume.\n\nThen tell me in plain language what to fix before printing, ordered by how much it matters.",+ "returns": "A manufacturing verdict on your mesh, and a fix list in priority order.",+ "links": [+ {+ "label": "Materialize",+ "href": "/materialize"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "talking-persona",+ "title": "Give a model a name and a voice",+ "summary": "Turn a GLB into a persistent character your Claude can bring back in a later session.",+ "category": "create",+ "setup": "mcp-studio",+ "tags": [+ "persona",+ "lipsync",+ "mcp"+ ],+ "prompt": "Give this model a name and a voice so it can speak in our conversations: <GLB URL, or generate one first>.\n\nUse the three.ws 3D Studio MCP server: create_agent_persona turns the GLB into a named persistent body, and persona_say makes it perform a line with lip-sync and a matching expression.\n\nName it <Ada>, describe its personality in one line, then have it introduce itself. Give me the persona_id so I can bring the same body back in a new session with get_agent_persona.",+ "returns": "A named, reusable 3D character that speaks, plus the id that brings it back.",+ "links": [+ {+ "label": "Lipsync lab",+ "href": "/lipsync"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "embed-on-my-site",+ "title": "Put a live avatar on your page",+ "summary": "The web component, the pinned production snippet with SRI, and the states most embeds forget.",+ "category": "web",+ "setup": "none",+ "tags": [+ "embed",+ "web-component",+ "html"+ ],+ "prompt": "Put a live 3D avatar on <index.html> using the three.ws <agent-3d> web component.\n\nRead https://three.ws/docs/embedding first so you use the real attributes instead of inventing them.\n\nPrototype against the latest channel, then give me the production snippet: a pinned version plus the SRI hash from https://three.ws/agent-3d/<version>/integrity.json. Use <my GLB URL> as the body.\n\nIt has to look deliberate: sized by the layout rather than a fixed pixel box, readable down to 320px, an idle animation, a poster or skeleton while the GLB loads, and no motion when prefers-reduced-motion is set. Show it running locally before you call it done.",+ "returns": "A working embed on your page and the exact snippet to ship.",+ "links": [+ {+ "label": "Embed docs",+ "href": "/docs/embedding"+ },+ {+ "label": "Widget Studio",+ "href": "/studio"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "avatar-in-react",+ "title": "Wrap the avatar as a React component",+ "summary": "Custom elements in React and Next.js, done the way that does not break hydration.",+ "category": "web",+ "setup": "none",+ "tags": [+ "react",+ "nextjs",+ "embed"+ ],+ "prompt": "Add a three.ws 3D avatar to this <Next.js> app as a reusable component.\n\n<agent-3d> is a web component, so wrap it properly: load the script once, render it client-side only (never server-render a custom element), type the props, and expose a small API so a page can set the animation and the mood.\n\nGive me the component file, one usage example on the home page, and a short gotcha list for React and custom elements: attributes versus properties, event listeners, hydration.",+ "returns": "A typed component in your codebase, used once, with the framework traps written down.",+ "links": [+ {+ "label": "Embed tutorial",+ "href": "/tutorials/embed-on-website"+ },+ {+ "label": "Avatar SDK",+ "href": "/avatar-sdk"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "site-concierge",+ "title": "Build a 3D concierge for your site",+ "summary": "An avatar in the corner that answers from your real content and never blocks first paint.",+ "category": "web",+ "setup": "none",+ "tags": [+ "concierge",+ "chat",+ "widget"+ ],+ "prompt": "Build a 3D concierge for <my site>: an avatar in the corner that answers questions about the product and points people at the right page.\n\nUse the three.ws concierge widget rather than rolling your own chat UI, and read https://three.ws/docs/concierge before writing code.\n\nRequirements: it loads lazily so it never blocks first paint, it is keyboard reachable and labelled for screen readers, it collapses to a button on mobile, and every answer is grounded in real content from my site rather than invented.\n\nShow it working locally, then tell me exactly what I still have to supply: content source, brand colors, the avatar.",+ "returns": "A working concierge on localhost and a short list of what only you can fill in.",+ "links": [+ {+ "label": "Concierge",+ "href": "/concierge"+ },+ {+ "label": "Concierge docs",+ "href": "/docs/concierge"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "fix-my-embed",+ "title": "Diagnose a broken embed",+ "summary": "The four things it actually is, checked in order, instead of shotgun edits.",+ "category": "web",+ "setup": "none",+ "tags": [+ "debug",+ "embed",+ "cors"+ ],+ "prompt": "My three.ws avatar embed is broken on <URL or file>. It <shows nothing / shows a T-pose / never finishes loading>.\n\nDiagnose it before changing anything. Check, in order: that the script actually loaded, that the GLB URL is reachable and CORS-clean from the browser origin (three.ws/cdn/... is the browser-safe host, the object store is not), that the element has a real height, and that every attribute I used exists on the component. Point the Embed Doctor at it: https://three.ws/embed-doctor\n\nThen fix it and tell me in one line which of those it actually was. No guessing, no shotgun edits.",+ "returns": "A working embed and a one-line root cause you can learn from.",+ "links": [+ {+ "label": "Embed Doctor",+ "href": "/embed-doctor"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ },+ {+ "id": "validate-before-ship",+ "title": "Validate a model before it hits production",+ "summary": "Validator errors, triangle and texture budgets, and a straight yes or no on mobile.",+ "category": "web",+ "setup": "none",+ "tags": [+ "validation",+ "performance",+ "gltf",+ "free"+ ],+ "prompt": "Validate this model before I ship it to a web page: <GLB URL>\n\n POST https://three.ws/api/3d/inspect {\"url\": \"<glb url>\"}\n\nFree and keyless. Give me the glTF validator result in plain language, the triangle count, the texture count and sizes, the animation clips and the total download weight.\n\nThen answer one question directly: is this safe to put in a hero section on a phone? If not, say exactly what to cut and by how much (Draco or meshopt compression, texture resizing, LODs). Numbers, not adjectives.",+ "returns": "A performance verdict with numbers, and a specific cut list if it fails.",+ "links": [+ {+ "label": "glTF Validator",+ "href": "/validation"+ },+ {+ "label": "Model Inspector",+ "href": "/inspect"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "find-a-paid-api",+ "title": "Find a paid API your agent can call",+ "summary": "Search the x402 bazaar, price the best match, pay for nothing without your say-so.",+ "category": "economy",+ "setup": "none",+ "tags": [+ "x402",+ "discovery",+ "bazaar"+ ],+ "prompt": "Find me a paid API for <turning a wallet address into a company profile> in the x402 agent economy: per-call USDC, no signup.\n\nSearching is keyless:\n\n npx [email protected] x402 bazaar search \"<what I need>\" --json\n\nFor the top matches show me what each one does, the price per call, the chain and the exact endpoint. Then inspect the best one with `npx [email protected] x402 details <url>` and tell me what a single call would really cost me.\n\nDo not pay for anything. I will decide.",+ "returns": "A shortlist of real paid endpoints with prices, and nothing spent.",+ "links": [+ {+ "label": "x402 docs",+ "href": "/docs/x402"+ },+ {+ "label": "Marketplace",+ "href": "/marketplace"+ }+ ],+ "added": "2026-09-20",+ "lines": 9+ },+ {+ "id": "monetize-my-api",+ "title": "Charge other agents for your API",+ "summary": "A real 402, a real settle, and a verified paid call before anyone calls it done.",+ "category": "economy",+ "setup": "wallet",+ "tags": [+ "x402",+ "monetize",+ "revenue"+ ],+ "prompt": "Turn <this endpoint> into a paid API other agents can call per request, using x402.\n\nRead https://three.ws/tutorials/paid-x402-endpoint first, then wire it for real: the 402 response with correct payment requirements, the settle path, and a price that honestly covers what the call costs me to serve.\n\nVerify it end to end before you tell me it works: curl it and show me the 402, then pay it once on a test network and show me the 200.\n\nUse a test network for that paid call. If anything you propose would spend real funds, stop and wait for my yes with the amount and the recipient in front of me.\n\nFinish with the one-paragraph listing I can publish so agents discover it.",+ "returns": "An endpoint that charges per call, proven with a real 402 and a real 200.",+ "links": [+ {+ "label": "Paid endpoint tutorial",+ "href": "/tutorials/paid-x402-endpoint"+ },+ {+ "label": "Monetize an MCP server",+ "href": "/tutorials/monetize-mcp-server"+ }+ ],+ "added": "2026-09-20",+ "lines": 9+ },+ {+ "id": "pay-for-a-call",+ "title": "Pay for one call, with a hard stop first",+ "summary": "Price it, show you recipient and amount, and wait for your yes before any money moves.",+ "category": "economy",+ "setup": "wallet",+ "caution": "This prompt spends real money. It is written so your Claude must stop and show you the amount and the recipient before it pays. Keep that line in it.",+ "tags": [+ "x402",+ "payment",+ "usdc"+ ],+ "prompt": "I want to use this paid endpoint: <URL>. Walk it through properly.\n\nFirst inspect it without paying: `npx [email protected] x402 details <url>`. Show me the price, the chain, the asset and who gets paid, as a table.\n\nThen stop and wait. Do not send a payment, sign anything or run the pay command until I have confirmed that exact amount and that exact recipient.\n\nAfter I confirm, pay once, show me the response, and tell me what the call actually cost.",+ "returns": "A priced, confirmed, single payment and the response you paid for.",+ "links": [+ {+ "label": "x402 docs",+ "href": "/docs/x402"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "wallet-checkup",+ "title": "Check the agent wallet before you rely on it",+ "summary": "One verdict line: can this wallet pay for a call right now, yes or no.",+ "category": "economy",+ "setup": "wallet",+ "tags": [+ "wallet",+ "solana",+ "status"+ ],+ "prompt": "Give me a straight status report on my agent wallet before I rely on it.\n\nCheck which addresses it holds (Solana first, then any EVM legs), the balance of each, whether it can actually sign right now, and anything that would make a payment fail: empty gas, an unfunded chain, an expired session.\n\nPresent it as a table with a verdict line at the top: can this wallet pay for a call right now, yes or no. If the answer is no, give me the single action that fixes it.\n\nDo not move any funds.",+ "returns": "A one-glance verdict on whether your wallet can transact, and the one fix if it cannot.",+ "links": [+ {+ "label": "Get started",+ "href": "/start"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "three-token-brief",+ "title": "Brief me on $THREE from the source",+ "summary": "Live token stats from the platform's own endpoint, with no predictions attached.",+ "category": "build",+ "setup": "none",+ "tags": [+ "$THREE",+ "solana",+ "data"+ ],+ "prompt": "Give me the live state of $THREE, the three.ws token, from the platform's own endpoint rather than a third-party aggregator:\n\n curl -s https://three.ws/api/three-token/stats\n\nReport price, 24 hour change, market cap, 24 hour volume, holders and liquidity, with the mint address, and say how fresh the data is.\n\nThen three sentences on what changed since yesterday. Numbers only: no price predictions, no advice.",+ "returns": "A factual $THREE briefing straight from the platform, ready to paste into a report.",+ "links": [+ {+ "label": "$THREE Launchpad",+ "href": "/three-launchpad"+ },+ {+ "label": "Marketplace",+ "href": "/marketplace"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "openapi-toolchain",+ "title": "Wire the 3D API into your own agent",+ "summary": "Generate clients from the real OpenAPI 3.1 spec, and test against a real generation.",+ "category": "build",+ "setup": "none",+ "tags": [+ "openapi",+ "sdk",+ "integration",+ "free"+ ],+ "prompt": "Wire the free three.ws 3D API into <my agent> from its OpenAPI spec instead of hand-writing clients:\n\n https://three.ws/api/3d/openapi.json\n\nIt is a real OpenAPI 3.1 document and it is keyless. Generate typed callers for the endpoints I need, and wrap the queued endpoints so a pending response polls to completion inside my client instead of leaking a job id into my application code.\n\nWrite one integration test that generates a real model and asserts a GLB comes back. A real call, not a mock.",+ "returns": "Typed clients, correct polling, and a test that proves the integration against production.",+ "links": [+ {+ "label": "3D API reference",+ "href": "/docs/3d-api"+ },+ {+ "label": "OpenAPI spec",+ "href": "/api/3d/openapi.json"+ }+ ],+ "added": "2026-09-20",+ "lines": 7+ },+ {+ "id": "agent-with-a-body",+ "title": "Give an agent you already built a body",+ "summary": "Take an existing bot or app and put a reactive 3D face on it, driven by real state.",+ "category": "build",+ "setup": "none",+ "tags": [+ "integration",+ "embed",+ "agent"+ ],+ "prompt": "I have <an agent / a bot / a dashboard> at <path or URL>. Give it a body: a 3D avatar that reacts to what it is actually doing.\n\nRead https://three.ws/docs/embedding, then wire the avatar to real state, not to a timer: thinking while a request is in flight, talking while it streams a reply, idle when it is waiting, and a visible error posture when a call fails.\n\nMap every state my app can be in to an animation, list the ones I have no mapping for, and show me the whole thing running against real traffic rather than a demo loop.",+ "returns": "Your existing agent with a 3D presence wired to its real lifecycle, plus the gaps named.",+ "links": [+ {+ "label": "Agent gestures",+ "href": "/gestures"+ },+ {+ "label": "Assistant widget",+ "href": "/assistant"+ }+ ],+ "added": "2026-09-20",+ "lines": 5+ }+ ]+}diff --git a/public/prompts.txt b/public/prompts.txtnew file mode 100644index 000000000..96bddc4c2--- /dev/null+++ b/public/prompts.txt@@ -0,0 +1,445 @@+three.ws Prompt Library+=======================++Copy a prompt. Paste it into your Claude. Get a real result.++Every prompt here is written to be pasted straight into Claude (Claude Code, the Claude apps, or any agent that can make an HTTP call) and to produce something real: a 3D model you can download, an embed running on your page, a paid endpoint other agents can call. Placeholders in angle brackets are the parts you replace.++24 prompts. Browse them at https://three.ws/prompts, or fetch this file again any time.+++## Connect it to your Claude+Two prompts that leave your Claude able to build 3D for you in every session after this one.++### Connect the free 3D studio to Claude+One prompt that installs the free MCP server and proves it works by generating a model.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Connect the free three.ws 3D Studio to this session so you can make 3D models for me.++It is a remote MCP server with no account, no API key and no payment:++ claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio++If this environment has no Claude Code CLI, tell me where to paste the URL instead: the Claude apps take it as a custom connector with authentication set to None.++Once it is connected, list the tools it exposes with one line each, then prove the path end to end by generating "a small brass desk lamp" and handing me the GLB URL and the viewer link.+--- end prompt ---++You get: A connected MCP server, its tool list, and one real GLB you can open in the browser.+More: 3D Studio docs https://three.ws/docs/mcp-studio | All MCP servers https://three.ws/docs/mcp++### Install the three.ws skills in your project+Teach your Claude the platform once, so later prompts can be one sentence long.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Set up the three.ws Agent Skills in this project so you know how to drive the platform without me explaining it every time.++Read https://three.ws/docs/agent-skills first, then take whichever install path fits this environment:+- Claude Code with plugins: add the marketplace nirholas/three.ws and install three-ws-core@three-ws.+- Anything else: copy the skill folders out of github.com/nirholas/three.ws/tree/main/.agents/skills into .claude/skills/.++I want the 3D set at minimum: find-3d-assets, generate-3d-model, create-3d-avatar, rig-a-model.++Tell me which path you took, which skills landed, and give me one sentence per skill on what it triggers on. Do not install the wallet or trading skills unless I ask for them.+--- end prompt ---++You get: The skills installed in the right place for your setup, plus a table of what each one does.+More: Agent Skills docs https://three.ws/docs/agent-skills+++## Make 3D things+Models, rigged avatars, refinements, and the checks that keep you from shipping a broken mesh.++### Turn a sentence into a 3D model+The free, keyless text to GLB lane, with the polling your agent usually gets wrong.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Make me a 3D model of <a weathered brass diving helmet>. Use the free three.ws API: no key, no account.++ POST https://three.ws/api/3d/generate {"prompt": "<one subject, specific about material and style>"}++If the response comes back pending it hands you a job id: poll GET https://three.ws/api/3d/generate?job=<id> until it is done. Generation takes a minute or two, so keep polling instead of declaring failure on the first pending response.++Give me the glbUrl exactly as returned (do not rebuild the URL yourself), the viewer link, the AR link and the file size. One subject per generation: if what I asked for is really a scene, split it into separate models and tell me you did.+--- end prompt ---++You get: A downloadable GLB, a viewer link, and an AR link that opens on a phone.+More: 3D API reference https://three.ws/docs/3d-api | Forge in the browser https://three.ws/forge++### Generate a rigged avatar from a description+Mesh plus humanoid skeleton in one call, then looked at before it is handed to you.+Setup: Free MCP server. Connect the free three.ws 3D Studio once. No account, no API key, no payment.+ Claude Code: claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio+ Claude apps: add https://three.ws/api/mcp-studio as a custom connector with authentication set to None.++--- prompt ---+Generate a rigged, animation-ready 3D avatar from this description: <a tall elf ranger in a weathered green cloak>.++Use the three.ws 3D Studio MCP server. forge_avatar does the mesh and the humanoid skeleton in one step, so use that rather than generating and rigging separately. If it returns a pending job, collect it with check_job.++Before you tell me it is done, call look_at_model on the result and actually look at the frames. If the silhouette or the proportions are wrong, fix it with refine_model and a one-line instruction rather than starting over, and show me both versions.++Hand me the rigged GLB URL, the renders, and the link that opens it in the pose studio.+--- end prompt ---++You get: A rigged GLB you can animate, plus rendered frames so you can judge it without downloading anything.+More: Animation Studio https://three.ws/pose | Avatar Studio https://three.ws/avatar-studio++### Turn a photo into a 3D avatar+A reference image becomes a rigged humanoid, with an honest verdict on the likeness.+Setup: Free MCP server. Connect the free three.ws 3D Studio once. No account, no API key, no payment.+ Claude Code: claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio+ Claude apps: add https://three.ws/api/mcp-studio as a custom connector with authentication set to None.++--- prompt ---+Turn this reference image into a 3D avatar: <https://example.com/photo.jpg>++Use forge_avatar on the three.ws 3D Studio MCP server with image_url set to that image, so I get a rigged humanoid rather than a static bust. Collect it with check_job if it comes back pending.++Then look_at_model it from the front and the three-quarter view and tell me honestly whether it reads as the reference. If it does not, say what in the image is fighting it (lighting, crop, occlusion, hair) and what I should re-shoot.+--- end prompt ---++You get: A rigged avatar from your photo, and a straight answer about the likeness.+More: Selfie to avatar https://three.ws/create/selfie | Image to 3D https://three.ws/image-to-3d++### Rig a GLB you already have+Add a humanoid skeleton and skin weights to a static model, and hear whether it was worth it.+Setup: Free MCP server. Connect the free three.ws 3D Studio once. No account, no API key, no payment.+ Claude Code: claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio+ Claude apps: add https://three.ws/api/mcp-studio as a custom connector with authentication set to None.++--- prompt ---+Rig this GLB so it can be animated: <https://example.com/character.glb>++Use rig_mesh on the three.ws 3D Studio MCP server. It adds a humanoid skeleton and skin weights and returns a new GLB.++Tell me whether the source mesh was actually humanoid enough to rig well, what came back, and give me the pose-studio link so I can check that the joints bend where they should. If the model is clearly not humanoid, say so before spending the call.+--- end prompt ---++You get: A rigged GLB plus a pose-studio link to check the joints.+More: Rig Doctor https://three.ws/rig-doctor++### Search the catalog before generating anything+Thousands of ready-made CC0 objects, characters and motion clips. A real asset usually beats a fresh generation.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+I need <an industrial desk lamp> for a scene. Check the three.ws catalog before generating anything: it holds thousands of ready-made CC0 objects, rigged characters and motion clips.++ curl -s 'https://three.ws/api/catalog?q=<query>&kind=object&limit=8'++Show me the top matches with title, license, file size and thumbnail. If one of them fits, hand me its GLB URL and stop there. Only if nothing fits, generate one with POST https://three.ws/api/3d/generate, and say in one line why the catalog missed.+--- end prompt ---++You get: A ready-to-use CC0 asset, or a generated one plus the reason the catalog could not cover it.+More: Object Library https://three.ws/objects | Animation Gallery https://three.ws/animations++### Generate a whole asset kit with a manifest+Six props, one subject per call, retried on failure, and written down so you can find them tomorrow.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Build me an asset kit for <a small medieval market scene>: six props, generated one subject at a time.++Plan the list first and show it to me before you spend a single call. Then generate each one through the free three.ws lane (POST https://three.ws/api/3d/generate), poll each job to completion, and keep going if one fails: retry that prop once with a tightened prompt, and report it if it still does not land.++Finish with a markdown table of prop, the prompt you used, the GLB URL and the viewer link, and write it to assets/kit.md so I have the manifest.+--- end prompt ---++You get: A folder's worth of props and a manifest file that survives the session.+More: Scene Composer https://three.ws/compose++### Run a whole asset job with the skills installed+Search first, generate only if needed, rig if it is a character, validate before handing it over.+Setup: Skills pack. Install the three.ws Agent Skills so Claude already knows the platform's endpoints and rules.+ Claude Code plugins: add the marketplace nirholas/three.ws, then install three-ws-core@three-ws.+ Anything else: copy a folder from .agents/skills/ into your project's .claude/skills/.++--- prompt ---+I need <a hero prop for the landing page: a chunky retro synthesizer>. Use the three.ws skills you already have and run the whole job, not just the first step.++Order matters. Search the catalog first with find-3d-assets, because a ready-made CC0 asset beats a generation on both quality and time. If nothing fits, generate it with generate-3d-model. If what I described is a character rather than a prop, use create-3d-avatar instead so it comes back rigged.++Validate the result before you hand it over: file weight, triangle count, texture sizes, and a plain answer on whether it belongs in a hero section on a phone.++Tell me which skill did the work and why you picked it, and give me the GLB URL, the viewer link, and the embed snippet if it is something I can put on the page.+--- end prompt ---++You get: One finished, validated asset and a clear account of which lane produced it.+More: Agent Skills docs https://three.ws/docs/agent-skills | Object Library https://three.ws/objects++### Change a model without starting over+Describe the change in words. Keep the lineage. Compare the versions side by side.+Setup: Free MCP server. Connect the free three.ws 3D Studio once. No account, no API key, no payment.+ Claude Code: claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio+ Claude apps: add https://three.ws/api/mcp-studio as a custom connector with authentication set to None.++--- prompt ---+Here is a model I already generated: <GLB URL>. I want <the helmet bigger and the metal darker>.++Use refine_model on the three.ws 3D Studio MCP server with that instruction rather than generating something new: it keeps the version lineage so I can compare.++Show me before and after with look_at_model and keep both URLs. If two refinements in a row miss, say so and propose a fresh prompt instead of burning more calls.+--- end prompt ---++You get: A revised model, both versions side by side, and a stop rule so you are not iterating forever.+More: Restyle Studio https://three.ws/restyle++### Ask whether a model can actually be printed+A free printability report: closed solid, thin walls, volume, and a score with named deductions.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Can this model actually be 3D printed? <GLB URL>++ POST https://three.ws/api/print/quote {"glbUrl": "<url>"}++It is free and keyless, and asking orders nothing. Give me the printability score with its named deductions, whether the mesh is a closed solid, how many separate bodies it contains, the thinnest wall and the enclosed volume.++Then tell me in plain language what to fix before printing, ordered by how much it matters.+--- end prompt ---++You get: A manufacturing verdict on your mesh, and a fix list in priority order.+More: Materialize https://three.ws/materialize++### Give a model a name and a voice+Turn a GLB into a persistent character your Claude can bring back in a later session.+Setup: Free MCP server. Connect the free three.ws 3D Studio once. No account, no API key, no payment.+ Claude Code: claude mcp add --transport http three-ws-studio https://three.ws/api/mcp-studio+ Claude apps: add https://three.ws/api/mcp-studio as a custom connector with authentication set to None.++--- prompt ---+Give this model a name and a voice so it can speak in our conversations: <GLB URL, or generate one first>.++Use the three.ws 3D Studio MCP server: create_agent_persona turns the GLB into a named persistent body, and persona_say makes it perform a line with lip-sync and a matching expression.++Name it <Ada>, describe its personality in one line, then have it introduce itself. Give me the persona_id so I can bring the same body back in a new session with get_agent_persona.+--- end prompt ---++You get: A named, reusable 3D character that speaks, plus the id that brings it back.+More: Lipsync lab https://three.ws/lipsync+++## Put it on your site+The embed, the framework wrapper, the concierge, and what to do when an embed goes dark.++### Put a live avatar on your page+The web component, the pinned production snippet with SRI, and the states most embeds forget.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Put a live 3D avatar on <index.html> using the three.ws <agent-3d> web component.++Read https://three.ws/docs/embedding first so you use the real attributes instead of inventing them.++Prototype against the latest channel, then give me the production snippet: a pinned version plus the SRI hash from https://three.ws/agent-3d/<version>/integrity.json. Use <my GLB URL> as the body.++It has to look deliberate: sized by the layout rather than a fixed pixel box, readable down to 320px, an idle animation, a poster or skeleton while the GLB loads, and no motion when prefers-reduced-motion is set. Show it running locally before you call it done.+--- end prompt ---++You get: A working embed on your page and the exact snippet to ship.+More: Embed docs https://three.ws/docs/embedding | Widget Studio https://three.ws/studio++### Wrap the avatar as a React component+Custom elements in React and Next.js, done the way that does not break hydration.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Add a three.ws 3D avatar to this <Next.js> app as a reusable component.++<agent-3d> is a web component, so wrap it properly: load the script once, render it client-side only (never server-render a custom element), type the props, and expose a small API so a page can set the animation and the mood.++Give me the component file, one usage example on the home page, and a short gotcha list for React and custom elements: attributes versus properties, event listeners, hydration.+--- end prompt ---++You get: A typed component in your codebase, used once, with the framework traps written down.+More: Embed tutorial https://three.ws/tutorials/embed-on-website | Avatar SDK https://three.ws/avatar-sdk++### Build a 3D concierge for your site+An avatar in the corner that answers from your real content and never blocks first paint.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Build a 3D concierge for <my site>: an avatar in the corner that answers questions about the product and points people at the right page.++Use the three.ws concierge widget rather than rolling your own chat UI, and read https://three.ws/docs/concierge before writing code.++Requirements: it loads lazily so it never blocks first paint, it is keyboard reachable and labelled for screen readers, it collapses to a button on mobile, and every answer is grounded in real content from my site rather than invented.++Show it working locally, then tell me exactly what I still have to supply: content source, brand colors, the avatar.+--- end prompt ---++You get: A working concierge on localhost and a short list of what only you can fill in.+More: Concierge https://three.ws/concierge | Concierge docs https://three.ws/docs/concierge++### Diagnose a broken embed+The four things it actually is, checked in order, instead of shotgun edits.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+My three.ws avatar embed is broken on <URL or file>. It <shows nothing / shows a T-pose / never finishes loading>.++Diagnose it before changing anything. Check, in order: that the script actually loaded, that the GLB URL is reachable and CORS-clean from the browser origin (three.ws/cdn/... is the browser-safe host, the object store is not), that the element has a real height, and that every attribute I used exists on the component. Point the Embed Doctor at it: https://three.ws/embed-doctor++Then fix it and tell me in one line which of those it actually was. No guessing, no shotgun edits.+--- end prompt ---++You get: A working embed and a one-line root cause you can learn from.+More: Embed Doctor https://three.ws/embed-doctor++### Validate a model before it hits production+Validator errors, triangle and texture budgets, and a straight yes or no on mobile.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Validate this model before I ship it to a web page: <GLB URL>++ POST https://three.ws/api/3d/inspect {"url": "<glb url>"}++Free and keyless. Give me the glTF validator result in plain language, the triangle count, the texture count and sizes, the animation clips and the total download weight.++Then answer one question directly: is this safe to put in a hero section on a phone? If not, say exactly what to cut and by how much (Draco or meshopt compression, texture resizing, LODs). Numbers, not adjectives.+--- end prompt ---++You get: A performance verdict with numbers, and a specific cut list if it fails.+More: glTF Validator https://three.ws/validation | Model Inspector https://three.ws/inspect+++## The agent economy+Find a paid API, sell your own, pay for a call. Anything that moves money stops for your confirmation.++### Find a paid API your agent can call+Search the x402 bazaar, price the best match, pay for nothing without your say-so.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Find me a paid API for <turning a wallet address into a company profile> in the x402 agent economy: per-call USDC, no signup.++Searching is keyless:++ npx [email protected] x402 bazaar search "<what I need>" --json++For the top matches show me what each one does, the price per call, the chain and the exact endpoint. Then inspect the best one with `npx [email protected] x402 details <url>` and tell me what a single call would really cost me.++Do not pay for anything. I will decide.+--- end prompt ---++You get: A shortlist of real paid endpoints with prices, and nothing spent.+More: x402 docs https://three.ws/docs/x402 | Marketplace https://three.ws/marketplace++### Charge other agents for your API+A real 402, a real settle, and a verified paid call before anyone calls it done.+Setup: Agent wallet. Needs a funded agent wallet. These prompts can move real money, so they are written to stop for your yes first.+ Sign in and fund the wallet before you paste one of these: https://three.ws/start++--- prompt ---+Turn <this endpoint> into a paid API other agents can call per request, using x402.++Read https://three.ws/tutorials/paid-x402-endpoint first, then wire it for real: the 402 response with correct payment requirements, the settle path, and a price that honestly covers what the call costs me to serve.++Verify it end to end before you tell me it works: curl it and show me the 402, then pay it once on a test network and show me the 200.++Use a test network for that paid call. If anything you propose would spend real funds, stop and wait for my yes with the amount and the recipient in front of me.++Finish with the one-paragraph listing I can publish so agents discover it.+--- end prompt ---++You get: An endpoint that charges per call, proven with a real 402 and a real 200.+More: Paid endpoint tutorial https://three.ws/tutorials/paid-x402-endpoint | Monetize an MCP server https://three.ws/tutorials/monetize-mcp-server++### Pay for one call, with a hard stop first+Price it, show you recipient and amount, and wait for your yes before any money moves.+Setup: Agent wallet. Needs a funded agent wallet. These prompts can move real money, so they are written to stop for your yes first.+ Sign in and fund the wallet before you paste one of these: https://three.ws/start+Caution: This prompt spends real money. It is written so your Claude must stop and show you the amount and the recipient before it pays. Keep that line in it.++--- prompt ---+I want to use this paid endpoint: <URL>. Walk it through properly.++First inspect it without paying: `npx [email protected] x402 details <url>`. Show me the price, the chain, the asset and who gets paid, as a table.++Then stop and wait. Do not send a payment, sign anything or run the pay command until I have confirmed that exact amount and that exact recipient.++After I confirm, pay once, show me the response, and tell me what the call actually cost.+--- end prompt ---++You get: A priced, confirmed, single payment and the response you paid for.+More: x402 docs https://three.ws/docs/x402++### Check the agent wallet before you rely on it+One verdict line: can this wallet pay for a call right now, yes or no.+Setup: Agent wallet. Needs a funded agent wallet. These prompts can move real money, so they are written to stop for your yes first.+ Sign in and fund the wallet before you paste one of these: https://three.ws/start++--- prompt ---+Give me a straight status report on my agent wallet before I rely on it.++Check which addresses it holds (Solana first, then any EVM legs), the balance of each, whether it can actually sign right now, and anything that would make a payment fail: empty gas, an unfunded chain, an expired session.++Present it as a table with a verdict line at the top: can this wallet pay for a call right now, yes or no. If the answer is no, give me the single action that fixes it.++Do not move any funds.+--- end prompt ---++You get: A one-glance verdict on whether your wallet can transact, and the one fix if it cannot.+More: Get started https://three.ws/start+++## Build on the platform+Wire three.ws into your own agent, your own toolchain, your own dashboards.++### Brief me on $THREE from the source+Live token stats from the platform's own endpoint, with no predictions attached.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Give me the live state of $THREE, the three.ws token, from the platform's own endpoint rather than a third-party aggregator:++ curl -s https://three.ws/api/three-token/stats++Report price, 24 hour change, market cap, 24 hour volume, holders and liquidity, with the mint address, and say how fresh the data is.++Then three sentences on what changed since yesterday. Numbers only: no price predictions, no advice.+--- end prompt ---++You get: A factual $THREE briefing straight from the platform, ready to paste into a report.+More: $THREE Launchpad https://three.ws/three-launchpad | Marketplace https://three.ws/marketplace++### Wire the 3D API into your own agent+Generate clients from the real OpenAPI 3.1 spec, and test against a real generation.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+Wire the free three.ws 3D API into <my agent> from its OpenAPI spec instead of hand-writing clients:++ https://three.ws/api/3d/openapi.json++It is a real OpenAPI 3.1 document and it is keyless. Generate typed callers for the endpoints I need, and wrap the queued endpoints so a pending response polls to completion inside my client instead of leaking a job id into my application code.++Write one integration test that generates a real model and asserts a GLB comes back. A real call, not a mock.+--- end prompt ---++You get: Typed clients, correct polling, and a test that proves the integration against production.+More: 3D API reference https://three.ws/docs/3d-api | OpenAPI spec https://three.ws/api/3d/openapi.json++### Give an agent you already built a body+Take an existing bot or app and put a reactive 3D face on it, driven by real state.+Setup: No setup. Nothing to install. Works in any Claude that can make an HTTP request or run a command.++--- prompt ---+I have <an agent / a bot / a dashboard> at <path or URL>. Give it a body: a 3D avatar that reacts to what it is actually doing.++Read https://three.ws/docs/embedding, then wire the avatar to real state, not to a timer: thinking while a request is in flight, talking while it streams a reply, idle when it is waiting, and a visible error posture when a call fails.++Map every state my app can be in to an animation, list the ones I have no mapping for, and show me the whole thing running against real traffic rather than a demo loop.+--- end prompt ---++You get: Your existing agent with a 3D presence wired to its real lifecycle, plus the gaps named.+More: Agent gestures https://three.ws/gestures | Assistant widget https://three.ws/assistant+++Every prompt above is copy-paste ready. Replace anything in <angle brackets>.diff --git a/scripts/build-prompt-library.mjs b/scripts/build-prompt-library.mjsnew file mode 100644index 000000000..1ceadb5f6--- /dev/null+++ b/scripts/build-prompt-library.mjs@@ -0,0 +1,191 @@+#!/usr/bin/env node+/**+ * Build the public prompt library from data/prompt-library.json.+ *+ * One source, two published outputs, so the page a human browses and the file+ * an agent fetches can never disagree:+ * public/prompts.json the library plus counts and indexes, for /prompts+ * public/prompts.txt the same prompts as plain text, for `curl` and for+ * pasting a whole category into an assistant at once+ *+ * node scripts/build-prompt-library.mjs write both+ * node scripts/build-prompt-library.mjs --check fail if either is stale+ *+ * The --check mode runs in `npm run gate`, so an edit to the data that never+ * got built cannot ship a stale library. Validation runs in both modes: a+ * malformed entry fails the build rather than rendering a broken card.+ */+import { readFileSync, writeFileSync } from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const read = (rel) => readFileSync(path.join(root, rel), 'utf8');++const library = JSON.parse(read('data/prompt-library.json'));+const pages = JSON.parse(read('data/pages.json'));++const routes = new Set();+for (const section of pages.sections) for (const page of section.pages) routes.add(page.path);++const problems = [];+const fail = (where, message) => problems.push(`${where}: ${message}`);++const setupIds = new Set(library.setups.map((s) => s.id));+const categoryIds = new Set(library.categories.map((c) => c.id));+const seen = new Set();++// The house style bans both dash glyphs everywhere we write, and a prompt is+// copy that ends up in someone else's editor, so it is held to the same rule.+const BANNED_GLYPHS = /[\u2014\u2013]/;++for (const entry of library.prompts) {+ const at = `prompt "${entry.id || '(no id)'}"`;+ if (!entry.id || !/^[a-z0-9]+(-[a-z0-9]+)*$/.test(entry.id)) fail(at, 'id must be kebab-case');+ if (seen.has(entry.id)) fail(at, 'duplicate id');+ seen.add(entry.id);+ if (!entry.title) fail(at, 'missing title');+ if (!entry.summary) fail(at, 'missing summary');+ if (!entry.returns) fail(at, 'missing returns (what the user gets back)');+ if (!categoryIds.has(entry.category)) fail(at, `unknown category "${entry.category}"`);+ if (!setupIds.has(entry.setup)) fail(at, `unknown setup "${entry.setup}"`);+ if (!Array.isArray(entry.prompt) || entry.prompt.length === 0) fail(at, 'prompt must be a non-empty array of lines');+ if (!/^\d{4}-\d{2}-\d{2}$/.test(entry.added || '')) fail(at, 'added must be YYYY-MM-DD');++ const body = Array.isArray(entry.prompt) ? entry.prompt.join('\n') : '';+ if (BANNED_GLYPHS.test(body + entry.title + entry.summary + entry.returns)) {+ fail(at, 'contains an em-dash or en-dash');+ }+ const open = (body.match(/</g) || []).length;+ const close = (body.match(/>/g) || []).length;+ if (open !== close) fail(at, 'unbalanced <placeholder> brackets');++ for (const link of entry.links || []) {+ if (!link.label || !link.href) fail(at, 'a link is missing label or href');+ if (link.href.startsWith('/')) {+ const known = routes.has(link.href) || link.href.startsWith('/api/');+ if (!known) fail(at, `link ${link.href} is not a route declared in data/pages.json`);+ } else if (!link.href.startsWith('https://')) {+ fail(at, `link ${link.href} must be an internal path or an https URL`);+ }+ }+}++for (const category of library.categories) {+ if (!library.prompts.some((p) => p.category === category.id)) {+ fail(`category "${category.id}"`, 'has no prompts');+ }+}++if (problems.length) {+ console.error('data/prompt-library.json is invalid:\n ' + problems.join('\n '));+ process.exit(1);+}++const prompts = library.prompts.map((entry) => ({+ ...entry,+ prompt: entry.prompt.join('\n'),+ lines: entry.prompt.length,+}));++const countBy = (key) =>+ Object.fromEntries(+ [...new Set(prompts.map((p) => p[key]))].map((value) => [+ value,+ prompts.filter((p) => p[key] === value).length,+ ]),+ );++const tags = {};+for (const entry of prompts) for (const tag of entry.tags || []) tags[tag] = (tags[tag] || 0) + 1;++const json = {+ version: library.version,+ title: library.title,+ tagline: library.tagline,+ intro: library.intro,+ count: prompts.length,+ categories: library.categories.map((category) => ({+ ...category,+ count: prompts.filter((p) => p.category === category.id).length,+ })),+ setups: library.setups.map((setup) => ({+ ...setup,+ count: prompts.filter((p) => p.setup === setup.id).length,+ })),+ byCategory: countBy('category'),+ bySetup: countBy('setup'),+ tags: Object.fromEntries(Object.entries(tags).sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))),+ prompts,+};++const setupById = new Map(library.setups.map((s) => [s.id, s]));+const text = [];+text.push(library.title);+text.push('='.repeat(library.title.length));+text.push('');+text.push(library.tagline);+text.push('');+text.push(library.intro);+text.push('');+text.push(`${prompts.length} prompts. Browse them at https://three.ws/prompts, or fetch this file again any time.`);+text.push('');+for (const category of library.categories) {+ const inCategory = prompts.filter((p) => p.category === category.id);+ text.push('');+ text.push(`## ${category.label}`);+ text.push(category.blurb);+ text.push('');+ for (const entry of inCategory) {+ const setup = setupById.get(entry.setup);+ text.push(`### ${entry.title}`);+ text.push(entry.summary);+ text.push(`Setup: ${setup.label}. ${setup.blurb}`);+ for (const step of setup.how || []) text.push(` ${step}`);+ if (entry.caution) text.push(`Caution: ${entry.caution}`);+ text.push('');+ text.push('--- prompt ---');+ text.push(entry.prompt);+ text.push('--- end prompt ---');+ text.push('');+ text.push(`You get: ${entry.returns}`);+ if ((entry.links || []).length) {+ text.push(+ 'More: ' ++ entry.links+ .map((l) => `${l.label} ${l.href.startsWith('/') ? 'https://three.ws' + l.href : l.href}`)+ .join(' | '),+ );+ }+ text.push('');+ }+}+text.push('');+text.push('Every prompt above is copy-paste ready. Replace anything in <angle brackets>.');+text.push('');++const outputs = [+ ['public/prompts.json', JSON.stringify(json, null, '\t') + '\n'],+ ['public/prompts.txt', text.join('\n')],+];++if (process.argv.includes('--check')) {+ const stale = outputs.filter(([rel, body]) => {+ try {+ return read(rel) !== body;+ } catch {+ return true;+ }+ });+ if (stale.length) {+ console.error(+ `Prompt library outputs are stale: ${stale.map(([rel]) => rel).join(', ')}\n` ++ 'Run `npm run build:prompt-library`.',+ );+ process.exit(1);+ }+ console.log(`prompt library: ${prompts.length} prompts, outputs up to date`);+} else {+ for (const [rel, body] of outputs) writeFileSync(path.join(root, rel), body);+ console.log(`prompt library: wrote ${outputs.map(([rel]) => rel).join(' and ')} (${prompts.length} prompts)`);+}diff --git a/src/prompt-library/page.css b/src/prompt-library/page.cssnew file mode 100644index 000000000..337eb400a--- /dev/null+++ b/src/prompt-library/page.css@@ -0,0 +1,510 @@+/* /prompts: the copy-paste prompt library. Scoped to .pl; colour, spacing,+ motion and radii all come from the canonical tokens in public/tokens.css. */+.pl {+ --pl-accent: var(--accent-violet);+ --pl-accent-soft: rgba(196, 181, 253, 0.1);+ --pl-accent-stroke: rgba(196, 181, 253, 0.32);+ max-width: 1180px;+ margin: 0 auto;+ padding: 96px 20px 96px;+ color: var(--ink);+ font-family: var(--font-body);+}+[data-theme='light'] .pl {+ --pl-accent: #6d28d9;+ --pl-accent-soft: rgba(109, 40, 217, 0.07);+ --pl-accent-stroke: rgba(109, 40, 217, 0.28);+}+.pl *,+.pl *::before,+.pl *::after {+ box-sizing: border-box;+}++/* Head */+.pl-boot {+ color: var(--ink-dim);+ padding: 80px 0;+ text-align: center;+}+.pl-eyebrow {+ display: inline-flex;+ align-items: center;+ gap: 8px;+ margin: 0 0 14px;+ font: 600 11px/1 var(--font-mono);+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--ink-dim);+}+.pl-dot {+ width: 7px;+ height: 7px;+ border-radius: 50%;+ background: var(--pl-accent);+ box-shadow: 0 0 10px var(--pl-accent);+}+.pl h1 {+ margin: 0;+ font-size: clamp(30px, 5vw, 52px);+ line-height: 1.04;+ letter-spacing: -0.03em;+ max-width: 18ch;+}+.pl-lede {+ margin: 18px 0 0;+ max-width: 62ch;+ font-size: clamp(15px, 1.6vw, 18px);+ line-height: 1.6;+ color: var(--ink-dim);+}+.pl-head-actions {+ display: flex;+ flex-wrap: wrap;+ gap: 10px;+ margin: 26px 0 0;+}++/* Setup rail */+.pl-section-title {+ margin: 64px 0 6px;+ font-size: 13px;+ font-family: var(--font-mono);+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--ink-dim);+}+.pl-section-note {+ margin: 0 0 20px;+ max-width: 62ch;+ color: var(--ink-dim);+ font-size: 14px;+ line-height: 1.6;+}+.pl-setups {+ display: grid;+ gap: 14px;+ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));+}+.pl-setup {+ border: 1px solid var(--stroke);+ border-radius: var(--radius-card);+ background: var(--surface-1);+ padding: 18px;+}+.pl-setup h3 {+ margin: 0 0 6px;+ font-size: 15px;+ letter-spacing: -0.01em;+}+.pl-setup p {+ margin: 0;+ font-size: 13px;+ line-height: 1.6;+ color: var(--ink-dim);+}+.pl-setup-steps {+ margin: 12px 0 0;+ padding: 0;+ list-style: none;+ display: grid;+ gap: 8px;+}+.pl-setup-steps li {+ font: 500 12px/1.55 var(--font-mono);+ color: var(--ink);+ background: var(--surface-2);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ padding: 8px 10px;+ overflow-wrap: anywhere;+}+.pl-setup-count {+ display: inline-block;+ margin-left: 8px;+ font: 600 11px/1 var(--font-mono);+ color: var(--pl-accent);+ vertical-align: middle;+}++/* Toolbar */+.pl-toolbar {+ position: sticky;+ top: 0;+ z-index: 5;+ margin: 18px 0 0;+ padding: 14px 0;+ background: var(--bg-0, var(--surface-1));+ backdrop-filter: blur(10px);+ border-bottom: 1px solid var(--stroke);+}+.pl-search-row {+ display: flex;+ flex-wrap: wrap;+ gap: 10px;+ align-items: center;+}+.pl-search {+ flex: 1 1 260px;+ min-width: 0;+ display: flex;+ align-items: center;+ gap: 8px;+ border: 1px solid var(--stroke-strong);+ border-radius: var(--radius-pill);+ background: var(--surface-2);+ padding: 0 14px;+ transition: border-color var(--duration-fast) var(--ease-standard);+}+.pl-search:focus-within {+ border-color: var(--pl-accent-stroke);+}+.pl-search input {+ flex: 1;+ min-width: 0;+ border: 0;+ background: none;+ color: var(--ink);+ font: 400 14px/1 var(--font-body);+ padding: 11px 0;+ outline: none;+}+.pl-search input::placeholder {+ color: var(--ink-dim);+}+.pl-kbd {+ font: 600 10px/1 var(--font-mono);+ color: var(--ink-dim);+ border: 1px solid var(--stroke-strong);+ border-radius: var(--radius-sm);+ padding: 4px 6px;+}+.pl-chips {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ margin: 12px 0 0;+}+.pl-chip {+ cursor: pointer;+ border: 1px solid var(--stroke-strong);+ border-radius: var(--radius-pill);+ background: var(--surface-2);+ color: var(--ink-dim);+ font: 500 12px/1 var(--font-body);+ padding: 9px 13px;+ transition:+ color var(--duration-fast) var(--ease-standard),+ border-color var(--duration-fast) var(--ease-standard),+ background var(--duration-fast) var(--ease-standard);+}+.pl-chip:hover {+ color: var(--ink);+ border-color: var(--pl-accent-stroke);+}+.pl-chip[aria-pressed='true'] {+ color: var(--ink);+ background: var(--pl-accent-soft);+ border-color: var(--pl-accent-stroke);+}+.pl-chip-count {+ margin-left: 6px;+ font-family: var(--font-mono);+ font-size: 10px;+ opacity: 0.7;+}+.pl-result-line {+ margin: 12px 0 0;+ font: 500 12px/1 var(--font-mono);+ color: var(--ink-dim);+}++/* Cards */+.pl-grid {+ display: grid;+ gap: 16px;+ margin: 24px 0 0;+ grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));+}+.pl-card {+ border: 1px solid var(--stroke);+ border-radius: var(--radius-card);+ background: var(--surface-1);+ padding: 20px;+ display: flex;+ flex-direction: column;+ gap: 14px;+ scroll-margin-top: 120px;+ transition: border-color var(--duration-base) var(--ease-standard);+}+.pl-card:hover {+ border-color: var(--stroke-strong);+}+.pl-card:target {+ border-color: var(--pl-accent-stroke);+ box-shadow: 0 0 0 3px var(--pl-accent-soft);+}+.pl-card-head {+ display: flex;+ gap: 12px;+ align-items: flex-start;+ justify-content: space-between;+}+.pl-card h3 {+ margin: 0;+ font-size: 17px;+ line-height: 1.25;+ letter-spacing: -0.01em;+}+.pl-card h3 a {+ color: inherit;+ text-decoration: none;+}+.pl-card h3 a:hover {+ text-decoration: underline;+ text-underline-offset: 3px;+}+.pl-badge {+ flex: none;+ font: 600 10px/1 var(--font-mono);+ letter-spacing: 0.05em;+ text-transform: uppercase;+ color: var(--ink-dim);+ border: 1px solid var(--stroke-strong);+ border-radius: var(--radius-pill);+ padding: 6px 9px;+ white-space: nowrap;+}+.pl-badge[data-setup='none'] {+ color: var(--success);+ border-color: var(--badge-success-border);+ background: var(--badge-success-bg);+}+.pl-badge[data-setup='mcp-studio'] {+ color: var(--pl-accent);+ border-color: var(--pl-accent-stroke);+ background: var(--pl-accent-soft);+}+.pl-badge[data-setup='wallet'] {+ color: var(--warn);+ border-color: var(--badge-warn-border);+ background: var(--badge-warn-bg);+}+.pl-summary {+ margin: 0;+ font-size: 14px;+ line-height: 1.6;+ color: var(--ink-dim);+}+.pl-caution {+ margin: 0;+ font-size: 12.5px;+ line-height: 1.6;+ color: var(--warn);+ background: var(--badge-warn-bg);+ border: 1px solid var(--badge-warn-border);+ border-radius: var(--radius-md);+ padding: 10px 12px;+}+.pl-prompt {+ margin: 0;+ max-height: 260px;+ overflow: auto;+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ background: var(--surface-2);+ padding: 14px;+ font: 400 12.5px/1.65 var(--font-mono);+ color: var(--ink);+ white-space: pre-wrap;+ overflow-wrap: anywhere;+ tab-size: 2;+}+.pl-card[data-expanded='true'] .pl-prompt {+ max-height: none;+}+.pl-actions {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ align-items: center;+}+.pl-btn {+ cursor: pointer;+ display: inline-flex;+ align-items: center;+ gap: 7px;+ border: 1px solid var(--stroke-strong);+ border-radius: var(--radius-pill);+ background: var(--surface-2);+ color: var(--ink);+ font: 600 12px/1 var(--font-body);+ padding: 10px 14px;+ text-decoration: none;+ transition:+ background var(--duration-fast) var(--ease-standard),+ border-color var(--duration-fast) var(--ease-standard),+ transform var(--duration-instant) var(--ease-standard);+}+.pl-btn:hover {+ background: var(--surface-3);+ border-color: var(--pl-accent-stroke);+}+.pl-btn:active {+ transform: translateY(1px);+}+.pl-btn[data-variant='primary'] {+ background: var(--pl-accent-soft);+ border-color: var(--pl-accent-stroke);+ color: var(--pl-accent);+}+.pl-btn[data-variant='primary']:hover {+ background: var(--pl-accent-soft);+ border-color: var(--pl-accent);+}+.pl-btn[data-copied='true'] {+ color: var(--success);+ border-color: var(--badge-success-border);+ background: var(--badge-success-bg);+}+.pl-returns {+ margin: 0;+ font-size: 13px;+ line-height: 1.6;+ color: var(--ink-dim);+ border-left: 2px solid var(--pl-accent-stroke);+ padding-left: 12px;+}+.pl-returns b {+ color: var(--ink);+ font-weight: 600;+}+.pl-foot {+ display: flex;+ flex-wrap: wrap;+ gap: 10px;+ align-items: center;+ justify-content: space-between;+ margin-top: auto;+ padding-top: 4px;+}+.pl-links {+ display: flex;+ flex-wrap: wrap;+ gap: 12px;+}+.pl-links a {+ font-size: 12.5px;+ color: var(--ink-dim);+ text-decoration: none;+ border-bottom: 1px solid var(--stroke-strong);+ transition: color var(--duration-fast) var(--ease-standard);+}+.pl-links a:hover {+ color: var(--ink);+ border-bottom-color: var(--pl-accent);+}+.pl-tags {+ display: flex;+ flex-wrap: wrap;+ gap: 6px;+}+.pl-tag {+ font: 500 10.5px/1 var(--font-mono);+ color: var(--ink-dim);+ background: var(--surface-2);+ border-radius: var(--radius-pill);+ padding: 5px 8px;+}++/* Loading, empty, error */+.pl-skeleton {+ border: 1px solid var(--stroke);+ border-radius: var(--radius-card);+ background: var(--surface-1);+ padding: 20px;+ min-height: 260px;+}+.pl-skeleton span {+ display: block;+ height: 12px;+ border-radius: var(--radius-sm);+ background: var(--surface-3);+ margin-bottom: 12px;+ animation: pl-pulse 1.8s ease-in-out infinite;+}+.pl-skeleton span:nth-child(2) {+ width: 70%;+}+.pl-skeleton span:nth-child(3) {+ width: 90%;+ height: 120px;+}+.pl-skeleton span:nth-child(4) {+ width: 45%;+}+@keyframes pl-pulse {+ 0%,+ 100% {+ opacity: 0.45;+ }+ 50% {+ opacity: 0.9;+ }+}+.pl-state {+ border: 1px dashed var(--stroke-strong);+ border-radius: var(--radius-card);+ padding: 44px 24px;+ text-align: center;+ color: var(--ink-dim);+}+.pl-state h3 {+ margin: 0 0 8px;+ color: var(--ink);+ font-size: 17px;+}+.pl-state p {+ margin: 0 auto 18px;+ max-width: 46ch;+ font-size: 14px;+ line-height: 1.6;+}+.pl-state-actions {+ display: flex;+ flex-wrap: wrap;+ gap: 10px;+ justify-content: center;+}++/* Copy announcement, visible to screen readers only */+.pl-sr {+ position: absolute;+ width: 1px;+ height: 1px;+ padding: 0;+ margin: -1px;+ overflow: hidden;+ clip: rect(0 0 0 0);+ white-space: nowrap;+ border: 0;+}++@media (max-width: 720px) {+ .pl {+ padding: 72px 16px 72px;+ }+ .pl-toolbar {+ position: static;+ backdrop-filter: none;+ }+ .pl-grid {+ grid-template-columns: 1fr;+ }+}++@media (prefers-reduced-motion: reduce) {+ .pl-skeleton span {+ animation: none;+ }+}diff --git a/src/prompt-library/page.js b/src/prompt-library/page.jsnew file mode 100644index 000000000..9d17ceddc--- /dev/null+++ b/src/prompt-library/page.js@@ -0,0 +1,388 @@+// /prompts: the three.ws prompt library.+//+// Every prompt is copy written to be pasted into someone else's Claude, so the+// page has exactly two jobs: let people find the right one fast, and hand it+// over cleanly (clipboard, or straight into claude.ai with the prompt already+// in the box). The library itself is published data, built from+// data/prompt-library.json into /prompts.json by scripts/build-prompt-library.mjs,+// so this module never hardcodes a prompt.+import './page.css';++const SOURCE = '/prompts.json';+const CLAUDE_NEW = 'https://claude.ai/new?q=';+const COPY_RESET_MS = 1800;++const root = document.getElementById('prompt-library');+const state = {+ library: null,+ query: '',+ category: 'all',+ setup: 'all',+};++const params = new URLSearchParams(location.search);+state.query = params.get('q') || '';+state.category = params.get('category') || 'all';+state.setup = params.get('setup') || 'all';++const escapeHtml = (value) =>+ String(value)+ .replace(/&/g, '&')+ .replace(/</g, '<')+ .replace(/>/g, '>')+ .replace(/"/g, '"');++function matches(entry, query) {+ if (!query) return true;+ const haystack = [+ entry.title,+ entry.summary,+ entry.returns,+ entry.prompt,+ entry.category,+ entry.setup,+ (entry.tags || []).join(' '),+ ]+ .join(' ')+ .toLowerCase();+ return query+ .toLowerCase()+ .split(/\s+/)+ .filter(Boolean)+ .every((term) => haystack.includes(term));+}++function visiblePrompts() {+ const all = state.library ? state.library.prompts : [];+ return all.filter(+ (entry) =>+ (state.category === 'all' || entry.category === state.category) &&+ (state.setup === 'all' || entry.setup === state.setup) &&+ matches(entry, state.query),+ );+}++function syncUrl() {+ const next = new URLSearchParams();+ if (state.query) next.set('q', state.query);+ if (state.category !== 'all') next.set('category', state.category);+ if (state.setup !== 'all') next.set('setup', state.setup);+ const search = next.toString();+ history.replaceState(null, '', search ? `?${search}${location.hash}` : location.pathname + location.hash);+}++function announce(message) {+ const live = document.getElementById('pl-live');+ if (live) live.textContent = message;+}++async function copyText(text) {+ try {+ await navigator.clipboard.writeText(text);+ return true;+ } catch {+ // Clipboard API needs a secure context and permission; the textarea path+ // still works in an http:// preview and in older WebViews.+ const area = document.createElement('textarea');+ area.value = text;+ area.setAttribute('readonly', '');+ area.style.position = 'fixed';+ area.style.opacity = '0';+ document.body.appendChild(area);+ area.select();+ let ok = false;+ try {+ ok = document.execCommand('copy');+ } catch {+ ok = false;+ }+ area.remove();+ return ok;+ }+}++function flashButton(button, label) {+ const original = button.dataset.label || button.textContent;+ button.dataset.label = original;+ button.dataset.copied = 'true';+ button.textContent = label;+ clearTimeout(Number(button.dataset.timer || 0));+ button.dataset.timer = String(+ setTimeout(() => {+ button.textContent = button.dataset.label;+ button.removeAttribute('data-copied');+ }, COPY_RESET_MS),+ );+}++function setupCard(setup) {+ const steps = (setup.how || [])+ .map((step) => `<li>${escapeHtml(step)}</li>`)+ .join('');+ return `+ <article class="pl-setup">+ <h3>${escapeHtml(setup.label)}<span class="pl-setup-count">${setup.count}</span></h3>+ <p>${escapeHtml(setup.blurb)}</p>+ ${steps ? `<ul class="pl-setup-steps">${steps}</ul>` : ''}+ </article>`;+}++function promptCard(entry, setupsById) {+ const setup = setupsById.get(entry.setup);+ const links = (entry.links || [])+ .map(+ (link) =>+ `<a href="${escapeHtml(link.href)}"${link.href.startsWith('http') ? ' target="_blank" rel="noopener"' : ''}>${escapeHtml(link.label)}</a>`,+ )+ .join('');+ const tags = (entry.tags || []).map((tag) => `<span class="pl-tag">${escapeHtml(tag)}</span>`).join('');+ return `+ <article class="pl-card" id="${escapeHtml(entry.id)}" data-id="${escapeHtml(entry.id)}">+ <div class="pl-card-head">+ <h3><a href="#${escapeHtml(entry.id)}">${escapeHtml(entry.title)}</a></h3>+ <span class="pl-badge" data-setup="${escapeHtml(entry.setup)}">${escapeHtml(setup ? setup.label : entry.setup)}</span>+ </div>+ <p class="pl-summary">${escapeHtml(entry.summary)}</p>+ ${entry.caution ? `<p class="pl-caution">${escapeHtml(entry.caution)}</p>` : ''}+ <pre class="pl-prompt" tabindex="0">${escapeHtml(entry.prompt)}</pre>+ <div class="pl-actions">+ <button type="button" class="pl-btn" data-variant="primary" data-action="copy">Copy prompt</button>+ <a class="pl-btn" data-action="open" href="${CLAUDE_NEW}${encodeURIComponent(entry.prompt)}" target="_blank" rel="noopener">Open in Claude</a>+ <button type="button" class="pl-btn" data-action="link">Copy link</button>+ </div>+ <p class="pl-returns"><b>You get:</b> ${escapeHtml(entry.returns)}</p>+ <div class="pl-foot">+ <div class="pl-links">${links}</div>+ <div class="pl-tags">${tags}</div>+ </div>+ </article>`;+}++function chip(label, count, value, group, active) {+ return `<button type="button" class="pl-chip" data-group="${group}" data-value="${escapeHtml(value)}" aria-pressed="${active}">${escapeHtml(label)}<span class="pl-chip-count">${count}</span></button>`;+}++function renderList() {+ const list = document.getElementById('pl-list');+ const line = document.getElementById('pl-result-line');+ if (!list || !state.library) return;+ const found = visiblePrompts();+ const setupsById = new Map(state.library.setups.map((setup) => [setup.id, setup]));++ line.textContent = `${found.length} of ${state.library.count} prompts`;++ if (!found.length) {+ list.innerHTML = `+ <div class="pl-state">+ <h3>No prompt matches that yet</h3>+ <p>Try a broader word, or clear the filters. If what you need is missing, the library is a single JSON file in the open repo and takes one pull request to extend.</p>+ <div class="pl-state-actions">+ <button type="button" class="pl-btn" data-variant="primary" data-action="reset">Clear filters</button>+ <a class="pl-btn" href="https://github.com/nirholas/three.ws/blob/main/data/prompt-library.json" target="_blank" rel="noopener">Add a prompt</a>+ </div>+ </div>`;+ return;+ }++ list.innerHTML = found.map((entry) => promptCard(entry, setupsById)).join('');+ for (const pre of list.querySelectorAll('.pl-prompt')) {+ if (pre.scrollHeight - pre.clientHeight > 8) {+ const card = pre.closest('.pl-card');+ const actions = card.querySelector('.pl-actions');+ const expand = document.createElement('button');+ expand.type = 'button';+ expand.className = 'pl-btn';+ expand.dataset.action = 'expand';+ expand.textContent = 'Show all';+ actions.appendChild(expand);+ }+ }+}++function renderChips() {+ const categoryRow = document.getElementById('pl-categories');+ const setupRow = document.getElementById('pl-setups-filter');+ if (!categoryRow || !state.library) return;+ categoryRow.innerHTML = [+ chip('All', state.library.count, 'all', 'category', state.category === 'all'),+ ...state.library.categories.map((category) =>+ chip(category.label, category.count, category.id, 'category', state.category === category.id),+ ),+ ].join('');+ setupRow.innerHTML = [+ chip('Any setup', state.library.count, 'all', 'setup', state.setup === 'all'),+ ...state.library.setups.map((setup) => chip(setup.label, setup.count, setup.id, 'setup', state.setup === setup.id)),+ ].join('');+}++function renderShell() {+ const library = state.library;+ root.innerHTML = `+ <p class="pl-eyebrow"><span class="pl-dot"></span>Prompt library</p>+ <h1>${escapeHtml(library.title)}</h1>+ <p class="pl-lede">${escapeHtml(library.intro)}</p>+ <div class="pl-head-actions">+ <button type="button" class="pl-btn" data-variant="primary" data-action="copy-all">Copy the whole library</button>+ <a class="pl-btn" href="/prompts.txt">Plain text</a>+ <a class="pl-btn" href="/prompts.json">JSON</a>+ <a class="pl-btn" href="/docs/prompts">How this works</a>+ </div>++ <h2 class="pl-section-title">What you need first</h2>+ <p class="pl-section-note">Most of these need nothing at all. The rest ask for one connection you make once.</p>+ <div class="pl-setups">${library.setups.map(setupCard).join('')}</div>++ <h2 class="pl-section-title">The prompts</h2>+ <div class="pl-toolbar">+ <div class="pl-search-row">+ <label class="pl-search">+ <span class="pl-sr">Search the prompt library</span>+ <input id="pl-search-input" type="search" placeholder="Search prompts: avatar, embed, x402, rigging" value="${escapeHtml(state.query)}" autocomplete="off" />+ <span class="pl-kbd">/</span>+ </label>+ </div>+ <div class="pl-chips" id="pl-categories"></div>+ <div class="pl-chips" id="pl-setups-filter"></div>+ <p class="pl-result-line" id="pl-result-line"></p>+ </div>+ <div class="pl-grid" id="pl-list"></div>+ <p class="pl-sr" id="pl-live" role="status" aria-live="polite"></p>`;++ renderChips();+ renderList();++ const input = document.getElementById('pl-search-input');+ let debounce = 0;+ input.addEventListener('input', () => {+ clearTimeout(debounce);+ debounce = setTimeout(() => {+ state.query = input.value.trim();+ syncUrl();+ renderList();+ }, 120);+ });+ input.addEventListener('keydown', (event) => {+ if (event.key === 'Escape' && input.value) {+ input.value = '';+ state.query = '';+ syncUrl();+ renderList();+ }+ });++ if (location.hash.length > 1) {+ const target = document.getElementById(decodeURIComponent(location.hash.slice(1)));+ if (target) target.scrollIntoView({ block: 'center' });+ }+}++function renderError(message) {+ root.innerHTML = `+ <div class="pl-state">+ <h3>The library did not load</h3>+ <p>${escapeHtml(message)} The same prompts are always available as plain text, which needs nothing but a browser.</p>+ <div class="pl-state-actions">+ <button type="button" class="pl-btn" data-variant="primary" data-action="retry">Try again</button>+ <a class="pl-btn" href="/prompts.txt">Read the plain text version</a>+ </div>+ </div>`;+}++function renderLoading() {+ root.innerHTML = `+ <p class="pl-eyebrow"><span class="pl-dot"></span>Prompt library</p>+ <h1>Prompts you can paste into Claude</h1>+ <p class="pl-lede">Loading the library.</p>+ <div class="pl-grid" aria-hidden="true">+ ${Array.from({ length: 4 })+ .map(() => '<div class="pl-skeleton"><span></span><span></span><span></span><span></span></div>')+ .join('')}+ </div>`;+}++function promptById(id) {+ return state.library ? state.library.prompts.find((entry) => entry.id === id) : null;+}++function wholeLibraryText() {+ return state.library.prompts+ .map((entry) => `# ${entry.title}\n# ${entry.summary}\n\n${entry.prompt}`)+ .join('\n\n---\n\n');+}++root.addEventListener('click', async (event) => {+ const chipEl = event.target.closest('.pl-chip');+ if (chipEl) {+ const group = chipEl.dataset.group;+ state[group] = chipEl.dataset.value;+ syncUrl();+ renderChips();+ renderList();+ return;+ }++ const button = event.target.closest('[data-action]');+ if (!button) return;+ const action = button.dataset.action;+ const card = button.closest('.pl-card');+ const entry = card ? promptById(card.dataset.id) : null;++ if (action === 'copy' && entry) {+ const ok = await copyText(entry.prompt);+ flashButton(button, ok ? 'Copied' : 'Press Ctrl+C');+ announce(ok ? `${entry.title} copied to the clipboard` : 'Copy failed, select the prompt and copy it manually');+ } else if (action === 'link' && entry) {+ const url = `${location.origin}${location.pathname}#${entry.id}`;+ const ok = await copyText(url);+ flashButton(button, ok ? 'Link copied' : 'Copy failed');+ announce(ok ? 'Link copied to the clipboard' : 'Copy failed');+ } else if (action === 'expand' && card) {+ const expanded = card.dataset.expanded === 'true';+ card.dataset.expanded = expanded ? 'false' : 'true';+ button.textContent = expanded ? 'Show all' : 'Show less';+ } else if (action === 'copy-all') {+ const ok = await copyText(wholeLibraryText());+ flashButton(button, ok ? 'Library copied' : 'Copy failed');+ announce(ok ? `All ${state.library.count} prompts copied` : 'Copy failed');+ } else if (action === 'reset') {+ state.query = '';+ state.category = 'all';+ state.setup = 'all';+ const input = document.getElementById('pl-search-input');+ if (input) input.value = '';+ syncUrl();+ renderChips();+ renderList();+ } else if (action === 'retry') {+ load();+ }+});++document.addEventListener('keydown', (event) => {+ if (event.key !== '/' || event.metaKey || event.ctrlKey || event.altKey) return;+ const tag = (event.target.tagName || '').toLowerCase();+ if (tag === 'input' || tag === 'textarea' || event.target.isContentEditable) return;+ const input = document.getElementById('pl-search-input');+ if (!input) return;+ event.preventDefault();+ input.focus();+ input.select();+});++async function load() {+ renderLoading();+ try {+ const res = await fetch(SOURCE, { headers: { accept: 'application/json' } });+ if (!res.ok) throw new Error(`The server answered ${res.status}.`);+ const data = await res.json();+ if (!data || !Array.isArray(data.prompts) || !data.prompts.length) {+ throw new Error('The library came back empty.');+ }+ state.library = data;+ renderShell();+ } catch (err) {+ renderError(err && err.message ? err.message : 'Something went wrong.');+ }+}++load();diff --git a/tests/prompt-library.test.js b/tests/prompt-library.test.jsnew file mode 100644index 000000000..752c3973a--- /dev/null+++ b/tests/prompt-library.test.js@@ -0,0 +1,111 @@+import { describe, it, expect } from 'vitest';+import { readFileSync } from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const read = (rel) => readFileSync(path.join(root, rel), 'utf8');++const library = JSON.parse(read('data/prompt-library.json'));+const published = JSON.parse(read('public/prompts.json'));+const text = read('public/prompts.txt');+const pages = JSON.parse(read('data/pages.json'));++const routes = new Set();+for (const section of pages.sections) for (const page of section.pages) routes.add(page.path);++describe('prompt library data', () => {+ it('has a prompt in every category and a category for every prompt', () => {+ const categories = new Set(library.categories.map((c) => c.id));+ for (const entry of library.prompts) expect(categories).toContain(entry.category);+ for (const category of library.categories) {+ expect(library.prompts.some((p) => p.category === category.id)).toBe(true);+ }+ });++ it('names a setup that the page can explain', () => {+ const setups = new Set(library.setups.map((s) => s.id));+ for (const entry of library.prompts) expect(setups).toContain(entry.setup);+ });++ it('gives every prompt a unique kebab-case id usable as a deep link', () => {+ const ids = library.prompts.map((p) => p.id);+ expect(new Set(ids).size).toBe(ids.length);+ for (const id of ids) expect(id).toMatch(/^[a-z0-9]+(-[a-z0-9]+)*$/);+ });++ it('closes every <placeholder> it opens, so nobody pastes a half-written slot', () => {+ for (const entry of library.prompts) {+ const body = entry.prompt.join('\n');+ expect((body.match(/</g) || []).length).toBe((body.match(/>/g) || []).length);+ }+ });++ it('links only to routes the site actually declares', () => {+ for (const entry of library.prompts) {+ for (const link of entry.links || []) {+ if (!link.href.startsWith('/')) {+ expect(link.href.startsWith('https://')).toBe(true);+ continue;+ }+ expect(routes.has(link.href) || link.href.startsWith('/api/')).toBe(true);+ }+ }+ });++ it('keeps the stop-for-confirmation line on every prompt that can spend money', () => {+ const spenders = library.prompts.filter((p) => p.setup === 'wallet');+ expect(spenders.length).toBeGreaterThan(0);+ for (const entry of spenders) {+ const body = entry.prompt.join('\n').toLowerCase();+ const guarded =+ body.includes('stop and wait') ||+ body.includes('do not pay') ||+ body.includes('do not move any funds') ||+ body.includes('until i have confirmed');+ expect(guarded, `${entry.id} may spend without asking`).toBe(true);+ }+ });++ it('writes prompts as an array of lines so a diff shows the line that changed', () => {+ for (const entry of library.prompts) {+ expect(Array.isArray(entry.prompt)).toBe(true);+ expect(entry.prompt.length).toBeGreaterThan(0);+ }+ });++ it('avoids the banned dash glyphs in copy that lands in someone else editor', () => {+ for (const entry of library.prompts) {+ const copy = [entry.title, entry.summary, entry.returns, entry.prompt.join('\n')].join('\n');+ expect(copy).not.toMatch(/[\u2014\u2013]/);+ }+ });+});++describe('published prompt library', () => {+ it('carries every source prompt with the body joined into one string', () => {+ expect(published.count).toBe(library.prompts.length);+ expect(published.prompts).toHaveLength(library.prompts.length);+ for (const entry of library.prompts) {+ const shipped = published.prompts.find((p) => p.id === entry.id);+ expect(shipped).toBeTruthy();+ expect(shipped.prompt).toBe(entry.prompt.join('\n'));+ }+ });++ it('counts each category and setup so the filter chips can show a number', () => {+ for (const category of published.categories) {+ expect(category.count).toBe(library.prompts.filter((p) => p.category === category.id).length);+ }+ for (const setup of published.setups) {+ expect(setup.count).toBe(library.prompts.filter((p) => p.setup === setup.id).length);+ }+ });++ it('ships a plain-text copy that holds every prompt', () => {+ for (const entry of library.prompts) {+ expect(text).toContain(entry.title);+ expect(text).toContain(entry.prompt[0]);+ }+ });+});