writing-docs

作成者: medusajs

MedusaドキュメントのMDXファイルを、book、resources、ui、user-guide、cloudプロジェクト向けに作成・更新します。以下に基づいてドキュメントを変更する際に使用します…

npx skills add https://github.com/medusajs/medusa --skill writing-docs

Writing Medusa Documentation

Skill for writing and updating MDX documentation across the book, resources, ui, user-guide, and cloud projects under www/apps/.

Constraints

CRITICAL: Violating these will corrupt the documentation or break CI.

  • Never document @ignore-tagged items — any option, method, or parameter with @ignore in its TSDoc must be skipped entirely
  • Never touch www/apps/resources/references/ — auto-generated, will be overwritten
  • Never touch www/apps/ui/specs/components/ — auto-generated, will be overwritten
  • Never touch www/apps/api-reference/ — managed by a separate process
  • Never run yarn prep or yarn lint:content — these run automatically after your session
  • Never invent Cloudinary screenshot URLs in user-guide — leave <!-- TODO: add screenshot --> instead

Load Reference Files When Needed

Load at least one reference file before writing any content.

TaskLoad
Deciding if a change needs docsreference/when-to-document.md
Writing any MDX contentreference/mdx-patterns.md
Writing for the book projectreference/book-style.md
Writing for the resources projectreference/resources-style.md
Writing for the user-guide projectreference/user-guide-style.md
Writing for the cloud projectreference/cloud-style.md
Checking prose qualityreference/vale-rules.md

Quick Reference

Project paths and writable directories

ProjectContent pathSidebar file
bookwww/apps/book/app/www/apps/book/sidebar.mjs
resourceswww/apps/resources/app/www/apps/resources/sidebars/*.mjs
uiwww/apps/ui/app/, www/apps/ui/specs/examples/www/apps/ui/sidebar.mjs
user-guidewww/apps/user-guide/app/www/apps/user-guide/sidebar.mjs
cloudwww/apps/cloud/app/www/apps/cloud/sidebar.mjs

MDX file minimum structure

export const metadata = {
  title: `Page Title`,
}

# {metadata.title}

Content here.

For book pages that use chapter numbering, the title uses ${pageNumber}:

export const metadata = {
  title: `${pageNumber} Chapter Title`,
}

Cross-project links

[text](!docs!/learn/path)        → book
[text](!resources!/path)         → resources
[text](!user-guide!/path)        → user-guide

Common Mistakes

  • Adding a new option, method, or parameter without a version note
  • Documenting any option, method, or parameter tagged with @ignore in its TSDoc — skip these entirely
  • Touching references/ or specs/components/ directories
  • Using we, us, let's, our in prose (use "you" or imperative)
  • Using "Medusa API" to mean the backend — use "Medusa backend" instead
  • Writing "Medusa Cloud" — use "Medusa" (noun form) or "Cloud" (location/service)
  • Using e.g., — write for example instead
  • Using em dashes () — rewrite sentence to avoid them
  • Using passive voice ("is created", "can be configured") — write active ("you can configure", "call X to create")
  • Writing code lines longer than 64 characters
  • Forgetting to add a new page to the sidebar file
  • Removing ${pageNumber} from book page titles
  • Using <img> or bare HTML instead of MDX components
  • Documenting internal implementation details (only public APIs)

Reference Files

reference/when-to-document.md   - Decision tree: does this change need docs?
reference/mdx-patterns.md       - MDX syntax, code blocks, components
reference/book-style.md         - book-specific structure and conventions
reference/resources-style.md    - resources-specific structure and conventions
reference/user-guide-style.md   - user-guide writing style and conventions
reference/cloud-style.md        - cloud-specific structure and conventions
reference/vale-rules.md         - Vale + lint rules to follow in prose

medusajsのその他のスキル

mcloud-variables
medusajs
mcloud variablesコマンドを実行して、Cloud環境の環境変数を一覧表示および取得します。環境変数を検査、読み取り、またはエクスポートする際に使用します。
official
building-storefronts
medusajs
Medusaストアフロント向けのSDKファーストなフロントエンド統合で、React Queryパターンと重要なAPI呼び出しルールを備えています。すべてのAPIリクエストには常にMedusa JS SDKを使用し、通常のfetch()は使用しないでください。必要なヘッダー(ストアルート用の公開可能APIキー、管理ルート用の認証)が欠落するためです。SDKメソッドにはプレーンなJavaScriptオブジェクトを渡し、ボディパラメータにJSON.stringify()を使用しないでください。SDKが自動的にシリアライズを処理します。GETリクエストにはuseQueryを、POST/DELETEリクエストにはuseMutationを使用してください。
official
building-admin-dashboard-customizations
medusajs
Medusa Adminダッシュボード向けのカスタムUI拡張機能。Admin SDKとMedusa UIコンポーネントを使用。管理UIの作業(計画、実装、調査)では、このスキルを最初に読み込むこと。MCPサーバーはAPIリファレンスのみを提供し、デザインパターンやデータ読み込み戦略は提供しない。重要:すべてのAPIリクエストにはMedusa JS SDKを使用すること(通常のfetchは不可)。表示クエリとモーダルクエリを分離し、ミューテーション後は表示データを無効化すること。既存ページにウィジェットを実装するか、カスタムUIルートを作成すること。...
official
learning-medusa
medusajs
対話形式で段階的に進むMedusa開発ブートキャンプ。ブランド機能を構築しながらアーキテクチャパターンを学びます。モジュール、ワークフロー、APIルート、モジュールリンク、ワークフローフック、管理UIのカスタマイズをカバーする3つのレッスン(合計2~3時間)を用意。各主要コンポーネント完了後のチェックポイント検証では、概念理解、コード品質、機能性を確認してから次に進みます。エラーを学習の機会として捉え、診断的な質問と根本原因の分析を通じて一緒にデバッグします。
official
db-migrate
medusajs
保留保留中のMedusaデータベースマイグレーションを実行し、結果を報告します。Bash経由でnpx medusa db:migrateを実行し、保留中のすべてのマイグレーションをMedusaデータベースに適用します。適用されたマイグレーションの数、発生したエラー、成功確認を含むマイグレーション結果を報告します。標準のnpm/npxセットアップを使用したMedusaプロジェクト向けに設計されています。
official
mcloud-environments
medusajs
mcloud environments コマンドを実行して、Cloud環境の一覧表示、取得、作成、削除、再デプロイ、またはビルドのトリガーを行います。環境のライフサイクル管理時に使用します。
official
db-generate
medusajs
単一のコマンドでMedusaモジュールのデータベースマイグレーションを生成します。npx medusa db:generate CLIコマンドをラップして、指定されたMedusaモジュールのマイグレーションファイルを作成します。モジュール名を引数として受け取り、マイグレーションファイルの場所、エラー、次のステップを報告します。生成後にnpx medusa db:migrateを実行してマイグレーションを適用することを自動的に提案します。
official
mcloud-deployments
medusajs
Execute mcloud deployments commands to list deployments, retrieve deployment details, and fetch build logs. Use when listing deployments, checking deployment…
official