Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/nirholas/three.ws/scaffold-agentgit clone --depth 1 https://github.com/nirholas/three.wsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/nirholas/three.ws/scaffold-agent)<a href="https://agentmods.dev/commands/nirholas/three.ws/scaffold-agent"><img src="https://agentmods.dev/badge/commands/nirholas/three.ws/scaffold-agent.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.00892 |
| Opus 5 | $0.00021 | $0.00446 |
| Sonnet 5 | $0.00008 | $0.00178 |
| Haiku 4.5 | $0.00004 | $0.00089 |
Grade A, and why
scaffold-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are scaffolding a new three.ws agent into the user's project. The argument $ARGUMENTS is the agent name (default: MyAgent if blank).
Step 1 — Detect project type
Check the current working directory for:
package.json→ Node.js / browser projectvite.config.*→ Vite frontendnext.config.*→ Next.js- No package.json → standalone HTML
Read package.json if present to understand the existing stack.
Step 2 — Install dependencies
For Node.js projects, run:
npm install @three-ws/sdk @x402/mcp @modelcontextprotocol/sdk/client
If the project uses a lockfile other than package-lock.json (yarn.lock → yarn, pnpm-lock.yaml → pnpm), use the right package manager.
Step 3 — Create the agent entry file
Create agent.js (or agent.ts if TypeScript is detected) in the project root with this structure, substituting $ARGUMENTS for the agent name:
import { AgentKit } from '@three-ws/sdk';
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
// Connect to the three.ws paid MCP tools
const transport = new StdioClientTransport({
command: 'npx',
args: ['-y', '@three-ws/mcp-server'],
env: {
MCP_EVM_PAYMENT_ADDRESS: process.env.EVM_WALLET_ADDRESS ?? '',
MCP_SVM_PAYMENT_ADDRESS: process.env.SOLANA_WALLET_ADDRESS ?? '',
},
});
const mcp = new Client({ name: '<AgentName>', version: '1.0.0' });
await mcp.connect(transport);
// Mount the three.ws chat + avatar panel
const agent = new AgentKit({
name: '<AgentName>',
description: 'A three.ws AI agent',
endpoint: process.env.AGENT_ENDPOINT ?? 'http://localhost:3000',
onMessage: async (text, context) => {
// Your LLM call goes here — replace with Anthropic, OpenAI, or Vercel AI SDK
return `Echo: ${text}`;
},
});
// Use paid MCP tools
export async function getPose(prompt) {
const result = await mcp.callTool('get_pose_seed', { prompt });
return JSON.parse(result.content[0].text);
}
export async function getTokenSnapshot(mint) {
const result = await mcp.callTool('pump_snapshot', { mint });
return JSON.parse(result.content[0].text);
}
export { agent, mcp };
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 114 lines · 42 tokens per session scan A c3820138b4cd
scaffold-agent is a command published in the GitHub repository nirholas/three.ws (110 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 892 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
pr
Generate a pull request description for the current branch.
reskin
Extract a measured design signature (type ramp, accent + its budget, grid unit, radius, layout) from a reference image or site, write it to signature.json, and drive the build to match it — "steal this vibe" as a spec, not pixels.
assign
Assign a tiny.place agent to this session and remember it across restarts.
pay
Universal Crypto MCP API Reference v1.0.0.
kh_auth
Command "kh_auth" from KeeperHub/keeperhub, covering kh auth, examples, options, options inherited from parent commands and see also.
kh_config_list
Command "kh_config_list" from KeeperHub/keeperhub, covering kh config list, examples, options, options inherited from parent commands and see also.