mastra-embeded-docs-look-up について
mastra-embeded-docs-look-upは、インストール済みのMastraパッケージに含まれるドキュメントからAPIシグネチャを探すスキルです。バージョンに合った型定義とトピック別ドキュメントを参照し、頻繁に変わるAPIの確認に役立ちます。
主な機能
- 01パッケージのエクスポートマップ検索
- 02インストール済み型定義の参照
- 03機能別ドキュメントの特定
- 04core、memory、RAGパッケージに対応
活用シーン
- 01インストール済みMastraのAPIシグネチャ確認
- 02ローカルのパッケージバージョンに基づくAPI検証
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ mastra-ai/ skills --skill mastra-embeded-docs-look-upインストール後、Claude Code で/mastra-embeded-docs-look-upを入力して読み込まれたか確認します。
詳細
Mastra 組み込みドキュメントの検索
node_modules/@mastra/*/dist/docs/ にある組み込みドキュメントから API シグネチャを検索します。これらはインストール済みのバージョンに対応しています。
ドキュメントの構成
node_modules/@mastra/core/dist/docs/
├── SKILL.md # Package overview, exports
├── SOURCE_MAP.json # Export→file mappings
└── [topics]/ # Feature docs (agents/, workflows/, etc.)
検索手順
1. エクスポートを見つける:
cat node_modules/@mastra/core/dist/docs/SOURCE_MAP.json | grep '"Agent"'
戻り値:{ "Agent": { "types": "dist/agent/agent.d.ts", ... } }
2. 型定義を読む:
cat node_modules/@mastra/core/dist/agent/agent.d.ts
3. トピックのドキュメントを確認する:
cat node_modules/@mastra/core/dist/docs/agents/01-overview.md
よく使うパッケージ
| パッケージ | パス | 含まれる内容 |
|---|---|---|
@mastra/core | node_modules/@mastra/core/dist/docs/ | エージェント、ワークフロー、ツール |
@mastra/memory | node_modules/@mastra/memory/dist/docs/ | メモリーシステム |
@mastra/rag | node_modules/@mastra/rag/dist/docs/ | RAG 機能 |
クイックコマンド
# 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/
これを使う理由
- 組み込みドキュメントはインストール済みのバージョンに対応しています
- Mastra はベータ版として活発に開発されており、API は頻繁に変更されます
- トレーニングデータは古くなっている可能性があります
- 型定義には JSDoc と使用例が含まれています
コメント
Markdown 対応