mastra

A guide for the Mastra framework, a TypeScript toolkit for building AI agents and multi-step workflows. It covers how to check current documentation and API details.

In plain words
What is it for?
Use it when creating Mastra agents or workflows, adding tools, memory, or retrieval from external information, and checking TypeScript usage.
Why use it?
Framework APIs can change, and the guide helps you confirm how Mastra features currently work before coding.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ssdeanx/agentstack/mastra
Any agent
npx skills add ssdeanx/AgentStack --skill mastra
Clone the repo
git clone --depth 1 https://github.com/ssdeanx/AgentStack

Made for: Claude Code, Codex.

Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00083 $0.01321
Opus 5 $0.00042 $0.00660
Sonnet 5 $0.00017 $0.00264
Haiku 4.5 $0.00008 $0.00132

Measured 2d ago against content hash 6401fb1a6299, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mastra scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/skills/mastra/SKILL.md · 160 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 160 lines · 83 tokens per session scan A 6401fb1a6299

Subscribe to this mod's changes

mastra is a skill published in the GitHub repository ssdeanx/AgentStack (44 stars, last pushed 4mo ago), with no licence file. It adds 83 tokens to every session and 1,321 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

copilotkit-self-update

Use when the user wants to update, refresh, or reinstall the CopilotKit agent SKILLS (the SKILL.md files that teach this agent about CopilotKit). NOT for updating the CopilotKit codebase or project — this is specifically about refreshing the skills/knowledge this agent has loaded. Triggers on "update copilotkit…

CopilotKit/CopilotKit · 144 tokens

docs-writer

Draft or rewrite Strands Agents documentation pages. Use when writing new doc pages, rewriting pages that failed audit, drafting sections for existing pages, or writing blog posts and release notes about Strands. Also triggers on "write a doc", "draft a page", "rewrite the quickstart", "add a tutorial for X"…

strands-agents/harness-sdk · 74 tokens

mistake-reflection

Use when you discover you made a mistake — caught by the user, by a tool result, by your own re-reading, or by a failed check. Appends a structured entry to docs/ai/ailearnings.md and re-reads recent entries to avoid repeats.

a2aproject/a2a-python · 60 tokens

skill-creator

Create, refine, and benchmark agent skills. Use when building a new skill, updating an existing one, running evals, checking trigger quality, or improving a skill description.

feiskyer/claude-code-settings · 39 tokens

grill

Structured questioning to reach shared understanding before action. Walks the decision tree one branch at a time, checks memory for already-answered questions, saves every answer as a lesson. Use when user wants to think through a plan, align on approach, poke holes in a design, or figure out decisions before…

kirodotdev/KiroCrew · 127 tokens

Master Agent Playbook

Philosophy, decision-making framework, and technical skills for delivering visual, interactive, and educational AI responses.

bubba2koldd-design/OpenGenerativeUI · 27 tokens