Back to Skills

mastra

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.

46stars3forksUpdated 4/15/2026

Security Assessment

Medium Risk(50/100)

Detected risks:

Secret Exposure([references/create-mastra.md] API_KEY=, [references/common-errors.md] PASSWORD=, [references/common-errors.md] API_KEY=)
Sensitive File Access([references/create-mastra.md] .env, [references/common-errors.md] .env)
Security Score50/100

About mastra

The 'mastra' skill provides a comprehensive guide for working with the Mastra framework, aimed at building AI applications. It addresses the need for accurate and up-to-date documentation for developers by focusing on ensuring that they are always working with the current version of APIs and frameworks. By utilizing this skill, developers can avoid outdated knowledge and potential mistakes caused by relying on legacy documentation, which is crucial as Mastra evolves rapidly with changing APIs and refactored patterns. This guide emphasizes the importance of checking the latest documentation before writing code to ensure that all features and functionalities are properly implemented.

FAQ

How do I check if the required Mastra packages are installed?

You can check if the Mastra packages are installed by running the command: `ls node_modules/@mastra/` in your project directory. If the packages exist, use the embedded documentation for the most reliable source.

What should I do if the required Mastra packages are not installed?

If the packages are not installed, you need to either install them or refer to the remote documentation by visiting `https://mastra.ai/llms.txt` for the latest API details.

What is the priority order for writing code in Mastra?

The priority order is: first, check the embedded documentation (if packages are installed), second, consult the source code for deeper insights, and third, refer to remote documentation if the packages are not installed.

Can I rely on old documentation or knowledge for Mastra development?

No, never rely on old knowledge. Mastra evolves quickly, and APIs and patterns may have changed. Always verify against current documentation before writing any code.

All Files

7 files
references/create-mastra.md5.8 KB
View
scripts/provider-registry.mjs5.6 KB
View
references/embedded-docs.md3.5 KB
View
SKILL.md7.4 KB
View
references/migration-guide.md5.1 KB
View
references/common-errors.md10.2 KB
View
references/remote-docs.md5.4 KB
View

Install mastra

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill