mastra-api

mastra-api is a skill for Claude Code, Codex from liatrio-labs/ai-prompts. It costs 80 tokens per session (1,249 once invoked), scanned A, original, Apache-2.0.

A development-server helper for Mastra, a framework for building AI agents and workflows. It exposes information about agents, conversations, tools, workflows, runs, and monitoring data.

In plain words
What is it for?
Use it to view conversation threads, investigate agent errors, list and inspect tools or workflows, review workflow runs, and access observability data.
Why use it?
It reduces the need to inspect runtime state manually when an agent or workflow behaves unexpectedly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to view conversation threads, investigate agent errors, list and inspect tools or workflows, review workflow runs, and access observability data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/liatrio-labs/ai-prompts/mastra-api
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 liatrio-labs/ai-prompts --skill mastra-api
Clone the repo
git clone --depth 1 https://github.com/liatrio-labs/ai-prompts

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-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/liatrio-labs/ai-prompts/mastra-api/github.svg)](https://agentmods.dev/skills/liatrio-labs/ai-prompts/mastra-api)
Your own site
<a href="https://agentmods.dev/skills/liatrio-labs/ai-prompts/mastra-api"><img src="https://agentmods.dev/badge/skills/liatrio-labs/ai-prompts/mastra-api/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-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/liatrio-labs/ai-prompts/mastra-api"><img src="https://agentmods.dev/badge/skills/liatrio-labs/ai-prompts/mastra-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,249 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00080 $0.01249
Opus 5 $0.00040 $0.00624
Sonnet 5 $0.00016 $0.00250
Haiku 4.5 $0.00008 $0.00125

Measured 11d ago against content hash 1e1d4a529edd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mastra-api scanned grade A with 1 finding 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 11d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/debug_agent_error.sh, scripts/get_latest_thread.sh, scripts/get_workflow_details.sh, …), 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl --globoff -sS \
skills/mastra-api/SKILL.md · 185 lines

How it starts

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

Mastra Development API

Interact with the Mastra dev server API to debug agents, view conversations, inspect tools and workflows, and access observability data.

Quick Start

Agent Debugging

Run these scripts/... commands from the skills/mastra-api/ directory. From repo root, prefix them with skills/mastra-api/.

# Get latest conversation
scripts/get_latest_thread.sh <agent-id> [port]

# Debug errors
scripts/debug_agent_error.sh <agent-id> [port]

# View thread messages
curl --globoff -sS \
  "http://localhost:4111/api/memory/threads/THREAD_ID/messages?page=0&perPage=50&agentId=my-agent&orderBy[field]=createdAt&orderBy[direction]=DESC" \
  | jq '.'

Tools and Workflows

Run these scripts/... commands from the skills/mastra-api/ directory. From repo root, prefix them with skills/mastra-api/.

# List all tools
scripts/list_tools.sh [port]

# List all workflows
scripts/list_workflows.sh [port]

# Get workflow details
scripts/get_workflow_details.sh <workflow-name> [port]

# Get workflow runs
scripts/get_workflow_runs.sh <workflow-name> [port]

Resource Listing

# List all agents
curl -sS http://localhost:4111/api/agents | jq 'keys'

# List all tools
curl -sS http://localhost:4111/api/tools | jq 'keys'

# List all workflows
curl -sS http://localhost:4111/api/workflows | jq 'keys'

Common Tasks

Debug Agent Failures

  1. Get latest thread: scripts/get_latest_thread.sh my-agent
  2. Check for errors: scripts/debug_agent_error.sh my-agent
  3. Inspect message content for error details

Inspect Available Resources

# See what tools an agent can use
curl -sS http://localhost:4111/api/agents | \
  jq '.["my-agent"].tools | keys'

# See what workflows an agent can invoke
curl -sS http://localhost:4111/api/agents | \
  jq '.["my-agent"].workflows | keys'

# List all registered tools
scripts/list_tools.sh

# List all registered workflows
scripts/list_workflows.sh

Debug Workflows

# Get workflow structure and steps
scripts/get_workflow_details.sh my-workflow

# Check workflow execution history
scripts/get_workflow_runs.sh my-workflow

# Find failed workflow runs
scripts/get_workflow_runs.sh my-workflow | \
  jq '.runs[] | select(.status == "failed")'

Read the full file on GitHub · 185 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. 11d ago First seen · 185 lines · 80 tokens per session scan A 1e1d4a529edd

Subscribe to this mod's changes

mastra-api is a skill published in the GitHub repository liatrio-labs/ai-prompts (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 80 tokens to every session and 1,249 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.