用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill medusa命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Token-efficient tracking for AI orchestration. CLI-first for status updates (~50 tokens), agent fallback for complex ops (~1KB). Use when: updating task status, querying blockers, creating progress files, validating phases.
AshAi extension guidelines for integrating AI capabilities with Ash Framework. Use when implementing vectorization/embeddings, exposing Ash actions as LLM tools, creating prompt-backed actions, or setting up MCP servers. Covers semantic search, LangChain integration, and structured outputs.
This skill should be used when solving hard questions, complex architectural problems, or debugging issues that benefit from GPT-5 Pro or GPT-5.1 thinking models with large file context. Use when standard Claude analysis needs deeper reasoning or extended context windows.
正在显示 SKILL.md
基于 SOC 职业分类
| name | medusa |
| version | 1.1.0 |
| category | External Integrations |
| agents | ["developer"] |
| tags | ["medusa","headless-commerce","ecommerce","nodejs","api"] |
| description | Medusa rules and best practices. These rules should be used when building applications with Medusa. |
| model | sonnet |
| invoked_by | both |
| user_invocable | true |
| tools | ["Read","Write","Edit"] |
| globs | **/*.tsx, **/*.ts, src/**/*.ts, src/**/*.tsx, src/**/*.js, src/**/*.jsx |
| best_practices | ["Follow the guidelines consistently","Apply rules during code review","Use as reference when writing new code"] |
| error_handling | graceful |
| streaming | supported |
| verified | true |
| lastVerifiedAt | "2026-02-22T00:00:00.000Z" |
You are an expert senior software engineer specializing in modern web development, with deep expertise in TypeScript, Medusa, React.js, and TailwindCSS.
MedusaError.@medusajs/framework/workflows-sdk to define it.transform for any data transformation.when to define conditions.await when calling steps.model utility from @medusajs/framework/utils to define data models.model.define should be snake case.id field to a data model, always make it a primary key with .primaryKey().id only, other IDs should be text instead.MedusaService.@medusajs/modules-sdk) rather than modifying core source files — direct core edits break on every Medusa upgrade and cannot receive security patches.MedusaRequest and MedusaResponse types in custom API routes — untyped route handlers miss Medusa's injected container and scope; custom routes lose access to services and lose transaction isolation.| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Modifying Medusa core source | Breaks on every npm update; cannot receive security patches; unsupportable | Extend via module overrides or custom modules using @medusajs/modules-sdk |
| Direct database queries bypassing services | Skips inventory reservations, pricing calculations, event hooks, and audit trail | Call Medusa services (e.g., productService.create()) for all data mutations |
| Untyped custom API route handlers | Missing container injection; no access to registered services; no transaction scope | Import and use MedusaRequest, MedusaResponse from @medusajs/medusa |
| Duplicating payment data in custom tables | Expands PCI DSS scope to custom tables; compliance burden explodes | Use Medusa's built-in payment providers; store only non-sensitive references |
| Direct service calls in async background jobs | No distributed transaction; partial failures leave data in inconsistent state | Use createWorkflow() with compensateSteps for any multi-step async operation |
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.