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.mdstarts with YAML frontmatter containingname(must match the directory name) anddescription. - Optional frontmatter keys are
license,compatibility,metadata(string map), andallowed-tools. - Omit
skillsfromdefineAppto loadskills/automatically. If you supply an explicitskillsarray indefineApp(including[]), it replaces automatic discovery—callfolderSkills({ files: ctx.files })(or{ files: ctx.files, path: "guides" }) fromapps/skillsto 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 declaresgithub.comandraw.githubusercontent.com) a private repository.wellKnownSkills({ url, cache: ctx.cache, signal: ctx.signal })reads/.well-known/agent-skills/index.jsonand its listed UTF-8 files.skillReader({ service, fetch: ctx.fetch, signal: ctx.signal })builds a custom remote loader with the same byte budgets and safeSkillLoadFailederrors.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 istools-<path>(for exampletools-issues). Paths with capitals,_,-, or more than 64 characters receive a slug plus a hash. - Avoid naming your own skills
toolsortools-...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:
namemust be lowercase alphanumeric with single separating hyphens (a-z,0-9,-), at most 64 characters, and match its folder name.descriptionmust be non-empty and at most 1,024 characters;compatibilityis 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-toolsin 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.cacheto remote loaders. Cached skill catalogs default tofreshFor5 minutes andstaleFor1 day; pastfreshFor, Executor checks whether the remote publication changed before serving it.