mcpField
M
mastra-embedded-docs-look-up

mastra-embedded-docs-look-up

github.com/mastra-aiDevelopment9965 installsUpdated 1d ago
Repository

About mastra-embedded-docs-look-up

A lookup skill for developers working with Mastra packages that finds API signatures and topic guidance in documentation bundled with the installed dependencies. It uses export mappings, type definitions, and package docs to keep lookups aligned with the installed version.

Key features

  1. 01Search installed Mastra package docs
  2. 02Map exports to type definition files
  3. 03Inspect API signatures and JSDoc
  4. 04Browse topic documentation
  5. 05Use shell commands for lookups

Use cases

  1. 01Checking an installed Mastra API signature
  2. 02Finding the definition behind a package export
  3. 03Looking up agent or workflow documentation
  4. 04Verifying guidance against the installed package version

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mastra-ai/skills --skill mastra-embedded-docs-look-up

After installing, type/mastra-embedded-docs-look-upin Claude Code to confirm it loaded.

Details

From the project README

Mastra Embedded Docs Lookup

Look up API signatures from embedded docs in node_modules/@mastra/*/dist/docs/ - these match the installed version.


Documentation Structure

node_modules/@mastra/core/dist/docs/
├── SKILL.md           # Package overview, exports
├── SOURCE_MAP.json    # Export→file mappings
└── [topics]/          # Feature docs (agents/, workflows/, etc.)

Lookup Process

1. Find the export:

cat node_modules/@mastra/core/dist/docs/SOURCE_MAP.json | grep '"Agent"'

Returns: { "Agent": { "types": "dist/agent/agent.d.ts", ... } }

2. Read type definition:

cat node_modules/@mastra/core/dist/agent/agent.d.ts

3. Check topic docs:

cat node_modules/@mastra/core/dist/docs/agents/01-overview.md

Common Packages

PackagePathContains
@mastra/corenode_modules/@mastra/core/dist/docs/Agents, Workflows, Tools
@mastra/memorynode_modules/@mastra/memory/dist/docs/Memory systems
@mastra/ragnode_modules/@mastra/rag/dist/docs/RAG features

Quick Commands

# List installed packages
ls node_modules/@mastra/

# Find export in SOURCE_MAP
cat node_modules/@mastra/core/dist/docs/SOURCE_MAP.json | grep '"ExportName"'

# Read type definition
cat node_modules/@mastra/core/dist/[path-from-source-map]

# List available topics
ls node_modules/@mastra/core/dist/docs/

Why Use This

  • Embedded docs match installed version exactly
  • Mastra evolves quickly — installed docs stay in sync
  • Training data may be outdated
  • Type definitions include JSDoc and examples

Comments

Markdown supported