Comprehensive Mastra framework guide. Teaches how to find current documentation, verify API signatures, and build agents and workflows. Covers documentation lookup strategies (embedded docs, remote docs), core concepts (agents vs workflows, tools, memory, RAG), TypeScript requirements, and common patterns. Use this skill for all Mastra development to ensure you're using current APIs from the installed version or latest documentation.
View on GitHubskills/mastra/SKILL.md
February 3, 2026
Select agents to install to:
npx add-skill https://github.com/mastra-ai/skills/blob/main/skills/mastra/SKILL.md -a claude-code --skill mastraInstallation paths:
.claude/skills/mastra/# Mastra Framework Guide Build AI applications with Mastra. This skill teaches you how to find current documentation and build agents and workflows. ## ⚠️ Critical: Do not trust internal knowledge **Everything you know about Mastra is likely outdated or wrong. Never rely on memory. Always verify against current documentation.** Your training data contains obsolete APIs, deprecated patterns, and incorrect usage. Mastra evolves rapidly - APIs change between versions, constructor signatures shift, and patterns get refactored. ## Prerequisites **Before writing any Mastra code**, check if packages are installed: ```bash ls node_modules/@mastra/ ``` - **If packages exist:** Use embedded docs first (most reliable) - **If no packages:** Install first or use remote docs ## Documentation lookup guide ### Quick Reference | User Question | First Check | How To | | ----------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------- | | "Create/install Mastra project" | [`references/create-mastra.md`](references/create-mastra.md) | Setup guide with CLI and manual steps | | "How do I use Agent/Workflow/Tool?" | [`references/embedded-docs.md`](references/embedded-docs.md) | Look up in `node_modules/@mastra/*/dist/docs/` | | "How do I use X?" (no packages) | [`references/remote-docs.md`](references/remote-docs.md) | Fetch from `https://mastra.ai/llms.txt` | | "I'm getting an error..." | [`references/common-errors.md`](references/common-errors.md) | Common errors and solutions | | "Upgrade from v0.x to v1.x" | [`references/migration-guide.md`](references/migration-guide.md) | Version upgrade workflows | ### Priority order for writing code ⚠️ **Never write code without checkin