Skip to content
AnswerWell geo Documentation

Research · 9 min read · Answerwell

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.md

Cloudflare’s bundled layout mirrors the idea:

src/skills/release-notes/SKILL.md
src/skills/release-notes/scripts/format-release-notes.ts
src/skills/release-notes/references/style-guide.md

How 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).

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).

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).

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 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 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).

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" | jq

The 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).

  • 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: 1 on Perplexity Agent API requests that need work after load_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_script without LOADER and getSkillScriptRunner() (Script execution).
  1. Confirm your bundle has one top-level folder, a single SKILL.md, and valid name/description frontmatter, then create or update via Create a skill or Add a skill revision and verify HTTP 201/200 (not 400, 413, or 409).

  2. List Project skills with List skills and check latest_revision matches what you pass as expected_revision on the next write.

  3. Download the active bundle with Get a skill download URL and inspect that SKILL.md matches what you uploaded.

  4. For Cloudflare Think, register sources in getSkills(), deploy with the Agents Vite plugin if using agents:skills, and confirm the turn exposes activate_skill per Agent Skills and Think tools.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

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.