writing-docs

Writes and updates Medusa documentation MDX files for the book, resources, ui, user-guide, and cloud projects. Use when making documentation changes based on…

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

Lebih banyak skill dari medusajs

mcloud-variables
medusajs
Jalankan perintah mcloud variables untuk mendaftar dan mendapatkan variabel lingkungan untuk lingkungan Cloud. Gunakan saat memeriksa, membaca, atau mengekspor lingkungan…
official
building-storefronts
medusajs
Integrasi frontend berbasis SDK untuk storefront Medusa dengan pola React Query dan aturan pemanggilan API yang kritis. Selalu gunakan Medusa JS SDK untuk semua permintaan API—jangan pernah menggunakan fetch() biasa, karena tidak memiliki header yang diperlukan (kunci API yang dapat dipublikasikan untuk rute toko, autentikasi untuk rute admin). Berikan objek JavaScript biasa ke metode SDK; jangan pernah menggunakan JSON.stringify() pada parameter body, karena SDK menangani serialisasi secara otomatis. Gunakan useQuery untuk permintaan GET dan useMutation untuk permintaan POST/DELETE,...
official
building-admin-dashboard-customizations
medusajs
Ekstensi UI kustom untuk dasbor Admin Medusa menggunakan Admin SDK dan komponen UI Medusa. Muat skill ini TERLEBIH DAHULU untuk pekerjaan UI admin apa pun (perencanaan, implementasi, eksplorasi); server MCP hanya menyediakan referensi API, bukan pola desain atau strategi pemuatan data KRITIS: Selalu gunakan Medusa JS SDK untuk semua permintaan API (jangan pernah menggunakan fetch biasa); pisahkan kueri tampilan dari kueri modal dan invalidasi data tampilan setelah mutasi Implementasikan widget pada halaman yang ada atau buat rute UI kustom;...
official
learning-medusa
medusajs
Bootcamp pengembangan Medusa interaktif langkah demi langkah di mana Anda membangun fitur merek sambil mempelajari pola arsitektur. Tiga pelajaran progresif (total 2–3 jam) mencakup modul, alur kerja, rute API, tautan modul, kait alur kerja, dan kustomisasi antarmuka admin. Verifikasi titik pemeriksaan setelah setiap komponen utama menguji pemahaman konseptual, kualitas kode, dan fungsionalitas sebelum melanjutkan. Memperlakukan kesalahan sebagai peluang mengajar; melakukan debugging bersama dengan pertanyaan diagnostik dan akar penyebab...
official
db-migrate
medusajs
Jalankan migrasi database Medusa yang tertunda dan laporkan hasilnya. Menjalankan npx medusa db:migrate melalui Bash untuk menerapkan semua migrasi yang tertunda ke database Medusa Anda. Melaporkan hasil migrasi termasuk jumlah migrasi yang diterapkan, kesalahan yang ditemui, dan konfirmasi keberhasilan. Dirancang untuk proyek Medusa dengan pengaturan npm/npx standar.
official
mcloud-environments
medusajs
Jalankan perintah mcloud environments untuk mendaftar, mendapatkan, membuat, menghapus, menyebarkan ulang, atau memicu build untuk lingkungan Cloud. Gunakan saat mengelola siklus hidup lingkungan,…
official
db-generate
medusajs
Hasilkan migrasi database untuk modul Medusa dengan satu perintah. Membungkus perintah CLI npx medusa db:generate untuk membuat file migrasi bagi modul Medusa yang ditentukan. Menerima nama modul sebagai argumen dan melaporkan lokasi file migrasi, kesalahan, serta langkah selanjutnya. Secara otomatis menyarankan menjalankan npx medusa db:migrate setelah pembuatan untuk menerapkan migrasi.
official
mcloud-deployments
medusajs
Jalankan perintah mcloud deployments untuk menampilkan daftar deployment, mengambil detail deployment, dan mengambil log build. Gunakan saat menampilkan daftar deployment, memeriksa deployment…
official