Repository navigation
Description
What is the problem this feature would solve?
Effect already supports Agent Skills through McpServer. I’d like to use the same kind of skill bundle alongside LanguageModel in a local agent, where tool calls can read the skill’s instructions and supporting files. Today, an app needs its own representation for that local use case.
What is the feature you are proposing to solve the problem?
Expose a standalone Skill module. The API I’d like to keep from the prototype is the ability to create one immutable snapshot, read it locally with typed paths, and publish that same snapshot through MCP when needed.
Create a skill from its frontmatter, instructions, and supporting files:
const refunds = Skill.make({
frontmatter: {
name: "refunds",
description: "Process customer refunds"
},
instructions: "Read references/policy.md before issuing a refund.",
files: {
"references/policy.md": "Refunds over $100 require approval."
}
})Known file keys give you autocomplete and typo checking. A local tool handler could use the same read API:
const readPolicy = Effect.gen(function*() {
const skill = yield* refunds
// Path suggestions: "SKILL.md" | "references/policy.md"
const policy = yield* Skill.readText(skill, "references/policy.md")
// Type error: "references/polciy.md" is not a file in this skill.
// yield* Skill.readText(skill, "references/polciy.md")
return policy
})Publish the same bundle through McpServer:
const publish = Effect.gen(function*() {
const skill = yield* refunds
yield* McpServer.registerSkill(skill, {
uri: "skill://billing/refunds/SKILL.md"
})
})The prototype also includes Skill.fromFiles for bundles that already contain a SKILL.md. It preserves known file keys and validates paths at runtime for bundles built from dynamic inputs. Skill.manifest uses Effect’s Digest service to record digests, sizes, and MIME types for the bundled files. Applications would decide how to discover skills, expose them through tools, and handle approvals.
I’m planning to close PR #10397 and continue the discussion here. If you’re building with local skills, would this API cover what you need? The PR is available as a starting point if someone wants to pick it up.
What alternatives have you considered?
Apps can define their own local skill bundles and pass raw files to the existing McpServer.registerSkill API. That may be enough for apps that only publish skills over MCP. I’d like to hear whether sharing one typed bundle across local tool calls and MCP publication comes up often enough to make it part of Effect.
Activity
effect-bot commentedon Nov 21, 2026
Thanks for opening this and sharing the prototype in #10397!
We've been looking at how to keep the standalone
SkillAPI as clean and minimal as possible. Rather than treating the raw file bundle as the hidden source of truth (withmakegeneratingSKILL.md, parsing it back, and exposing opaquereadText/readByteshelpers), we're leaning toward modeling aSkillas plain data backed by aSchema.Class, withSKILL.mdas its serialization format.Proposed API (
effect/ai/Skill, unstable)McpServer.registerSkillandMcpServer.skillwould each gain a(skill, { uri, annotations? })overload that renders viaSkill.toFilesand delegates to the existing raw-files path. The existing raw-files API stays unchanged.Usage
Key differences & trade-offs
Schema.Class: Code-authored skills are synchronous module-level values (noEffectto run orLayer.unwrapbeforeMcpServer.skill). The schema serves as the single definition of a valid skill acrossmake,fromFiles, decoding, RPC, and persistence. Binary files (Uint8Array) use a JSON codec encoding to{ base64 }so text and binary files stay distinct when serialized.readText/readBytesor type-level path tracking: Tool handlers typically receive a dynamic runtimestringpath from the model, and future sources (a directory loader orMcpClientdownload) also produce dynamic paths. Usingskill.files[path]directly removes the read helpers, custom error class, and type-level complexity.manifest/Digestrequirement: Kept out ofSkillfor now; MCP continues to own manifests, digests, and size/file limits at registration.SKILL.md:toFilesrendersSKILL.md(using JSON-encoded values per frontmatter key so YAML edge cases round-trip cleanly). Round-tripping a hand-written skill viafromFiles->McpServerwon't preserve YAML comments or formatting; the existing raw-files form remains available for byte-exact publishing.string | Uint8Array: MIME types are inferred from file extensions when published. ExplicitmimeTypeoverrides remain on the raw-files API, and{ content, mimeType }could be added to the file union later without breaking changes.Future additions (like a filesystem loader,
McpClientdownload, or local-agent toolkit) can build onfromFilesandSkillwithout changing this core API.Would this design work for your use case?
lloydrichards commentedon Nov 21, 2026
I think this would be a good place to start. I think the main behaviours I want to preserve and be available in the first version is that the contents of the skills can be injected into
Promptusing the frontmatter, as well as making sure the files combined with the skills are not just limited to more text content (for example shell scrips).I think it would be most useful to be able to define this in a way that it can be encoded and decoded which might work from files or
FileSystem.tim-smart commentedon Nov 21, 2026
I think injecting a skill into the prompt should stay in user land. It would vary per harness / agent depending on how the full skill content is consumed.
I think a follow up issue can add some kind of SkillRegistry service that follows the .agents/skills spec.