Borrowing it
Nothing to install: this file belongs to shadcn-labs/agentcn. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shadcn-labs/agentcn/main/.agents/skills/mastra-file-agents/SKILL.mdgit clone --depth 1 https://github.com/shadcn-labs/agentcnWrote 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.
[](https://agentmods.dev/skills/shadcn-labs/agentcn/mastra-file-agents)<a href="https://agentmods.dev/skills/shadcn-labs/agentcn/mastra-file-agents"><img src="https://agentmods.dev/badge/skills/shadcn-labs/agentcn/mastra-file-agents/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.
<a href="https://agentmods.dev/skills/shadcn-labs/agentcn/mastra-file-agents"><img src="https://agentmods.dev/badge/skills/shadcn-labs/agentcn/mastra-file-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 164 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
- medium MCP Rug Pull · line 167 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00120 | $0.02330 |
| Opus 5 | $0.00060 | $0.01165 |
| Sonnet 5 | $0.00024 | $0.00466 |
| Haiku 4.5 | $0.00012 | $0.00233 |
Grade A, and why
mastra-file-agents 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrate Mastra agents to file-based
Convert agents built in code with new Agent({...}) and registered in a
new Mastra({ agents: {...} }) map into the file-based convention: one directory
per agent under src/mastra/agents/<name>/, where sibling files supply what used to
be constructor options.
This is a behavior-preserving refactor, not a redesign. Move each option to the file that owns it, keep the same model, instructions, tools, memory, skills, and subagents, and don't invent config the agent didn't have.
Two things that break migrations
1. File-based agents are discovered ONLY by the Mastra bundler (mastra dev /
mastra build). If the app imports the mastra instance directly (Mastra used as a
library, a custom server, tests that import { mastra }), agents/<name>/
directories are never discovered and the agent silently disappears. Before migrating,
confirm how the app runs: through the CLI → migrate freely; imported directly → do
not migrate that agent, keep it in code and tell the user why.
2. Code wins on name collisions. If an agent exists in both a config.ts
directory and the Mastra({ agents }) map, the code one is kept and the file-based
one is ignored (with a warning). The migration is a no-op until you remove the code
registration (Step 5). Half-migrating changes nothing.
Workflow
Work one agent at a time. Copy this checklist and track it:
Migration progress for <agent>:
- [ ] Confirmed the app runs via mastra dev/build (not a direct import)
- [ ] Created src/mastra/agents/<name>/
- [ ] config.ts (agentConfig) with model + non-instruction/tool config
- [ ] instructions.md OR dynamic instructions kept in config.ts
- [ ] tools/*.ts (one default export each, filename = tool key)
- [ ] memory.ts / workspace.ts / skills/ / subagents/ if present (see references/mapping.md)
- [ ] Removed the agent from the Mastra({ agents }) map
- [ ] Deleted now-dead imports / the old agent file if nothing else uses it
- [ ] Verified with mastra dev
What ships with it
9 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.
- evals/evals.json 4.4 KB
- evals/files/research-project/package.json 274 B
- evals/files/research-project/src/mastra/index.ts 977 B runs code
- evals/files/support-project/package.json 306 B
- evals/files/support-project/src/mastra/agents/support.ts 1.0 KB runs code
- evals/files/support-project/src/mastra/index.ts 162 B runs code
- evals/files/weather-project/package.json 273 B
- evals/files/weather-project/src/mastra/index.ts 1.1 KB runs code
- references/mapping.md 9.1 KB
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.
- 11d ago First seen · 195 lines · 120 tokens per session scan A 3be8df5b7f28
mastra-file-agents is a skill published in the GitHub repository shadcn-labs/agentcn (458 stars, last pushed 18d ago), licensed MIT. It adds 120 tokens to every session and 2,330 once invoked, about $0.0006 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.
Other skills, from other repositories
json-render-catalog
Skill "json-render-catalog" from yonatangross/orchestkit, covering json-render component catalogs, storybook → catalog import (#1529, 2026-04), new in 2026-04 → 2026-08 (json-render 0.14 → 0.20), directives — @json-render/directives (0.19) and registration.
component-search
Search 21st.dev component registry for production-ready React components. Finds components by natural language description, filters by framework and style system, returns ranked results with install instructions. Use when looking for UI components, finding alternatives to existing components, or sourcing design system…
agent-readme
Write or deslopify a registry agent's README (registry/ /README.md). Use when authoring a new agent README, trimming an existing one, or cutting AI-generated README noise ("these READMEs are too long / generic / repetitive", "deslopify the readmes", "fix the README"). Not for agent/instructions.md, the runtime prompt.
revenue-pulse
Use when writing the weekly Stripe revenue & churn pulse — how to pull facts with the stripe and posthog-cli CLIs in the sandbox, then post to Slack.
author-atom-eve-agent
Use when authoring or contributing a NEW Atom Eve agent to the registry (not installing an existing one) - designing what it does, wiring its capability and connections, and writing the README, SETUP.md, and agent/ source. Triggers include "build a new Atom Eve agent", "contribute an agent", "add a new agent to the…
ppc-assist
Use when running PPC Assist Amazon PPC triage, interpreting PPC Assist metrics, reviewing search terms and suggestions, or preparing approval-gated account changes.