SKILL.md instruction file with optional supporting resources. The prompt lists enabled skill descriptions; the model calls read_skill when it needs the full instructions. Reading a script returns its text—it does not execute it.
Configure AgentConfig.SkillClient with pkg/agents/skills. Each agent can have its own global sources while sharing a namespace-scoped user library.
Write a skill
Createskills/release-review/SKILL.md:
Attach developer-owned skills
Withmodel configured, import pkg/agents/skills and pkg/agents/prompts:
WithGlobalSkills returns a copy of the client sharing its user store. Globals are always enabled, cannot be disabled by the user, and take precedence over a user skill with the same name. Duplicate names across global sources are a configuration error.
Add a user library
SkillClient: client on the agent. Its globals are combined with the skills stored under Input.Namespace. The store is shared across agents; the agent name does not create a separate library. An empty namespace passed directly to the client lists globals only.
User skills are enabled by default. Disable selected names for one execution with agents.SkillSelection:
Enable list. Unknown disabled names are ignored, and global skills remain enabled. Send the selection on each new turn and approval resume; handoffs and background continuations inherit the originating run’s selection. Disabling a skill does not remove instructions already read into history.
Read and extend the catalog
Useagent.ListSkills(ctx, namespace, runContext, selection) for a picker with Global and Enabled flags. The agent refreshes its catalog when entering a run, fixes the enabled names and resource allowlist for that execution, and resolves content when it is read. A listing error fails the run. Use versioned custom storage if reads must remain pinned to one content version.
The read_skill tool accepts the exact skill name and an optional file. An omitted file returns instructions without frontmatter; file: "SKILL.md" returns the original file. Other reads are limited to the listed resources.
Implement skills.Source for a custom global source (List, Read), or implement the consumer-owned agents.SkillClient:
RunContext["Namespace"] has no special meaning. Clients must support concurrent calls. Temporal and Restate perform listing and reading inside activities or durable steps.
See Skill storage and management for uploads, S3, management routes, and caching.