[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75BJBQQBRAEJSF4RBHDY3VY":3,"skill-same:01M75BJBQQBRAEJSF4RBHDY3VY":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75BJBQQBRAEJSF4RBHDY3VY","agents-sdk",null,"Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: agents-sdk\ndescription: Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks.\n---\n\n# Cloudflare Agents SDK\n\n**STOP.** Your knowledge of the Agents SDK may be outdated. Prefer retrieval over pre-training for any Agents SDK task.\n\n## Documentation\n\nFetch current docs from `https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fagents\u002Ftree\u002Fmain\u002Fdocs` before implementing.\n\n| Topic | Doc | Use for |\n|-------|-----|---------|\n| Getting started | `docs\u002Fgetting-started.md` | First agent, project setup |\n| State | `docs\u002Fstate.md` | `setState`, `validateStateChange`, persistence |\n| Routing | `docs\u002Frouting.md` | URL patterns, `routeAgentRequest`, `basePath` |\n| Callable methods | `docs\u002Fcallable-methods.md` | `@callable`, RPC, streaming, timeouts |\n| Scheduling | `docs\u002Fscheduling.md` | `schedule()`, `scheduleEvery()`, cron |\n| Workflows | `docs\u002Fworkflows.md` | `AgentWorkflow`, durable multi-step tasks |\n| HTTP\u002FWebSockets | `docs\u002Fhttp-websockets.md` | Lifecycle hooks, hibernation |\n| Email | `docs\u002Femail.md` | Email routing, secure reply resolver |\n| MCP client | `docs\u002Fmcp-client.md` | Connecting to MCP servers |\n| MCP server | `docs\u002Fmcp-servers.md` | Building MCP servers with `McpAgent` |\n| Client SDK | `docs\u002Fclient-sdk.md` | `useAgent`, `useAgentChat`, React hooks |\n| Human-in-the-loop | `docs\u002Fhuman-in-the-loop.md` | Approval flows, pausing workflows |\n| Resumable streaming | `docs\u002Fresumable-streaming.md` | Stream recovery on disconnect |\n\nCloudflare docs: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002F\n\n## Capabilities\n\nThe Agents SDK provides:\n\n- **Persistent state** - SQLite-backed, auto-synced to clients\n- **Callable RPC** - `@callable()` methods invoked over WebSocket\n- **Scheduling** - One-time, recurring (`scheduleEvery`), and cron tasks\n- **Workflows** - Durable multi-step background processing via `AgentWorkflow`\n- **MCP integration** - Connect to MCP servers or build your own with `McpAgent`\n- **Email handling** - Receive and reply to emails with secure routing\n- **Streaming chat** - `AIChatAgent` with resumable streams\n- **React hooks** - `useAgent`, `useAgentChat` for client apps\n\n## FIRST: Verify Installation\n\n```bash\nnpm ls agents  # Should show agents package\n```\n\nIf not installed:\n```bash\nnpm install agents\n```\n\n## Wrangler Configuration\n\n```jsonc\n{\n  \"durable_objects\": {\n    \"bindings\": [{ \"name\": \"MyAgent\", \"class_name\": \"MyAgent\" }]\n  },\n  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyAgent\"] }]\n}\n```\n\n## Agent Class\n\n```typescript\nimport { Agent, routeAgentRequest, callable } from \"agents\";\n\ntype State = { count: number };\n\nexport class Counter extends Agent\u003CEnv, State> {\n  initialState = { count: 0 };\n\n  \u002F\u002F Validation hook - runs before state persists (sync, throwing rejects the update)\n  validateStateChange(nextState: State, source: Connection | \"server\") {\n    if (nextState.count \u003C 0) throw new Error(\"Count cannot be negative\");\n  }\n\n  \u002F\u002F Notification hook - runs after state persists (async, non-blocking)\n  onStateUpdate(state: State, source: Connection | \"server\") {\n    console.log(\"State updated:\", state);\n  }\n\n  @callable()\n  increment() {\n    this.setState({ count: this.state.count + 1 });\n    return this.state.count;\n  }\n}\n\nexport default {\n  fetch: (req, env) => routeAgentRequest(req, env) ?? new Response(\"Not found\", { status: 404 })\n};\n```\n\n## Routing\n\nRequests route to `\u002Fagents\u002F{agent-name}\u002F{instance-name}`:\n\n| Class | URL |\n|-------|-----|\n| `Counter` | `\u002Fagents\u002Fcounter\u002Fuser-123` |\n| `ChatRoom` | `\u002Fagents\u002Fchat-room\u002Flobby` |\n\nClient: `useAgent({ agent: \"Counter\", name: \"user-123\" })`\n\n## Core APIs\n\n| Task | API |\n|------|-----|\n| Read state | `this.state.count` |\n| Write state | `this.setState({ count: 1 })` |\n| SQL query | `` this.sql`SELECT * FROM users WHERE id = ${id}` `` |\n| Schedule (delay) | `await this.schedule(60, \"task\", payload)` |\n| Schedule (cron) | `await this.schedule(\"0 * * * *\", \"task\", payload)` |\n| Schedule (interval) | `await this.scheduleEvery(30, \"poll\")` |\n| RPC method | `@callable() myMethod() { ... }` |\n| Streaming RPC | `@callable({ streaming: true }) stream(res) { ... }` |\n| Start workflow | `await this.runWorkflow(\"ProcessingWorkflow\", params)` |\n\n## React Client\n\n```tsx\nimport { useAgent } from \"agents\u002Freact\";\n\nfunction App() {\n  const [state, setLocalState] = useState({ count: 0 });\n\n  const agent = useAgent({\n    agent: \"Counter\",\n    name: \"my-instance\",\n    onStateUpdate: (newState) => setLocalState(newState),\n    onIdentity: (name, agentType) => console.log(`Connected to ${name}`)\n  });\n\n  return (\n    \u003Cbutton onClick={() => agent.setState({ count: state.count + 1 })}>\n      Count: {state.count}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n## References\n\n- **[references\u002Fworkflows.md](references\u002Fworkflows.md)** - Durable Workflows integration\n- **[references\u002Fcallable.md](references\u002Fcallable.md)** - RPC methods, streaming, timeouts\n- **[references\u002Fstate-scheduling.md](references\u002Fstate-scheduling.md)** - State persistence, scheduling\n- **[references\u002Fstreaming-chat.md](references\u002Fstreaming-chat.md)** - AIChatAgent, resumable streams\n- **[references\u002Fmcp.md](references\u002Fmcp.md)** - MCP server integration\n- **[references\u002Femail.md](references\u002Femail.md)** - Email routing and handling\n- **[references\u002Fcodemode.md](references\u002Fcodemode.md)** - Code Mode (experimental)\n","# Cloudflare Agents SDK\n\n**STOP.** Your knowledge of the Agents SDK may be outdated. Prefer retrieval over pre-training for any Agents SDK task.\n\n## Documentation\n\nFetch current docs from `https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fagents\u002Ftree\u002Fmain\u002Fdocs` before implementing.\n\n| Topic | Doc | Use for |\n|-------|-----|---------|\n| Getting started | `docs\u002Fgetting-started.md` | First agent, project setup |\n| State | `docs\u002Fstate.md` | `setState`, `validateStateChange`, persistence |\n| Routing | `docs\u002Frouting.md` | URL patterns, `routeAgentRequest`, `basePath` |\n| Callable methods | `docs\u002Fcallable-methods.md` | `@callable`, RPC, streaming, timeouts |\n| Scheduling | `docs\u002Fscheduling.md` | `schedule()`, `scheduleEvery()`, cron |\n| Workflows | `docs\u002Fworkflows.md` | `AgentWorkflow`, durable multi-step tasks |\n| HTTP\u002FWebSockets | `docs\u002Fhttp-websockets.md` | Lifecycle hooks, hibernation |\n| Email | `docs\u002Femail.md` | Email routing, secure reply resolver |\n| MCP client | `docs\u002Fmcp-client.md` | Connecting to MCP servers |\n| MCP server | `docs\u002Fmcp-servers.md` | Building MCP servers with `McpAgent` |\n| Client SDK | `docs\u002Fclient-sdk.md` | `useAgent`, `useAgentChat`, React hooks |\n| Human-in-the-loop | `docs\u002Fhuman-in-the-loop.md` | Approval flows, pausing workflows |\n| Resumable streaming | `docs\u002Fresumable-streaming.md` | Stream recovery on disconnect |\n\nCloudflare docs: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002F\n\n## Capabilities\n\nThe Agents SDK provides:\n\n- **Persistent state** - SQLite-backed, auto-synced to clients\n- **Callable RPC** - `@callable()` methods invoked over WebSocket\n- **Scheduling** - One-time, recurring (`scheduleEvery`), and cron tasks\n- **Workflows** - Durable multi-step background processing via `AgentWorkflow`\n- **MCP integration** - Connect to MCP servers or build your own with `McpAgent`\n- **Email handling** - Receive and reply to emails with secure routing\n- **Streaming chat** - `AIChatAgent` with resumable streams\n- **React hooks** - `useAgent`, `useAgentChat` for client apps\n\n## FIRST: Verify Installation\n\n```bash\nnpm ls agents  # Should show agents package\n```\n\nIf not installed:\n```bash\nnpm install agents\n```\n\n## Wrangler Configuration\n\n```jsonc\n{\n  \"durable_objects\": {\n    \"bindings\": [{ \"name\": \"MyAgent\", \"class_name\": \"MyAgent\" }]\n  },\n  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyAgent\"] }]\n}\n```\n\n## Agent Class\n\n```typescript\nimport { Agent, routeAgentRequest, callable } from \"agents\";\n\ntype State = { count: number };\n\nexport class Counter extends Agent\u003CEnv, State> {\n  initialState = { count: 0 };\n\n  \u002F\u002F Validation hook - runs before state persists (sync, throwing rejects the update)\n  validateStateChange(nextState: State, source: Connection | \"server\") {\n    if (nextState.count \u003C 0) throw new Error(\"Count cannot be negative\");\n  }\n\n  \u002F\u002F Notification hook - runs after state persists (async, non-blocking)\n  onStateUpdate(state: State, source: Connection | \"server\") {\n    console.log(\"State updated:\", state);\n  }\n\n  @callable()\n  increment() {\n    this.setState({ count: this.state.count + 1 });\n    return this.state.count;\n  }\n}\n\nexport default {\n  fetch: (req, env) => routeAgentRequest(req, env) ?? new Response(\"Not found\", { status: 404 })\n};\n```\n\n## Routing\n\nRequests route to `\u002Fagents\u002F{agent-name}\u002F{instance-name}`:\n\n| Class | URL |\n|-------|-----|\n| `Counter` | `\u002Fagents\u002Fcounter\u002Fuser-123` |\n| `ChatRoom` | `\u002Fagents\u002Fchat-room\u002Flobby` |\n\nClient: `useAgent({ agent: \"Counter\", name: \"user-123\" })`\n\n## Core APIs\n\n| Task | API |\n|------|-----|\n| Read state | `this.state.count` |\n| Write state | `this.setState({ count: 1 })` |\n| SQL query | `` this.sql`SELECT * FROM users WHERE id = ${id}` `` |\n| Schedule (delay) | `await this.schedule(60, \"task\", payload)` |\n| Schedule (cron) | `await this.schedule(\"0 * * * *\", \"task\", payload)` |\n| Schedule (interval) | `await this.scheduleEvery(30, \"poll\")` |\n| RPC method | `@callable() myMethod() { ... }` |\n| Streaming RPC | `@callable({ streaming: true }) stream(res) { ... }` |\n| Start workflow | `await this.runWorkflow(\"ProcessingWorkflow\", params)` |\n\n## React Client\n\n```tsx\nimport { useAgent } from \"agents\u002Freact\";\n\nfunction App() {\n  const [state, setLocalState] = useState({ count: 0 });\n\n  const agent = useAgent({\n    agent: \"Counter\",\n    name: \"my-instance\",\n    onStateUpdate: (newState) => setLocalState(newState),\n    onIdentity: (name, agentType) => console.log(`Connected to ${name}`)\n  });\n\n  return (\n    \u003Cbutton onClick={() => agent.setState({ count: state.count + 1 })}>\n      Count: {state.count}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n## References\n\n- **[references\u002Fworkflows.md](references\u002Fworkflows.md)** - Durable Workflows integration\n- **[references\u002Fcallable.md](references\u002Fcallable.md)** - RPC methods, streaming, timeouts\n- **[references\u002Fstate-scheduling.md](references\u002Fstate-scheduling.md)** - State persistence, scheduling\n- **[references\u002Fstreaming-chat.md](references\u002Fstreaming-chat.md)** - AIChatAgent, resumable streams\n- **[references\u002Fmcp.md](references\u002Fmcp.md)** - MCP server integration\n- **[references\u002Femail.md](references\u002Femail.md)** - Email routing and handling\n- **[references\u002Fcodemode.md](references\u002Fcodemode.md)** - Code Mode (experimental)\n",{"name":5,"description":7},"main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fagents-sdk",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agisota\u002Fold-one --skill agents-sdk",{"tool":38,"command":39},"bunx","bunx skills add agisota\u002Fold-one --skill agents-sdk",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill agents-sdk","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002FSKILL.md",true,[46,52,56,60,64,68,72],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fcallable.md","REFERENCE","参考文档",2128,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002Freferences\u002Fcallable.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fcodemode.md",5431,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002Freferences\u002Fcodemode.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Femail.md",3552,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002Freferences\u002Femail.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fmcp.md",3588,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002Freferences\u002Fmcp.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fstate-scheduling.md",3799,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002Freferences\u002Fstate-scheduling.md",{"path":69,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fstreaming-chat.md",4200,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002Freferences\u002Fstreaming-chat.md",{"path":73,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fworkflows.md",3887,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fagents-sdk\u002Freferences\u002Fworkflows.md",[77,84,91,100,107,114],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":95,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]