mastra

Resolve Mastra build and runtime issues with version-matched documentation.

7|2|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/wenerme/ai --skill mastra-wenerme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mastra
Source: https://github.com/wenerme/ai/tree/main/skills/mastra
Command: npx skills add https://github.com/wenerme/ai --skill mastra-wenerme

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you build Mastra AI applications without guessing APIs or model names, so you can recover quickly from breaking changes and runtime errors.

Core Features & Use Cases

  • Current-doc-first Mastra guidance: Safely guide development by preferring embedded docs from installed packages and falling back to remote docs when needed.
  • Mastra primitives selection and correctness: Explain when to use Agents vs Workflows vs Tools vs Memory vs Storage, plus how to structure typical project code.
  • API verification and CLI troubleshooting: Support TypeScript ES2022 module requirements and provide a repeatable approach for validating providers/models via the registry script and inspecting resources via mastra api.

Quick Start

Ask the AI to help you build a Mastra project by checking embedded docs for your installed @mastra/* packages, then providing the correct TypeScript setup and model/provider strings for your chosen agent and tools.

Frequently Asked Questions about mastra

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between Mastra agents and workflows for my AI application?

Mastra agents handle autonomous LLM interactions, while workflows orchestrate deterministic multi-step processes. This Skill explains when to use agents versus workflows versus tools to correctly structure your TypeScript AI project code.

How do I resolve Mastra build and runtime errors in TypeScript ES2022?

Resolve Mastra runtime errors by verifying TypeScript ES2022 module requirements and validating provider/model-name strings via the registry script. This Skill provides structured references for common errors and CLI target resolution.

How do I verify Mastra model and provider configurations before calling the API?

Verify Mastra model configurations by running the provider registry check script before using models. This Skill mandates verification-first behavior to ensure provider/model-name strings are valid before executing API calls.

How do I use the mastra api CLI to inspect server resources?

Use the `mastra api` CLI to inspect or call server resources directly. This Skill guides you through CLI target resolution to validate API endpoints and troubleshoot server interactions for your agents.

How do I find version-matched documentation for installed @mastra/* packages?

Find version-matched documentation by checking embedded docs from your installed `@mastra/*` packages first, falling back to remote docs when needed. This Skill ensures guidance aligns with your specific Mastra version to prevent breaking changes.

What are the limitations when using Mastra memory and storage components?

The Skill guides selecting Mastra Memory versus Storage primitives based on state persistence needs, but mandates provider registry checks before use to prevent runtime errors from invalid configurations.