ask-matt
MAmattpocock/skills337k4,978 new stars in the last 7 days
Author a skill the server publishes to the agents that use it — a root `skills/<name>/SKILL.md` per the Agent Skills specification, validated by `lint:packaging`, discovered by plugin hosts, shipped in the MCPB bundle, and optionally served over MCP. Use when the user asks to add, write, or publish a skill, agent guide, or usage guide for the server's tools, or when the design calls for one.
A server has two skill trees, written for different readers:
| Tree | Reader | Written by |
|---|---|---|
framework-skills/ | The agent building the server | init and the maintenance sync, plus any development skills of the server's own |
skills/ (root) | The agent that installed the server and is calling its tools | The author, deliberately |
Root skills/ is absent by default; init and maintenance never write it. Claude Code always scans a plugin's root skills/ (Agent Plugins 1.0.0 fixes discovery there), so no skills field is needed in .claude-plugin/plugin.json. Each SKILL.md follows the Agent Skills specification; a host skips one that doesn't, without a word, which is why lint:packaging validates the tree.
Publish one only when an agent calling the tools needs something instructions and tool descriptions cannot carry: a multi-hop identifier chain, a gate that prevents a wrong call or a wrong conclusion, a query syntax. Overview skills that restate the tool list, generic "how to use this server" workflows, and skills for hypothetical tasks do not ship.
<package short name>-guide (pubmed-guide for pubmed-mcp-server). The description names the tool prefix (pubmed_*) so the agent binds the skill to the tools it sees..describe() text carries the per-tool contract; instructions carries a one-paragraph orientation (canonical chain, identifier types, rate posture); MCP prompts stay user-invoked task templates. The skill carries what none of those can: when to reach for the server and when not to, where each opaque identifier comes from, gates, branching workflows, and syntax references. It never restates instructions.instructions, the design doc's Workflow Analysis and Known Limitations, tool descriptions, or closed issues — nothing invented. Cut any fact that would not change what the agent does.SKILL.md under 150 lines (the specification's 500 is a ceiling, not a target); the description under 500 characters, since it is resident in every session. Long material goes to references/.Sections in this order, so skills read alike across servers. Omit a section with nothing to say.
| Section | Carries |
|---|---|
| Scope | What the server covers and doesn't; keyless or which key. A sibling server may appear as a composition line, never as a dependency |
| Identifiers | Each opaque ID type and the tool that yields it |
| Gates | Preconditions, stop rules, confirmation gates |
| Core chain | Only when the canonical path is two or more hops |
| Workflows | Only when the surface branches, has modes, or registers the dataframe tools (paragraph below) |
| References | references/*.md links, only for long syntax or vocabulary material |
A server that registers the DataCanvas tools ships a canvas paragraph under Workflows: where a staged result's handle appears in the response, the describe-then-query order, how to stage more beside it, and when the tables expire. The handle varies by server — a canvas_id the caller passes back, or a df_<id> table name in a response field — so write the paragraph from the server's own output schema and tool descriptions. For a server whose responses carry a canvas_id, prefix substituted:
Results too large to return inline are staged as a DataCanvas table, and the response carries a
canvas_id. Call<prefix>_dataframe_describewith it for the staged table and column names before writing SQL, then<prefix>_dataframe_querywith a read-only query. Pass the samecanvas_idback to stage further results beside the first; the tables expire with the canvas.
A server that names the table instead says which field carries the df_<id> name, and, where every caller shares one canvas with listing off, that the caller keeps each name it is given.
skills/
└── my-server-guide/
├── SKILL.md
└── references/
└── query-syntax.md
---
name: my-server-guide
description: Chain my_server_search → my_server_get and resolve item IDs. Use when the agent needs a my_server_* record it only knows by name.
license: Apache-2.0
metadata:
author: owner
version: "1.0"
---
## Scope
…
name equals the directory name. Every metadata value is a quoted string. Never set metadata.audience — external is the marker init and the skills sync use to recognize framework-managed skills. Host-specific fields beyond the specification (disable-model-invocation) are accepted.
lint:packagingRuns when root skills/ exists (inside devcheck) and skips cleanly when it doesn't. The specification rules come from the MCP SDK's strict skill loader through validateSkillTree() (@cyanheads/mcp-ts-core/linter), the loader the server serves with, so a tree that passes is served whole. Each failure names the file and field:
name missing, not a string, not the directory name, over 64 characters, or outside ^[a-z0-9]+(-[a-z0-9]+)*$description missing, empty, or over 1024 characters (project rule: 500); compatibility empty, not a string, or over 500metadata value that is not a string (version: 1.0 unquoted); allowed-tools that is not a stringSKILL.md directly under skills/; a skills/<name>/ with no SKILL.md; a SKILL.md deeper than skills/<name>/ (plugin hosts discover immediate children only)SKILL.md over 150 lines; metadata.audience: external.mcpbignore pattern that strips a file of the tree from the bundle — a pre-0.13 .mcpbignore may still carry /skills/| Channel | What carries the tree |
|---|---|
| Plugin install (Claude Code, Codex) | The repository tree — root skills/ is scanned by default |
| MCPB bundle | Bundle root skills/, which the Claude Directory surfaces as Skills; .mcpbignore must not exclude it, and clean-mcpb strips skills/ only at a package root under node_modules/ |
npm (npx) | package.json files lists "skills/" (scaffold default) |
| Docker | The template Dockerfile creates skills/ in the build stage and copies it into the production stage |
A project scaffolded before these defaults adds the files entry and the two Dockerfile lines from node_modules/@cyanheads/mcp-ts-core/templates/ before relying on npm or Docker delivery.
Plugin delivery reaches only agents that install the server as a plugin. To reach MCP clients through the SEP-2640 Skills extension:
await createApp({ tools: allToolDefinitions, skills: 'skills' });
A relative path resolves against the application root, so a stdio server serves its own tree from any working directory, the root of the project that installed it included. The folder is read once at startup: a missing or unreadable folder fails startup with a ConfigurationError naming the resolved path; a skill the SDK rejects is skipped with a Skill problem in <path> warning and the rest are served. Opting in advertises io.modelcontextprotocol/skills under capabilities.extensions, adds skills/list, skills/get, and resources/directory/read, lists each SKILL.md in resources/list, and registers the skill://{+path} template, on both protocol eras; tools/list and instructions are unchanged. The Core services constructed log record's skills field lists the names served. Skill resources are served by the SDK: transport auth applies, per-definition auth scopes do not.
A Worker has no filesystem, so createWorkerHandler takes the files as a record built from Wrangler Text module imports — the record form and the Wrangler rule are in api-workers.
instructions leanOnce the skill exists, move extended workflows into it and keep instructions to its paragraph. Essential identifier, auth, and call-order requirements stay in instructions and the schemas anyway: a client connecting directly may never install the plugin or load the skill.
field-test reads the published skill and checks every gate and identifier claim against live tool behavior. A claim that does not hold is fixed or cut.
instructions and tool descriptions cannot carryskills/<name>/SKILL.md created; name equals the directory, default <package short name>-guideinstructions, the design doc, a tool description, or a closed issueinstructionsSKILL.md under 150 lines; long material in references/metadata.audience; every metadata value quoted.mcpbignore does not exclude /skills/; package.json files lists skills/; the Dockerfile copies itinstructions trimmed to its paragraph, essential requirements keptcreateApp({ skills: 'skills' }) (or the Worker record) set; the Core services constructed record's skills field lists the skillbun run lint:packaging passesfield-test verified every gate and identifier claim against live behaviorMAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
OBobra/superpowers331k4,772 new stars in the last 7 days
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
AFaffaan-m/ECC315k4,381 new stars in the last 7 days