Index of every page on this site: llms.txt
All skills
mastra-ai avatar

/mastra

@0457401 official
by Mastramastra-ai/skills105 stars
13
Run it yourself

Comprehensive Mastra framework guide for building agents, workflows, tools, memory, workspaces, and storage with current APIs. Use for native capability discovery, logging, tracing, metrics/cost estimates, dataset experiments, documentation lookup, API verification, TypeScript setup, common errors, migrations, building and deploying apps to Mastra Platform via Platform APIs and `mastra deploy`, and `mastra api` CLI tasks: inspect or call resources on local, Mastra platform, or remote servers. For Mastra Factory operations, discover and activate the companion mastra-factory skill. Also report verified bugs and concrete documentation defects to the Mastra team automatically via the feedback endpoint.

Use this Skill: https://skilld.dev/gh/mastra-ai/skills/mastra

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescore-concepts.md

≈300 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Core Concepts Reference

Use this reference when choosing Mastra primitives and native capabilities before designing custom infrastructure.

Discover native capabilities first

Check whether Mastra already provides the requested behavior before designing custom infrastructure. Verify the installed version's capabilities, configuration, and limits using embedded docs, or remote docs when unavailable. Prefer native capabilities where they fit; add custom logic for identified gaps and application-specific business rules.

Agents vs workflows

Agent: Autonomous, makes decisions, uses tools. Use for open-ended tasks such as support, research, analysis, and tool-using assistants.

Workflow: Structured sequence of steps. Use for defined processes such as pipelines, approvals, ETL, multi-step business logic, and resumable processes.

Key components

  • Tools: Extend agent capabilities through APIs, databases, external services, and deterministic functions.
  • Memory: Maintain context through message history, working memory, semantic recall, and observational memory.
  • Storage: Persist data with providers such as Postgres, LibSQL, and MongoDB.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings17d5 checks · Risk SAFE
  • Gen Agent Trust Hub18d

    The skill provides a comprehensive guide for the Mastra framework, including documentation lookup, project scaffolding, and CLI interaction. All external resources, including documentation URLs, GitHub repositories, and API endpoints, belong to the official vendor infrastructure. No malicious patterns, obfuscation, or unsafe data handling were detected.

  • Socket17d

    No alerts

  • Snyk18d

    Risk: MEDIUM · 1 issue

  • Runlayer9mo

    3/6 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 0457401. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 3 weeks ago
Other metadata
metadata
{
  "author": "Mastra",
  "version": "2.5.0",
  "repository": "https://github.com/mastra-ai/skills"
}

README badge

README badge for mastra-ai/skills/mastra

Provides documentation lookup, API verification, and CLI reference for the Mastra framework—a TypeScript library for building AI agents, workflows, tools, and storage integrations. Use this skill to verify current Mastra APIs, resolve type errors from outdated knowledge, inspect resources via the `mastra api` CLI, and troubleshoot common setup issues like ES2022 module configuration.

Generated from the current SKILL.md.

Does this skill work without Mastra packages installed?
Yes. The skill includes references to remote documentation at mastra.ai/llms.txt for cases where packages aren't installed. If packages are installed, the skill prioritizes embedded docs in node_modules for accuracy.
What should I do if I get a TypeScript error when using Mastra?
Check references/common-errors.md first, then verify the current API in embedded docs or remote docs. Type errors often signal outdated knowledge rather than user mistakes, since Mastra APIs change between versions.
How do I verify a model name or provider is valid?
Run scripts/provider-registry.mjs to look up current providers and models in the model router before using any model. Model names change frequently and should never be guessed from memory.
What does the `mastra api` CLI do?
It inspects or calls resources on local dev servers, Mastra platform deployments, or remote endpoints. Use it to access agent state, execution traces, logs, threads, and workflow operations.
Does Mastra support CommonJS?
No. Mastra requires ES2022 modules and will fail with CommonJS. Verify your tsconfig.json is set up correctly.

Generated from the current SKILL.md. These answers refresh after source changes.