Skip to content
Documentation
On this page

Ship skills with an app

Bundle Agent Skills in skills/<name>/SKILL.md, load skills lazily with dynamicSkills, or publish router instructions in an Executor app.

An Executor app can ship Agent Skills (Markdown instructions and reference files) that agents read through the MCP skills tool. Put skill directories under skills/<name>/SKILL.md for automatic discovery, load remote collections lazily with dynamicSkills, githubSkills, and wellKnownSkills from apps/skills, or attach instructions to a router. App skills work on Local, Self-host, and Cloud.

The step that matters most: add skills/<skill-name>/SKILL.md with YAML name and description frontmatter to your app directory and deploy—when defineApp omits skills, Executor loads every skill folder under skills/ automatically.

Prerequisites and permissions: an app you can edit and deploy (Local owner, or app creator / organization admin or owner on Cloud and Self-host; see Build an app).

You’ll know it worked when… after deploying, the skill appears on the app’s Skills tab in the dashboard and executor skills --app <app-slug> --name <skill-name> (or the MCP skills tool) returns your SKILL.md content.

How to use it

Skill files and loaders work the same way on Local, Self-host, and Cloud.

1. Ship a packaged skills/ folder

Create one folder per skill under skills/ containing a required SKILL.md and any optional UTF-8 text reference files (for example skills/triage/SKILL.md and skills/triage/examples.md):

  • Each SKILL.md starts with YAML frontmatter containing name (must match the directory name) and description.
  • Optional frontmatter keys are license, compatibility, metadata (string map), and allowed-tools.
  • Omit skills from defineApp to load skills/ automatically. If you supply an explicit skills array in defineApp (including []), it replaces automatic discovery—call folderSkills({ files: ctx.files }) (or { files: ctx.files, path: "guides" }) from apps/skills to include packaged folders alongside other skills.

2. Load remote skills lazily with dynamicSkills

To load skills from GitHub, a well-known directory index, or a custom remote source without slowing down or breaking tool calls when the upstream source is unreachable, return dynamicSkills({ list: async () => ... }) in defineApp:

  • githubSkills({ repo, path?, ref?, account?, token?, cache: ctx.cache, signal: ctx.signal }) reads a public repository or (with an account and token whose provider declares github.com and raw.githubusercontent.com) a private repository.
  • wellKnownSkills({ url, cache: ctx.cache, signal: ctx.signal }) reads /.well-known/agent-skills/index.json and its listed UTF-8 files.
  • skillReader({ service, fetch: ctx.fetch, signal: ctx.signal }) builds a custom remote loader with the same byte budgets and safe SkillLoadFailed errors.
  • fileSkill(files) parses an array of { path, content } objects into one skill.

3. Publish router instructions as skills

Setting instructions on router(children, { instructions: "..." }) automatically publishes a skill:

  • The root router’s skill is named tools; a nested router’s skill is tools-<path> (for example tools-issues). Paths with capitals, _, -, or more than 64 characters receive a slug plus a hash.
  • Avoid naming your own skills tools or tools-... unless you intend to replace a router’s instructions.

Example

Add skills/triage/SKILL.md beside index.ts and package.json:

---
name: triage
description: "How to search, label, and escalate incoming support issues."
---

# Issue triage

1. Call `issues.list` first to check for duplicates before creating an issue.
2. Never close an issue you did not open unless the user confirms.
3. Read `severity.md` for escalation criteria.

To combine packaged skills/ with lazy remote skills from GitHub, use folderSkills and dynamicSkills:

import { defineApp, dynamicSkills, router } from "apps";
import { folderSkills, githubSkills } from "apps/skills";

export default defineApp({}, async ({ cache, files, signal }) => ({
  tools: router({}),
  skills: await folderSkills({ files }),
  dynamicSkills: dynamicSkills({
    list: () =>
      githubSkills({
        repo: "example-org/agent-playbooks",
        path: "skills",
        cache,
        signal,
      }),
  }),
}));

Limits

  • Skill format rules: name must be lowercase alphanumeric with single separating hyphens (a-z, 0-9, -), at most 64 characters, and match its folder name. description must be non-empty and at most 1,024 characters; compatibility is at most 500 characters. Skill names must be unique across static and dynamic catalogs.
  • Text files only; never executed: skill files must be UTF-8 text. Reading a skill file never executes scripts or grants permissions. In particular, allowed-tools in frontmatter is informational metadata only and never grants execution authority or bypasses tool approvals.
  • Packaged vs remote budgets: packaged skill files count toward the app’s 16 MiB source limit (see Build an app). Remote loaders (githubSkills, wellKnownSkills, skillReader) enforce up to 1,000 files, 2,000,000 bytes (2 MB) per file, 20,000,000 bytes (20 MB) total, and 8 concurrent requests.
  • Caching remote skills: pass cache: ctx.cache to remote loaders. Cached skill catalogs default to freshFor 5 minutes and staleFor 1 day; past freshFor, Executor checks whether the remote publication changed before serving it.

Was this page helpful?