mastra-docs

Documentation guidelines for Mastra. This skill should be used when writing or editing documentation for Mastra. Triggers on tasks involving documentation creation or updates.

22,487 stars

Best use case

mastra-docs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Documentation guidelines for Mastra. This skill should be used when writing or editing documentation for Mastra. Triggers on tasks involving documentation creation or updates.

Teams using mastra-docs should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/mastra-docs/SKILL.md --create-dirs "https://raw.githubusercontent.com/mastra-ai/mastra/main/.claude/skills/mastra-docs/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/mastra-docs/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How mastra-docs Compares

Feature / Agentmastra-docsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Documentation guidelines for Mastra. This skill should be used when writing or editing documentation for Mastra. Triggers on tasks involving documentation creation or updates.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Mastra Documentation Guidelines

Instructions and styleguides for writing and maintaining Mastra documentation. This skill should be used whenever creating or updating documentation for Mastra to ensure consistency, clarity, and quality across all docs.

## Path convention

`@docs/` references in this skill map to the `docs/` directory in the workspace root. For example, `@docs/styleguides/STYLEGUIDE.md` resolves to `docs/styleguides/STYLEGUIDE.md`. Always use the `view` tool with the workspace path, do not use `skill_read` for these files.

## Scope

- `@docs/` - This folder contains the source code and contents of the documentation site. All documentation for Mastra should be created and maintained here.
- `@docs/src/content/en/` - This subfolder contains the actual markdown files for the documentation site, organized into `docs/`, `guides/`, and `reference/` sections. The `models/` subfolder contains auto-generated documentation for model providers and should not be edited manually.

## Styleguides

Follow the general styleguide at `@docs/styleguides/STYLEGUIDE.md` for all documentation. Additionally, refer to these specific styleguides when writing different types of documentation:

- `@docs/styleguides/DOC.md` - For any file inside `@docs/src/content/en/docs/`
- For any file inside `@docs/src/content/en/guides/` choose the correct styleguide based on content:
  - `@docs/styleguides/GUIDE_QUICKSTART.md` - For quickstart guides that get the reader to a working result as fast as possible with a specific library/framework.
  - `@docs/styleguides/GUIDE_TUTORIAL.md` - For tutorial guides that teach the reader how to build something specific with Mastra, going deeper into concepts.
  - `@docs/styleguides/GUIDE_INTEGRATION.md` - For integration guides that provide a comprehensive reference for using Mastra with a specific external library or ecosystem.
  - `@docs/styleguides/GUIDE_DEPLOYMENT.md` - For deployment guides that walk the reader through deploying their Mastra application to a specific platform.
- `@docs/styleguides/REFERENCE.md` - For any file inside `@docs/src/content/en/reference/`

## Linting

The documentation uses three tools to maintain quality and consistency:

- prettier: For consistent formatting. It also formats the code blocks in the markdown files itself. The base layer of linting.
- remark: Lints markdown files for specific markdown issues, e.g. heading levels, list styles, consistent usage of bold, italics, etc. The middle layer of linting.
- vale: Lints prose for grammar, style, and consistency issues. The top layer of linting.

Inside `@docs/`, you can run the following commands to lint the documentation:

- prettier: `npm run format` - Automatically formats all files using prettier.
- remark: `npm run lint:remark` - Lints all markdown files using remark and reports any issues.
- vale: `npm run lint:vale:ai` - Lints all markdown files using vale with a minimum alert level of "error" and outputs results in a line format.

Related Skills

security-review

22487
from mastra-ai/mastra

Security-focused code review checklist for identifying vulnerabilities

performance-review

22487
from mastra-ai/mastra

Performance-focused code review for identifying bottlenecks and optimization opportunities

code-standards

22487
from mastra-ai/mastra

Code quality standards and style guide for reviewing pull requests

customer-support

22487
from mastra-ai/mastra

Guidelines for handling customer support interactions. Use when responding to user inquiries, troubleshooting issues, or escalating problems.

code-review

22487
from mastra-ai/mastra

Provides structured code review guidelines for TypeScript projects. Use when reviewing pull requests, analyzing code quality, or suggesting improvements.

api-design

22487
from mastra-ai/mastra

Guidelines for designing RESTful APIs and TypeScript interfaces. Use when designing new endpoints, reviewing API contracts, or structuring data models.

brand-guidelines

22487
from mastra-ai/mastra

Applies Mastra's brand colors, typography, and writing style to documentation, code examples, or artifacts. Use when brand colors, style guidelines, visual formatting, or company design standards apply.

tailwind-best-practices

22487
from mastra-ai/mastra

Tailwind CSS styling guidelines for Mastra Playground UI. This skill should be used when writing, reviewing, or refactoring styling code in packages/playground-ui and packages/playground to ensure design system consistency. Triggers on tasks involving Tailwind classes, component styling, or design tokens.

smoke-test

22487
from mastra-ai/mastra

Create a Mastra project using create-mastra and smoke test the studio in Chrome

react-best-practices

22487
from mastra-ai/mastra

React performance optimization guidelines from Mastra Engineering. This skill should be used when writing, reviewing, or refactoring React code to ensure optimal performance patterns. Triggers on tasks involving React components, data fetching, bundle optimization, or performance improvements.

ralph-plan

22487
from mastra-ai/mastra

Interactive planning assistant that helps create focused, well-structured ralph-loop commands through collaborative conversation

e2e-tests-studio

22487
from mastra-ai/mastra

REQUIRED when modifying any file in packages/playground-ui or packages/playground. Triggers on: React component creation/modification/refactoring, UI changes, new playground features, bug fixes affecting studio UI. Generates Playwright E2E tests that validate PRODUCT BEHAVIOR, not just UI states.