Agent Skills: On-Demand Instructions, Bundles, and Runtime Tools
What agent skills are, how SKILL.md bundles work, and how Cloudflare Think and Perplexity Agent API load skills on demand without bloating every prompt.
Agent skills are structured, task-specific instructions (plus optional references and scripts) that an agent discovers by name and description, then loads only when the task matches. Most of this page follows Agent Skills on Cloudflare Workers and Skills on the Perplexity Agent API. The same idea appears across coding agents that read SKILL.md files from a skills directory, as described in the Agent Skills Standard referenced from Brave Search skills documentation.
Agent skills: what they are and when to use them
Section titled “Agent skills: what they are and when to use them”Agent skills answer the question “how do I give my agent long runbooks without pasting them into every chat?” A skill source exposes a catalog (titles and descriptions) to the model; full instructions enter the context only after the model chooses to load or activate that skill.
Agent Skills are on-demand instructions, resources, and scripts. A skill source provides a catalog of skill names and descriptions; the agent adds that catalog to the system prompt and exposes tools the model can use when a user task matches a skill — so a large library of capabilities does not bloat every prompt.
— Cloudflare, Agent Skills
Perplexity describes the same pattern as progressive disclosure: the request carries an index of names and descriptions; the model calls load_skill when relevant.
Skills give the agent domain expertise on demand. The model sees each skill by name and description, and loads the full instructions only when it decides they are needed — a progressive disclosure pattern described in Designing, Refining, and Maintaining Agent Skills.
— Perplexity, Skills
Use skills for procedures, reference guides, templates, and bundled scripts. Use always-on system prompts or short writable context for behavior that must apply every turn. Use custom actions or tools when the model must call your APIs with a fixed schema (see Actions and Think tools).
| Approach | What the model sees up front | Best for |
|---|---|---|
| Agent skill | Name + description only until loaded | Large runbooks, multi-file playbooks |
| Writable context (Sessions) | Full content when configured | Short notes, preferences |
Loadable skill block (load_context) |
Metadata listing with [loadable] tag |
Whole documents from SkillProvider (conversation state) |
Custom tool / action() |
Tool schema every turn | Refunds, search, external APIs |
SKILL.md bundles: folder layout and frontmatter
Section titled “SKILL.md bundles: folder layout and frontmatter”Custom and bundled skills typically ship as a folder per skill with a required SKILL.md. Perplexity requires a ZIP with exactly one top-level folder and one SKILL.md; Cloudflare’s Vite plugin expects one child directory per skill under ./skills.
Perplexity reads name and description from the bundle’s frontmatter, not from separate API fields on create:
Creates a skill from a zip bundle. The bundle must contain a SKILL.md that provides the skill name and description; those fields are read from the bundle, not from the request.
— Perplexity, Create a skill
Example layout from Perplexity’s authoring guide:
fact-check/├── SKILL.md├── scripts/│ └── check_factcheck.py└── references/ └── verification-rubric.mdCloudflare’s bundled layout mirrors the idea:
src/skills/release-notes/SKILL.mdsrc/skills/release-notes/scripts/format-release-notes.tssrc/skills/release-notes/references/style-guide.mdHow to write the description (routing trigger)
Section titled “How to write the description (routing trigger)”The description is what the model uses to decide whether to load the skill. Perplexity treats it as a guard as well—state when not to load to protect step budget.
The description is the routing trigger. Write it to tell the model when to load the skill.
— Perplexity, Skills
For hosted API skills, name is 1–64 lowercase ASCII letters, digits, and single hyphens; description is 1–1,024 bytes (Skills).
Cloudflare Think: register sources and skill tools
Section titled “Cloudflare Think: register sources and skill tools”On Cloudflare, @cloudflare/think wires getSkills() into each turn and exposes skill tools when skills are registered.
getSkills(): bundled, R2, and manifest sources
Section titled “getSkills(): bundled, R2, and manifest sources”Bundled skills are usually imported with the Agents Vite plugin:
— Cloudflare, Using skills with Think
The agents:skills import resolves to ./skills beside the importing file; use agents:skills/<dir> for a different sibling folder. Sources apply in order; the first registration for a skill name wins; duplicates or failing sources are skipped with a logged warning (Agent Skills).
Skill tools the model can call
Section titled “Skill tools the model can call”When skills are available, Think exposes:
| Tool | Purpose |
|---|---|
activate_skill |
Load a matching skill’s instructions and bundled resource list |
read_skill_resource |
Read a bundled resource by { name, path } or skill-name/path |
run_skill_script |
Run a bundled script when getSkillScriptRunner() returns a runner |
Skills are not always-on system prompt text. Use getSystemPrompt() or a Session context block for behavior that should apply to every turn. Use skills for task-specific procedures, references, scripts, templates, and assets that should be loaded only when relevant.
— Cloudflare, Skill tools
On every turn, Think merges workspace tools, getTools(), session tools, skill tools, and others (Think tools; Getting started).
Script execution limits and workspace
Section titled “Script execution limits and workspace”run_skill_script is opt-in and needs a Worker Loader binding (worker_loaders with binding: "LOADER"). skills.runner() is experimental and runs JavaScript, TypeScript, Python, and Bash under scripts/, with a default timeout of 30 seconds; workspace access is gated (Script execution).
Think agents use a @cloudflare/computer Workspace for filesystem tools and skill scripts (this.workspace); @cloudflare/shell and createExecuteTool are deprecated (Think agents now use a @cloudflare/computer workspace).
Publishing skills to local coding agents
Section titled “Publishing skills to local coding agents”Cloudflare documents installing shared skill folders for Claude Code, Cursor, and others via Cloudflare’s own MCP servers and Docs for agents. Chrome’s DevTools CLI describes wrapping a repeatable browser script as a lightweight skill so the agent pays token cost only when the task matches.
Perplexity Agent API: built-in, inline, and custom skills
Section titled “Perplexity Agent API: built-in, inline, and custom skills”Perplexity accepts up to 16 skills per request, combined as built-in catalog entries, inline definitions, or uploaded custom skills (Skills).
| Stage | What the model sees |
|---|---|
| Discovery | Index of each selected skill’s name and description |
| Load | Model calls load_skill; full instructions enter context |
| Files | Built-in and custom skills expose files in the sandbox under a directory named for the skill |
Built-in and inline skills
Section titled “Built-in and inline skills”Built-in office skills are selected with JSON such as { "type": "builtin", "name": "office/pdf" } (Skills). Inline skills carry instructions in the request (1–65,536 bytes) and have no files or reusable library.
Custom skills and versioning
Section titled “Custom skills and versioning”Custom skills reference { "type": "custom", "id": "skill_..." } and are scoped to the Project that owns the API key. Each upload creates an immutable revision; use expected_revision on update and delete to avoid racing concurrent writes (Add a skill revision; Delete a skill).
Omitting version (or passing “latest”) selects the newest version, resolved once when the request is accepted — an upload made mid-run does not change what a running response loads.
— Perplexity, Skills — Versioning
Set max_steps high enough for load plus work: a one-step run can load a skill but never act on it (Skills — How skills work).
Upload limits (custom bundles)
Section titled “Upload limits (custom bundles)”From Skills — Limits:
- 32 MiB total (ZIP and decompressed)
- 100 files maximum
- Exactly one top-level folder and one
SKILL.md - Up to 500 custom skills per project
- HTTP 413 if bundle exceeds size; 409 on revision conflict or skill limit
Manage custom skills with the Perplexity HTTP API
Section titled “Manage custom skills with the Perplexity HTTP API”All endpoints use Authorization: Bearer <token> and multipart upload of the ZIP as file where noted.
| Operation | Method | Endpoint |
|---|---|---|
| Create | POST |
/v1/skills (Create a skill) |
| List | GET |
/v1/skills (List skills) |
| Get | GET |
/v1/skills/{skill_id} (Get a skill) |
| Update | PUT |
/v1/skills/{skill_id}?expected_revision=... (Add a skill revision) |
| List revisions | GET |
/v1/skills/{skill_id}/revisions (List skill revisions) |
| Download URL | GET |
/v1/skills/{skill_id}/download (Get a skill download URL) |
| Delete | DELETE |
/v1/skills/{skill_id}?expected_revision=... (Delete a skill) |
Example create (from Skills):
curl https://api.perplexity.ai/v1/skills \ -H "Authorization: Bearer $PERPLEXITY_API_KEY" \ -F "file=@YOUR_SKILL.zip;type=application/zip" | jqThe Build an incident responder with Profiles, Skills, and Managed Connectors cookbook shows uploading a ZIP through the API Portal without extracting it.
Install skills in coding agents (SKILL.md on disk)
Section titled “Install skills in coding agents (SKILL.md on disk)”Many agents follow the same standard: one folder per skill containing SKILL.md. Brave Search skills documentation lists install paths—for example Cursor project-level .cursor/skills/ and user-level ~/.cursor/skills/, with optional Remote Rule or npx openskills install.
Cloudflare’s table for copying from cloudflare/skills includes Cursor at ~/.cursor/skills/ and Claude Code at ~/.claude/skills/.
Common conclusion: whether skills live on disk (Cursor, Claude Code), in R2 (Cloudflare), or in Perplexity’s Project store, the model should see metadata first and full instructions only on load, using a clear description as the routing trigger.
Skills compared to actions and workspace tools
Section titled “Skills compared to actions and workspace tools”Actions (action() in getActions()) are schema-validated tools with execute, default 30s timeoutMs, truncated JSON output, and structured errors—ideal for deterministic side effects (Actions).
Skills package human-readable procedures and files; workspace tools from @cloudflare/computer let the model read and edit files in a Durable Object SQLite workspace (File system). Enterprise patterns describe a central read-only skill library layered over workspace-local overrides (Enterprise AI agent workspace).
Common mistakes
Section titled “Common mistakes”- Putting always-on policy in skills instead of
getSystemPrompt()or session context (Skill tools). - Vague descriptions so the model never loads—or loads—the wrong skill (Skills).
max_steps: 1on Perplexity Agent API requests that need work afterload_skill(Skills).- Updating a Perplexity skill without
expected_revision, then ignoring HTTP 409 (Add a skill revision). - Duplicate skill names across sources on Cloudflare; only the first source wins (Agent Skills).
- Enabling
run_skill_scriptwithoutLOADERandgetSkillScriptRunner()(Script execution).
How to check this on your site
Section titled “How to check this on your site”-
Confirm your bundle has one top-level folder, a single
SKILL.md, and validname/descriptionfrontmatter, then create or update via Create a skill or Add a skill revision and verify HTTP 201/200 (not 400, 413, or 409). -
List Project skills with List skills and check
latest_revisionmatches what you pass asexpected_revisionon the next write. -
Download the active bundle with Get a skill download URL and inspect that
SKILL.mdmatches what you uploaded. -
For Cloudflare Think, register sources in
getSkills(), deploy with the Agents Vite plugin if usingagents:skills, and confirm the turn exposesactivate_skillper Agent Skills and Think tools. -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about.