ecommerce-foundations
CLAUDE.md0 starsChanged 6 months agoMITView on GitHub
Operational guidance for AI coding agents (Claude Code, Cursor, Codex, and any other agent) working on this repository. Read this in full before making any change. ecommerce-foundations is an Agent Skills package distributed via the Claude Code Plugin Marketplace and skills.sh. Each skill is a single SKILL.md file under skills/<skill-name>/, containing YAML frontmatter and markdown content. This repo contains knowledge, not code. There are no executable scripts, no binaries, no SDKs. Every contribution is markdown text plus metadata files (plugin.json,…
In this repository9 other files it gives its agents.
- cart-lifecycleSkill
- catalog-and-product-modelingSkill
- domain-vocabularySkill
- idempotencySkill
- inventory-managementSkill
- order-lifecycleSkill
- payment-flowsSkill
- pricing-and-channelsSkill
- webhooksSkill
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
If you find yourself about to write a Python script, a shell helper, or a JavaScript tool — stop.
- Very specific: line 22
Skill directory name must equal the
namein frontmatter: Always. The validator enforces this and skills.sh indexing depends on it. - Distinctive: line 27
Every skill follows this structure.
- Distinctive: line 75
Every contribution must satisfy all three.
- Distinctive: line 79
Variation dimensions are explicit: Every skill names the axes along which the pattern adapts.
- Distinctive: line 83
Confirm scope: If the request is vertical-specific (pharmacy, marketplace, subscriptions, etc.), redirect to the appropriate vertical pack …
- Very specific: line 84
Locate the existing skill: if it exists. Path: skills/<name>/SKILL.md.
- Distinctive: line 86
Verify before stating: Before adding a non-trivial pattern, check it against the trusted sources (below).
- Distinctive: line 88
Update the README roadmap table: if status changed.
- Distinctive: line 108
Do not create other top-level directories without discussion.
- Distinctive: line 122
When researching a topic, cite these by URL — not by reputation alone.
- Distinctive: line 146
Ask before generating. The cost of regenerating a skill is much higher than the cost of one clarifying question.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Operational guidance for AI coding agents (Claude Code, Cursor, Codex, and any other agent) working on this repository. Read this in full before making any change.
What this repo is
ecommerce-foundations is an Agent Skills package distributed via the Claude Code Plugin Marketplace and skills.sh. Each skill is a single SKILL.md file under skills/<skill-name>/, containing YAML frontmatter and markdown content.
This repo contains knowledge, not code. There are no executable scripts, no binaries, no SDKs. Every contribution is markdown text plus metadata files (plugin.json, marketplace.json, CI config).
If you find yourself about to write a Python script, a shell helper, or a JavaScript tool — stop. That belongs in a different kind of repo.
Hard rules
Non-negotiable. If a request asks you to violate one, push back and clarify intent before proceeding.
- No executable code in skills. No
scripts/, notools/, no binaries. Pure markdown with YAML frontmatter. - No platform-specific recommendations as the default answer. Skills never say "use Stripe" or "use Medusa's module pattern." They describe the space of options and the criteria for choosing.
- No fabricated sources. Citations must point to real, verifiable URLs. If a claim has no source, mark it as inferred or remove it. Never write "as Stripe recommends" without linking.
- No business-specific knowledge in the core layer. Pharmacy, marketplace, subscriptions, B2B quotes belong in vertical packs (separate repositories), not here.
- English only in skill content. Frontmatter, headings, body — all English. The author may communicate with you in Spanish; the deliverable is still English.
- Skill directory name must equal the
namein frontmatter. Always. The validator enforces this and skills.sh indexing depends on it. - Kebab-case everywhere the schema validates it: skill names, plugin name, marketplace name.
Skill authoring template
Every skill follows this structure. Deviations require explicit justification.
---
name: skill-name-in-kebab-case
description: One sentence describing when an agent should load this skill. Must include concrete triggers — keywords, task types, or file patterns.
---
# Skill Title
## Vocabulary
Define every term before using it. If you use "reservation," define it.
If you use "channel," define it. Disambiguate terms that are commonly
confused — "on-hand" vs "available" vs "reserved" vs "committed" are
not synonyms.
## Canonical model
The default mental model. Present it as one possibility, not as the
truth. Make explicit which assumptions it depends on.
## Variation dimensions
The axes along which this pattern adapts. Always include at least:
- Business model (B2C / B2B / marketplace / subscriptions / hybrid)
- Product type (physical / digital / service / mixed)
- Geography (single-region / multi-region)
- Customer model (guest / account-required / B2B hierarchy)
## Decision frameworks
For each major decision the agent will face, present the options,
their trade-offs, and the criteria for choosing. Never pick the
answer for the agent.
## Anti-patterns
Common mistakes with the specific failure mode each one causes
(oversell, double-charge, lost order, race condition, etc.).
## Sources
Real URLs only.The three design principles
Every contribution must satisfy all three. Reject changes that violate them.
- Generic in method, not in answers. A skill describes how to think about a problem and choose between options. It does not prescribe the answer.
- Vocabulary first. A skill defines its terms before using them. Loose terminology is treated as a defect.
- Variation dimensions are explicit. Every skill names the axes along which the pattern adapts.
Workflow when asked to add or modify a skill
- Confirm scope. If the request is vertical-specific (pharmacy, marketplace, subscriptions, etc.), redirect to the appropriate vertical pack repo — do not add it here.
- Locate the existing skill if it exists. Path:
skills/<name>/SKILL.md. - Read related skills first to maintain vocabulary consistency. If
inventory-managementdefines "reserved,"order-lifecyclemust use the same definition. - Verify before stating. Before adding a non-trivial pattern, check it against the trusted sources (below). If you cannot verify, either mark the claim as inferred or remove it.
- Run validation:
claude plugin validate .from the repo root. If the CLI isn't available in the environment, validate JSON/YAML manually against the documented schema. - Update the README roadmap table if status changed.
- Bump version in
plugin.jsonandmarketplace.jsonper semver — see "Versioning."
File structure
ecommerce-foundations/
├── .claude-plugin/
│ ├── plugin.json
│ └── marketplace.json
├── skills/
│ └── <skill-name>/
│ └── SKILL.md
├── .github/workflows/validate.yml
├── CLAUDE.md # this file
├── CONTRIBUTING.md
├── LICENSE
└── README.mdDo not create other top-level directories without discussion. Skills do not have sub-skills — the layout is flat.
Versioning conventions
Semver applied to knowledge content:
- Patch (
0.x.y→0.x.(y+1)): typo fixes, clarifications, minor additions that don't change conclusions. - Minor (
0.x→0.(x+1)): new skills added; existing skills extended without breaking changes. - Major (
x.0.0): skill renamed, removed, split, or its conclusions changed. Migration notes required in the release.
Within a minor version, skill names, frontmatter contracts, and directory layout never change.
Trusted sources
When researching a topic, cite these by URL — not by reputation alone.
- Medusa: https://docs.medusajs.com/
- Sylius: https://docs.sylius.com/
- Stripe: https://docs.stripe.com/
- Shopify: https://shopify.dev/docs
- commercetools: https://docs.commercetools.com/
- Spryker: https://docs.spryker.com/
For DDD foundations, reference Evans's Domain-Driven Design and Vernon's Implementing Domain-Driven Design by chapter, not page number (editions vary).
Anti-patterns specific to this repo
Watch for these. They are easy to slip into.
- The "right answer" trap — writing "you should always reserve stock at cart" instead of describing when each option applies.
- Platform leakage — using Medusa-specific or Stripe-specific terminology as if it were universal vocabulary.
- Vocabulary drift — using "stock," "inventory," and "on-hand" interchangeably inside the same skill.
- Citation by reputation — "as Stripe recommends" without a link to which page.
- Vertical creep — adding pharmacy or marketplace specifics to a core skill instead of a vertical pack.
- Length without density — a skill is not better because it's longer. Cut every sentence that doesn't introduce a decision, a definition, or a trade-off.
When the request is ambiguous
Ask before generating. The cost of regenerating a skill is much higher than the cost of one clarifying question. Common ambiguities worth surfacing:
- Is this for the core layer or a vertical pack?
- Which business model is the asker thinking of (B2C, B2B, marketplace)?
- Is "checkout" being used to mean the full flow or just the payment step?
- Does the new content add a section or replace one?
When asked to do something this file forbids
Push back and reference the specific rule. The author may have forgotten the convention; reminding them is helpful. If after discussion the convention itself should change, update this file in the same change — don't bypass it silently.
When asked to generate code
This is a knowledge repository. Code generation requests are almost always misrouted. Confirm whether the user wants:
- (a) Content for a skill describing a pattern (correct fit — write markdown).
- (b) An actual implementation in their own codebase (wrong fit — redirect them to that codebase).
- (c) A CI helper or validator script for this repo (acceptable, but propose first and keep it minimal).
Self-check before opening a PR
- Does every new term appear in the Vocabulary section before use?
- Does the skill name "answers" or "frameworks"? It should frame, not prescribe.
- Are all citations real URLs?
- Did I update the README roadmap if status changed?
- Did I bump
versioninplugin.jsonandmarketplace.jsonappropriately? - Does
claude plugin validate .pass? - Is the content English-only?
- Is the skill directory name identical to the frontmatter
name?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

