mastraudit

Audit JavaScript and TypeScript repositories for Mastra implementation correctness and structural boundaries.

2|Updated May 21, 2026
One-click install
npx skills add https://github.com/howells/skills --skill mastraudit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mastraudit
Source: https://github.com/howells/skills/tree/main/mastraudit
Command: npx skills add https://github.com/howells/skills --skill mastraudit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Mastra-based codebases can drift into incompatible API usage and unclear ownership of Mastra wiring, causing brittle builds and hard-to-debug runtime behavior.

Core Features & Use Cases

  • Current-docs correctness checks: Verifies Mastra implementation against the installed $mastra/Mastra documentation workflow rather than relying on memory.
  • Deterministic boundary & structure audits: Detects incorrect mastra/@mastra imports, dependency boundary violations, Mastra CLI usage from non-approved packages, and misplaced Mastra-looking code outside the approved package.
  • Actionable remediation guidance: Produces findings with severities, file paths, categories, and concrete next steps to move setup and domain code into the approved Mastra package.

Quick Start

Use the $mastraudit skill on the repository you want audited, and accept the remediation plan it returns for moving Mastra tooling into exactly one approved package with domain folders under src/.

Frequently Asked Questions about mastraudit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Mastra implementation correctness in a TypeScript monorepo?

Auditing Mastra implementation correctness requires deterministic scanning of your TypeScript monorepo to compare installed API usage against current `$mastra` documentation and verify architectural boundaries. The Skill validates that only one package owns `mastra/@mastra` dependencies and imports.

What problems arise from unclear Mastra dependency ownership in a multi-package workspace?

Unclear Mastra dependency ownership causes brittle builds and hard-to-debug runtime behavior due to incorrect imports and CLI usage. Deterministic boundary scanning detects when Mastra wiring is scattered across non-approved packages and provides remediation guidance.

How do I enforce domain folder structures and import boundaries for Mastra code?

Enforcing domain folder structures involves scanning source directories to verify expected domain organization under `src/` and checking import statements. The audit identifies misplaced Mastra-looking code outside the approved package and flags dependency boundary violations.

Can I check my repository against current Mastra documentation instead of relying on memory?

Checking against current Mastra documentation is supported by comparing your installed implementation to the active `$mastra` guidance. This ensures API usage correctness by validating your codebase against the latest workflow rather than outdated knowledge.

How do I fix Mastra architecture boundary violations found during an audit?

Fixing Mastra architecture boundary violations involves following actionable remediation guidance that includes severities, file paths, and concrete next steps. The audit output directs you to move setup and domain code into the single approved Mastra package.

Does the Mastra architecture audit work for both single repositories and monorepos?

The Mastra architecture audit applies to both standard JavaScript and TypeScript repositories as well as multi-package monorepo workspaces. It validates Mastra API usage, dependency boundaries, and domain-folder organization across your entire project structure.