Agent skill

Agents SDK

by swyxio in swyxio/skills

Build or debug stateful applications that specifically use Cloudflare's agents package, including Agent classes, routing, callable methods, synchronized state, scheduling, AIChatAgent, durable…

MITAuto-check passed

Install Agents SDK

skills CLI
$ npx skills add swyxio/skills --skill agents-sdk -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swyxio/skills agents-sdk --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swyxio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents-sdk .claude/skills/agents-sdk && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agents-sdk
GitHub stars
175
Token cost
~982 tokens
SKILL.md length
375 words
Files
20 (incl. references)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Build or debug stateful applications that specifically use Cloudflare's agents package, including Agent classes, routing, callable methods, synchronized state, scheduling, AIChatAgent, durable…

  • Works in 4 steps: Read the project's package version,… → Retrieve the current docs for the… → Inspect installed exports and .d.ts… → …
  • Generic AI-agent design
  • SKILL.md covers Inspect first, Preserve the runtime contract, Load only the relevant reference and Verify proportionally
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Agents SDK is an agent skill from swyxio/skills. Build or debug stateful applications that specifically use Cloudflare's agents package, including Agent classes, routing, callable methods, synchronized state, scheduling, AIChatAgent, durable execution, or Agents SDK client hooks. Do not trigger for generic AI-agent design, the OpenAI Agents SDK, or ordinary Durable Object work that does not use the Cloudflare Agents SDK.

Its SKILL.md is about 980 tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files, including reference files (for example `references/browse-the-web.md`, `references/callable.md` and `references/client-sdk.md`).

It works with Cloudflare and OpenAI Agents SDK. The repository describes itself as: Agent skills for Claude Code and other AI agents. The licence is MIT.

When your agent uses it

  • Generic AI-agent design
  • The OpenAI Agents SDK
  • Ordinary Durable Object work that does not use the Cloudflare Agents SDK

Example prompts

  • “/agents-sdk”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read the project's package version, Wrangler configuration, Agent exports,
  2. Retrieve the current docs for the feature being changed.
  3. Inspect installed exports and .d.ts files before adding casts or adapters.
  4. Identify the Agent instance name and who is authorized to select it. Instance

What it can do on your machine

Read from SKILL.md and the folder at commit 038ef34. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agents SDK loads about 982 tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 375 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~982
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from swyxio/skills at commit 038ef34, republished under its MIT licence (© swyxio). 375 words, ~982 tokens.

Download SKILL.mdSave it as .claude/skills/agents-sdk/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
agents-sdk
description
Build or debug stateful applications that specifically use Cloudflare's `agents` package, including Agent classes, routing, callable methods, synchronized state, scheduling, AIChatAgent, durable execution, or Agents SDK client hooks. Do not trigger for generic AI-agent design, the OpenAI Agents SDK, or ordinary Durable Object work that does not use the Cloudflare Agents SDK.

Cloudflare Agents SDK

Use current Cloudflare documentation and the installed agents package as the contract. APIs in this SDK evolve quickly; do not trust remembered signatures or examples without checking the relevant version.

Inspect first

  1. Read the project's package version, Wrangler configuration, Agent exports, routing entrypoint, and generated binding types.
  2. Retrieve the current docs for the feature being changed.
  3. Inspect installed exports and .d.ts files before adding casts or adapters.
  4. Identify the Agent instance name and who is authorized to select it. Instance naming is a state-partition and access-control decision, not just a URL detail.

Agents require Durable Objects. Verify the exact class export, binding, and lifecycle declaration used by the target environment. Do not copy a migration or configuration example without checking the current lifecycle model.

Preserve the runtime contract

  • Treat persisted Agent state, connection state, scheduled work, and client UI state as separate surfaces.
  • Validate client-originated state and callable methods at the server boundary; a callable method is not authorization by itself.
  • Use stable operation identities for work that may be retried or resumed.
  • Distinguish ordinary request work from SDK durable-execution primitives. Use the latter only when work must survive Durable Object eviction or restart.
  • Expect the Agent constructor and in-memory state to be recreated. Persist anything required after eviction.
  • Keep routing and client naming consistent. Test the actual route through routeAgentRequest or the project's custom router.
  • Treat experimental integrations as version-specific. Pin and test the seam rather than spreading preview types through domain code.
Show full SKILL.md (124 more words)Show less

Load only the relevant reference

NeedReference
State, SQL, schedules, or alarmsstate-scheduling.md
Callable RPC, streaming, or timeoutscallable.md
Routing, bindings, or project setuprouting.md, configuration.md
React/browser clients or chat streamingclient-sdk.md, streaming-chat.md
Server-driven turns or approval flowsserver-driven-messages.md, human-in-the-loop.md
Workflows, fibers, queues, or retriesworkflows.md, durable-execution.md, queue-retries.md
MCP, email, webhooks, push, or observabilitymcp.md, email.md, webhooks-push.md, observability.md
Preview featuresthink.md, voice.md, codemode.md, browse-the-web.md

Read current first-party docs before relying on limits, package names, configuration fields, or experimental availability.

Verify proportionally

Run the narrow type, route, and state tests for the changed seam. For connection or recovery behavior, test disconnect/reconnect and a recreated Agent instance. For scheduled or durable work, prove that duplicate delivery converges and that the persisted result—not an in-memory flag—defines completion.

