mastra

mastra is a skill for Claude Code, Codex from svngoku/coding-agents-skills. It costs 84 tokens per session (2,760 once invoked), scanned A, original, MIT.

A TypeScript framework for building AI agents, including tools, workflows, memory, document retrieval, evaluation and deployment. It also covers connecting agents to external tools through MCP, the Model Context Protocol.

In plain words
What is it for?
Use it to build tool-using agents, multi-step workflows, retrieval systems, human approval steps, evaluations and deployed agent services in TypeScript.
Why use it?
Agent projects need defined handling for context, permissions, approvals, retries, state and failures rather than relying on informal prompts. The framework's guidance helps structure those parts and check current APIs before upgrades.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to build tool-using agents, multi-step workflows, retrieval systems, human approval steps, evaluations and deployed agent services in TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/svngoku/coding-agents-skills/mastra
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.

Any agent
npx skills add svngoku/coding-agents-skills --skill mastra
Clone the repo
git clone --depth 1 https://github.com/svngoku/coding-agents-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mastra

README.md
[![agentmods](https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/mastra/github.svg)](https://agentmods.dev/skills/svngoku/coding-agents-skills/mastra)
Your own site
<a href="https://agentmods.dev/skills/svngoku/coding-agents-skills/mastra"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/mastra/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mastra

Your own site · 80×15
<a href="https://agentmods.dev/skills/svngoku/coding-agents-skills/mastra"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/mastra.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,760 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original 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.1 $0.00084 $0.02760
Opus 5.5 $0.00034 $0.01104
Sonnet 5.5 $0.00017 $0.00552
Haiku 4.5 $0.00008 $0.00276

Measured 21d ago against content hash bac82b4aa21b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 21d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (graders/check.py, solutions/reference-support-agent/src/mastra/index.ts, tests/test_grader.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/mastra/SKILL.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mastra AI Agent Framework

Mastra is a TypeScript framework for agents, tools, workflows, memory, retrieval, evaluation, and deployment. Use models for uncertain language and semantic judgments; keep authorization, state transitions, budgets, retries, and side effects deterministic. This skill targets current Mastra v1 APIs, checked against @mastra/core 1.82.0 on 2026-11-08. Re-check exact APIs and model IDs against the official documentation before upgrading.

Quick Reference

Topic Guide
Requirements, boundaries, and architecture architecture.md
Agents, instructions, models, streams, and output schemas agents.md
Typed tools, authorization, errors, and idempotency tools.md
Threads, working memory, recall, and context memory.md
Typed workflows, control flow, snapshots, and recovery workflows.md
Tool approval, suspension, and resume human-in-the-loop.md
Chunking, embeddings, vector search, and evidence retrieval.md
Input/output processors and security controls guardrails.md
Supervisors, subagents, and delegation multi-agent.md
MCP clients, servers, and external tool trust mcp.md
Deterministic checks, scorers, and test strategy evaluation.md
Tracing, redaction, metrics, and incident evidence observability.md
Build, health, storage, shutdown, and rollout deployment.md
Version assumptions and official documentation sources.md

Agent-Building Principles

Principle Implementation rule
Clear objective Define the user outcome, accepted inputs, completion criteria, and explicit non-goals.
Appropriate autonomy Use a function for fixed logic, a workflow for known stages, and an agent for dynamic decisions.
Grounded context Supply only relevant instructions, state, retrieved evidence, and tool results; label external data untrusted.
Typed action Validate every tool input/output and return bounded, useful results or actionable errors.
Deterministic control Enforce permissions, limits, state transitions, idempotency, and final side effects outside the model.
Purposeful memory Separate conversation state, user preferences, shared knowledge, and durable execution snapshots.
Bounded iteration Cap steps, loops, concurrency, tokens, latency, and retries; support cancellation.
Human oversight Require review for consequential or irreversible actions and bind approval to exact arguments.
Observable behavior Trace inputs safely, model calls, tools, retrieval, decisions, failures, suspension, and cost.
Evaluated quality Test deterministic contracts and adversarial cases before model-graded quality and live sampling.
Operable lifecycle Persist required state, drain work, redact secrets, roll out gradually, and rehearse recovery.

Read the full file on GitHub · 234 lines

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. 21d ago First seen · 234 lines · 84 tokens per session scan A bac82b4aa21b

Subscribe to this mod's changes

mastra is a skill published in the GitHub repository svngoku/coding-agents-skills (12 stars, last pushed 21d ago), licensed MIT. It adds 84 tokens to every session and 2,760 once invoked, about $0.0003 per session on Opus 5.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-11-08.

Related

mastra compared with skills from other repositories

mastra next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mastrasvngoku/coding-agents-skillsSkill1221d agoMITA84Claude Code, Codex
genai-hub-orchestrationSAP/ai-skills-librarySkill16210d agoApache-2.0A169Claude Code
ai-engineeringmthines/agent-skillsSkill22yesterdayMITA67Claude Code
ai-llm-skills-guidegmh5225/awesome-skillsSkill1011mo agoMITA35Claude Code
ai-productlingxling/awesome-skills-cnSkill3411mo agoMITA28Claude Code
ai-teachermingchen666/RevivaSkill3477d agononeA37Claude Code, Codex
flockion_engineering_aierror505/Flockion_AI_EngineeringSkill51mo agoMITA187Claude Code