一键导入
add-store
Add ecommerce to your site — sells physical goods, digital downloads, services, or software
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add ecommerce to your site — sells physical goods, digital downloads, services, or software
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Update site dependencies and template files to the latest version
Design CSS animations: hover effects, scroll reveals, page transitions
Back up site changes to GitHub, or restore an earlier snapshot
Embed appointment scheduling (Cal.com or Calendly) into the site
Collect and display business hours, address, phone, and LocalBusiness JSON-LD
Add a buy button to sell a product, service, or digital good (Stripe or Polar)
| name | add-store |
| description | Add ecommerce to your site — sells physical goods, digital downloads, services, or software |
| license | ISC |
| compatibility | Designed for Claude Code / compatible agents operating inside an Anglesite project (Astro + Keystatic, Node >=22). Deploy/provisioning steps require a Cloudflare account and Wrangler. |
| allowed-tools | Bash(npx wrangler *), Bash(npm run build), Write, Read, Edit, Glob |
| metadata | {"author":"David W. Keith","version":"1.6.0","source":"https://github.com/Anglesite/anglesite","invocation":"user-facing"} |
Add ecommerce to the owner's site. This skill runs a short conversational intake, determines the right solution, and hands off to the appropriate sub-skill or explains what's coming next.
Read EXPLAIN_STEPS from .site-config. If true or not set, explain before every tool call that will trigger a permission prompt — tell the owner what you're about to do and why in plain English. If false, proceed without pre-announcing tool calls.
Read .site-config and verify:
CF_PROJECT_NAME is set (site has been deployed at least once)If missing, tell the owner: "Before adding a store, your site needs to be deployed at least once. Run /anglesite:deploy to get set up, then come back here."
If ECOMMERCE_PROVIDER is already set in .site-config, check for upgrade opportunities before proceeding:
If the provider is snipcart, count .mdoc files in src/content/products/. If there are 10 or more, tell the owner:
"You have [N] products in your store now. Shopify gives you a dashboard to manage orders, track inventory, and handle shipping — which makes a real difference at this catalog size. Want me to help you migrate to Shopify, or would you prefer to keep using Snipcart?"
If they want to migrate, write ECOMMERCE_PROVIDER=shopify to .site-config and hand off to the shopify-buy-button skill.
If the provider is stripe, count product-related content files. If there are 3 or more, tell the owner:
"With [N] products, your customers might want a shopping cart so they can buy multiple items at once. I can set that up with Snipcart — no monthly fee, just 2% per sale. Interested?"
If they want a cart, route to Snipcart or Shopify based on the standard routing table below.
Otherwise, ask: "You already have [provider] set up. Do you want to add another product, change providers, or do you need help with something else?"
Ask the owner in natural conversation (not a numbered list):
"What are you selling? For example — a physical product like clothing or art, a digital download like templates or presets, a service like consulting, or software?"
Listen for these categories:
If unclear, ask a follow-up. Don't force them into a category — let their words guide you.
If the answer is donations, hand off to the donations skill instead of continuing through the routing table — donation copy, recurrence, and 501(c)(3) tax-receipt semantics differ from product sales.
Ask:
"How many products or offerings do you have — just one or a handful, or more like a full catalog?"
Skip this step if the answer is obviously "one" from Step 1 (e.g., "I want to sell my ebook").
Ask only if the owner is selling physical goods with a full catalog:
"Do you need a dashboard to manage orders, inventory, and shipping? Or would you prefer to keep things simple?"
Skip for all other paths — digital goods, services, and software don't need this question.
Based on the answers, route to the correct solution:
| What | How many | Dashboard | Solution | Status |
|---|---|---|---|---|
| Service / single offering | Few | — | Stripe Payment Links | Ready |
| Donations / fundraising | Any | — | Donations skill (Stripe / Liberapay / GitHub Sponsors) | Ready |
| Digital downloads | Any | — | Polar or Lemon Squeezy | Ready |
| Physical goods | Few | No | Snipcart | Ready |
| Physical goods | Catalog | Yes | Shopify Buy Button | Ready |
| Software / SaaS | Any | — | Paddle | Ready |
For Stripe and Polar routes, save the provider to .site-config and invoke the buy-button skill:
Service / single offering: Write ECOMMERCE_PROVIDER=stripe to .site-config, then follow the buy-button skill's Path A (Stripe Payment Links). Read the buy-button skill and execute Path A.
Digital downloads: Ask the owner which platform they prefer:
"For digital products, I recommend either Polar or Lemon Squeezy — both handle payment processing, file delivery, and international sales tax automatically. Polar charges 4% + processing fees. Lemon Squeezy charges 5% + 50¢ per transaction. Do you have a preference, or should I go with Polar?"
ECOMMERCE_PROVIDER=polar to .site-config, then follow the buy-button skill's Path B (Polar checkout overlay). Read the buy-button skill and execute Path B.ECOMMERCE_PROVIDER=lemonsqueezy to .site-config, then read the lemon-squeezy skill and execute it.For Snipcart route (physical goods, few products, no dashboard), save the provider and invoke the snipcart skill:
Write ECOMMERCE_PROVIDER=snipcart to .site-config, then read the snipcart skill and execute it.
For Shopify Buy Button route (physical goods, full catalog, dashboard), save the provider and invoke the shopify-buy-button skill:
Write ECOMMERCE_PROVIDER=shopify to .site-config, then read the shopify-buy-button skill and execute it.
For Paddle route (software, plugins, SaaS, subscriptions), save the provider and invoke the paddle skill:
Write ECOMMERCE_PROVIDER=paddle to .site-config, then read the paddle skill and execute it.
After the ecommerce sub-skill completes, set up the webhook worker so the site can track revenue for upgrade path assessment. This uses the worker at worker/ecommerce-webhook-worker.js.
Deploy the webhook worker (if not already deployed):
npx wrangler deploy --config worker/wrangler-ecommerce.toml
Set the webhook secret for the chosen provider. Only set the secret for the provider in use:
| Provider | Secret command |
|---|---|
| Snipcart | npx wrangler secret put SNIPCART_SECRET_KEY --config worker/wrangler-ecommerce.toml |
| Stripe | npx wrangler secret put STRIPE_WEBHOOK_SECRET --config worker/wrangler-ecommerce.toml |
| Shopify | npx wrangler secret put SHOPIFY_WEBHOOK_SECRET --config worker/wrangler-ecommerce.toml |
| Polar | npx wrangler secret put POLAR_WEBHOOK_SECRET --config worker/wrangler-ecommerce.toml |
| Lemon Squeezy | npx wrangler secret put LS_WEBHOOK_SECRET --config worker/wrangler-ecommerce.toml |
| Paddle | npx wrangler secret put PADDLE_WEBHOOK_SECRET --config worker/wrangler-ecommerce.toml |
Register the webhook URL with the provider. The URL is https://ecommerce-webhooks.<CF_ACCOUNT_SUBDOMAIN>.workers.dev/webhook/<provider>. Guide the owner to their platform's webhook settings:
| Provider | Where to register |
|---|---|
| Snipcart | https://app.snipcart.com/dashboard/webhooks |
| Stripe | https://dashboard.stripe.com/webhooks |
| Shopify | Shopify admin → Settings → Notifications → Webhooks |
| Polar | https://polar.sh/settings/webhooks |
| Lemon Squeezy | https://app.lemonsqueezy.com/settings/webhooks |
| Paddle | https://vendors.paddle.com/notifications |
Save the webhook URL to .site-config:
ECOMMERCE_WEBHOOK_URL=https://ecommerce-webhooks.<subdomain>.workers.dev
Tell the owner: "I've set up revenue tracking for your store. This lets me give you accurate cost comparisons if your business grows and a different platform would save you money."
After routing, ensure .site-config has:
ECOMMERCE_PROVIDER=stripe|polar|lemonsqueezy|snipcart|shopify|paddle
Write the value that matches the solution the owner chose (or accepted as a fallback). This lets other skills know ecommerce is configured and which provider is in use.