© swyxio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (references) in agents-sdk of swyxio/skills.

  • SKILL.md
  • references/browse-the-web.md
  • references/callable.md
  • references/client-sdk.md
  • references/codemode.md
  • references/configuration.md
  • references/durable-execution.md
  • references/email.md
  • references/human-in-the-loop.md
  • references/mcp.md
  • references/observability.md
  • references/queue-retries.md
  • references/routing.md
  • references/server-driven-messages.md
  • references/state-scheduling.md
  • references/streaming-chat.md
  • references/think.md
  • references/voice.md
  • references/webhooks-push.md
  • references/workflows.md

Open the folder on GitHubat commit 038ef34

Compare with similar skills

Agents SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agents SDK compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agents SDK this skillswyxio/skills175—~982Automated safety check: PassMIT
Mem0 Platform SDKmem0ai/mem067k2 repos~2.2kAutomated safety check: PassApache-2.0
Cloudflare Browser Renderingcloudflare/moltworker9.9k—~742Automated safety check: PassApache-2.0
Turnstile Spincloudflare/skills3k4 repos~7.2kAutomated safety check: NotesApache-2.0
Star Office UI Setupringhyacinth/Star-Office-UI7.5k—~1.3kAutomated safety check: PassMIT
Cloudflarehodgef/apiker1277 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • Adds persistent memory to AI apps with the Mem0 Python and TypeScript SDKs: store, search, update and delete user memories, with framework integrations.

    67k GitHub starsUsed in 2 repos~2.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Cloudflare Browser Rendering

    cloudflare/moltworker

    Official

    Drives headless Chrome through Cloudflare Browser Rendering over a CDP WebSocket to take screenshots, navigate and scrape pages, and record multi-page videos.

    9.9k GitHub stars~742 tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Turnstile Spin

    cloudflare/skills

    Official

    Set up, repair, or migrate to Cloudflare Turnstile bot verification in an existing frontend and backend, including server-side Siteverify.

    3k GitHub starsUsed in 4 repos~7.2k tokens
    Frontend & DesignAuto-check: notes
  • Star Office UI Setup

    ringhyacinth/Star-Office-UI

    Sets up Star Office UI, a pixel-art office dashboard that shows AI agent states, lets other agents join and can be opened from a phone or a public link.

    7.5k GitHub stars~1.3k tokensUpdated 7 mo ago
    Agent WorkflowsAuto-check passed
  • Cloudflare

    hodgef/apiker

    Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF…

    127 GitHub starsUsed in 7 repos~2.2k tokens
    DevOps & CloudAuto-check passed
  • Build, review, debug, reverse-engineer, and package WebHome injected extension scripts for FongMi/WebHome App WebView pages.

    1.7k GitHub stars~2.8k tokensUpdated today
    SecurityAuto-check passed

More from swyxio/skills

All 89 skills in this repo
  • Programmatic Agents

    swyxio/skills

    Run a selected coding-agent CLI programmatically, with latency, error, usage, cost, and trace logging.

    175 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Design, implement, audit, or refresh protected username and handle namespaces for public products.

    175 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    175 GitHub stars~4.3k tokensUpdated 3 days ago
    Auto-check passed
  • Youtube API

    swyxio/skills

    Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

    175 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Batch YouTube Studio upload workflow for videos sourced from Airtable, Google Drive, Loom, YouTube, or local files.

    175 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check: warnings
  • Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects.

    175 GitHub stars~1.8k tokensUpdated 3 days ago
    Auto-check passed

Questions about Agents SDK

What does Agents SDK do?

Build or debug stateful applications that specifically use Cloudflare's agents package, including Agent classes, routing, callable methods, synchronized state, scheduling, AIChatAgent, durable…. Agents SDK is an agent skill from swyxio/skills. Build or debug stateful applications that specifically use Cloudflare's agents package, including Agent classes, routing, callable methods, synchronized state, scheduling, AIChatAgent, durable execution, or Agents SDK client hooks.

When should I use Agents SDK?

Agents SDK fits situations like: generic AI-agent design; the OpenAI Agents SDK; ordinary Durable Object work that does not use the Cloudflare Agents SDK.

How do I install Agents SDK in Claude Code?

Run `npx skills add swyxio/skills --skill agents-sdk -a claude-code`. Or copy the skill folder (agents-sdk in swyxio/skills) into .claude/skills/agents-sdk in your project. Claude Code loads it when a task matches its description.

How do I install Agents SDK in Codex?

Run `npx skills add swyxio/skills --skill agents-sdk -a codex`. Or copy the skill folder (agents-sdk in swyxio/skills) into .agents/skills/agents-sdk in your project. Codex loads it when a task matches its description.

Can I use Agents SDK in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swyxio/skills --skill agents-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agents-sdk, .gemini/skills/agents-sdk, .github/skills/agents-sdk and .opencode/skills/agents-sdk in your project.

What does Agents SDK need to run?

SKILL.md names no scripts, command-line tools or credentials: Agents SDK is instructions for the agent only.

Does Agents SDK access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agents SDK safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agents SDK use?

Agents SDK is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agents SDK use?

About 982 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Agents SDK?

Skills that share tags, products or a category with Agents SDK: Mem0 Platform SDK (mem0ai/mem0, 67k stars), Cloudflare Browser Rendering (cloudflare/moltworker, 9.9k stars), Turnstile Spin (cloudflare/skills, 3k stars) and Star Office UI Setup (ringhyacinth/Star-Office-UI, 7.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agents SDK?

swyxio (a GitHub user) maintains it in swyxio/skills, which has 175 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 5, 2026.

Source: swyxio/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.