When building with coding agents, one challenge is providing them with up-to-date information about the tools you're using. For a while we've had an MCP Docs Server for looking up documentation, but today we released Mastra Skills: structured knowledge files that give your agent the context it needs to help you build with Mastra.
We've also added a Build with AI docs section, and made any docs page available as markdown by appending .md to the URL (e.g., mastra.ai/docs/agents/overview.md), and improved how we generate llms.txt and handle text/markdown headers.
What are Skills?
In a nutshell, agent skills are a way to provide hyper-specific knowledge in sizable chunks that agents can easily consume without overflowing their context windows. You can use Mastra Skills with any of your favorite agents that support the skills specification.
What's in Mastra Skills?
Right now, we have one comprehensive skill available that uses progressive disclosure to provide information about Mastra. It includes:
- Setup & installation: Instructions on how to use
npm create mastra, manually install dependencies, and set up a small kitchen-sink example project - Embedded docs lookup: Information about how to use the embedded docs that come with each Mastra package (more on that later)
- Remote docs lookup: Information about how to use mastra.ai/docs (as a fallback to the embedded docs)
- Troubleshooting: Common issues and how to resolve them
- Migrations: Information about how to migrate from older versions of Mastra to the latest version
They are defined in mastra-ai/skills on GitHub.
Quickstart
The easiest way to add Mastra Skills is with npx skills:
1npx skills add mastra-ai/skillsAnd that's it! Your agent now has access to Mastra Skills.
We've also added Skills as an option in the CLI, so you can include them when creating a new project with npm create mastra.
Mastra Skills or MCP Docs Server?
For purely docs purposes, we recommend using Mastra Skills. If you need access to the more sophisticated migration tools that the MCP Docs Server provides, then you can use that as a fallback.
Bonus: Embedded docs
Before Mastra Skills, we shipped what we call "embedded docs". Every Mastra package includes its own documentation inside node_modules. After installing @mastra/core, the agent can look it up like this:
1cat node_modules/@mastra/core/dist/docs/SKILL.mdWe've modeled the individual docs folders inside dist according to the Agent Skills specification, so that agents can easily consume them.
Get Started with Mastra Skills
Add Mastra Skills to your project with npx skills add mastra-ai/skills and let us know how you get on. We'd love to hear what other skills you'd like to see, and if you haven't already, join our Discord.
See you around!
