Token导航 LogoToken导航

Agent Skill · 开发

edge-commerce(边缘商务)

edge-commerce 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

edge-commerce 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 16,733。

总安装 474周安装 19GitHub Stars 19下载 154核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:edge-commerce(边缘商务)
来源仓库:https://github.com/finsilabs/awesome-ecommerce-skills
仓库路径:skills/edge-commerce
安装命令:
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill edge-commerce
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill edge-commerce

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

edge-commerce 利用边缘计算降低电商延迟,支持地理路由、个性化注入与分布式缓存。适用于国际用户访问缓慢、需区域化内容分发或实时 A/B 测试而不依赖中心 origin 的场景。通过 CDN PoP 就近执行代码,TTFB 可从数百毫秒降至 50ms 以内,显著改善用户体验。

安装命令:npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill edge-commerce 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/edge-commerce

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill edg…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

edge-commerce 怎么安装?

在终端执行 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill edge-commerce。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

edge-commerce 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

edge-commerce 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

edge-commerce 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

edge-commerce 用的人多吗?

公开数据是累计安装 474 次,近一周安装 19 次,下载 154 次,GitHub 19 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

edge-commerce 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
edge-commerce

边缘商务 · 本页

47419调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Edge Commerce

Overview

Edge computing executes code in the CDN PoP closest to each user, reducing latency from hundreds of milliseconds (round-trip to a central origin) to under 50ms. For e-commerce, this enables geo-routing (redirect UK users to a UK storefront), edge-side personalization (inject user tier into cached pages), instant A/B testing without origin round-trips, and distributed inventory caching via edge KV stores.

When to Use This Skill

  • When pages routed through a central origin have high TTFB (>300ms) for international users
  • When you need to redirect users to region-specific storefronts or localized product catalogs
  • When you want to run A/B tests without adding JavaScript that delays page rendering
  • When building a multi-region deployment where each region needs its own origin but shares a single domain

Core Instructions

Step 1: Determine your platform and what edge computing can do for you

PlatformEdge CapabilitiesHow to Use Them
ShopifyShopify's CDN (Fastly) already serves stores from global edge locationsUse Shopify Markets for geo-routing and multi-currency without custom edge code; Markets handles currency, language, and domain routing natively
WooCommerceAdd Cloudflare as your CDN/proxy to get edge capabilitiesCloudflare Workers (free tier: 100k requests/day) adds edge logic; configure in Cloudflare dashboard after adding your domain
BigCommerceBigCommerce uses Fastly CDN globallyUse BigCommerce's built-in multi-storefront feature for geo-routing; for custom edge logic add Cloudflare in front
Custom / HeadlessFull control — choose Cloudflare Workers, Vercel Edge Middleware, or Fastly ComputeBuild custom geo-routing, A/B testing, and personalization at the edge; see implementation below

Step 2: Configure geo-routing on your platform


Shopify: Use Shopify Markets
  1. Go to Settings → Markets in your Shopify admin
  2. Click Add market and select the countries/regions for your new market
  3. Configure per-market settings:

- Currency: set the local currency (Shopify handles conversion automatically) - Language: assign a translated theme version - Domain/subdomain: e.g., uk.yourstore.com routes UK visitors automatically

  1. Shopify automatically redirects users to their market based on IP geolocation — no custom code needed
  2. For manual market URL overrides: Shopify's cookie-based market selector handles users who want to change their market

WooCommerce: Cloudflare Workers geo-routing
  1. Add your domain to Cloudflare (free plan is sufficient for geo-routing)
  2. Go to Workers & Pages → Create Worker in the Cloudflare dashboard
  3. Add a simple geo-redirect rule:
// Cloudflare Worker — deploy via Cloudflare dashboard
export default {
  async fetch(request) {
    const country = request.headers.get('CF-IPCountry') ?? 'US';
    const url = new URL(request.url);

    // Redirect UK users to UK store variant
    if (country === 'GB' && !url.pathname.startsWith('/uk')) {
      return Response.redirect(`https://${url.hostname}/uk${url.pathname}`, 302);
    }

    return fetch(request);
  }
};
  1. In Worker settings, add a Route that matches your domain: *yourstore.com/*
  2. For currency/language: use a WooCommerce multi-currency plugin (WPML + WooCommerce Multilingual, or Aelia Currency Switcher) that reads the URL path or a cookie set by the Worker

Custom / Headless

Vercel Edge Middleware (Next.js) for geo-routing:

// middleware.ts — runs at the edge globally, <5ms
import { NextRequest, NextResponse } from 'next/server';
import { geolocation } from '@vercel/functions';

const REGION_MAP: Record<string, string> = {
  GB: 'uk', DE: 'de', FR: 'fr', CA: 'ca', AU: 'au',
};

export function middleware(request: NextRequest) {
  const { country } = geolocation(request);
  const region = country ? REGION_MAP[country] : null;

  // Redirect root to regional store
  if (region && request.nextUrl.pathname === '/') {
    const url = request.nextUrl.clone();
    url.pathname = `/${region}`;
    return NextResponse.redirect(url, { status: 302 });
  }

  // Pass country to origin for catalog/pricing logic
  const response = NextResponse.next();
  if (country) response.headers.set('x-user-country', country);
  return response;
}

export const config = { matcher: ['/', '/products/:path*', '/collections/:path*'] };

Edge A/B testing (assign variant once, persist in cookie):

// In middleware.ts — no origin round-trip needed
const EXPERIMENTS = [
  { id: 'checkout-cta', buckets: [{ name: 'control', weight: 0.5 }, { name: 'variant-a', weight: 0.5 }] },
];

function assignVariant(buckets: Array<{name: string; weight: number}>) {
  let r = Math.random(), cumulative = 0;
  for (const b of buckets) {
    cumulative += b.weight;
    if (r < cumulative) return b.name;
  }
  return buckets[0].name;
}

// Add to existing middleware function:
for (const exp of EXPERIMENTS) {
  const cookieName = `ab_${exp.id}`;
  let variant = request.cookies.get(cookieName)?.value;
  if (!variant) {
    variant = assignVariant(exp.buckets);
    response.cookies.set(cookieName, variant, { maxAge: 30 * 24 * 3600, httpOnly: true });
  }
  response.headers.set(`x-ab-${exp.id}`, variant); // available in your app for rendering
}

Cloudflare Workers KV for edge inventory caching:

// cloudflare-worker.ts — inventory cached at every Cloudflare PoP globally
export default {
  async fetch(request: Request, env: Env): Promise<Response> {
    const url = new URL(request.url);

    if (url.pathname.startsWith('/api/inventory/')) {
      const productId = url.pathname.replace('/api/inventory/', '');
      const cached = await env.INVENTORY_KV.get(productId, 'json');

      if (cached) {
        return new Response(JSON.stringify(cached), {
          headers: { 'Content-Type': 'application/json', 'X-Edge-Cache': 'HIT' },
        });
      }

      // Cache miss — fetch from origin and store for 60 seconds
      const data = await fetch(`${env.ORIGIN_URL}/api/inventory/${productId}`).then(r => r.json());
      await env.INVENTORY_KV.put(productId, JSON.stringify(data), { expirationTtl: 60 });
      return new Response(JSON.stringify(data), {
        headers: { 'Content-Type': 'application/json', 'X-Edge-Cache': 'MISS' },
      });
    }

    return fetch(request);
  },
};

KV namespace wrangler.toml:

name = "commerce-edge"
main = "src/index.ts"
compatibility_date = "2025-01-01"
[[kv_namespaces]]
binding = "INVENTORY_KV"
id = "your-kv-namespace-id"

Vercel Edge Config for instant feature flags:

// Read feature flags at edge — ~0ms latency (stored in PoP)
import { get } from '@vercel/edge-config';

export async function middleware(request: NextRequest) {
  const maintenanceMode = await get<boolean>('maintenance_mode');
  if (maintenanceMode) {
    return NextResponse.rewrite(new URL('/maintenance', request.url));
  }
  return NextResponse.next();
}

Step 3: Monitor edge performance

Regardless of platform, measure these metrics:

  1. TTFB from multiple regions — use tools like WebPageTest.org with test locations in US, EU, and Asia; target under 200ms TTFB from each region
  2. CDN cache hit rate — Cloudflare: Analytics → Performance → Cache hit rate (target 90%+); Shopify: check Lighthouse via Online Store → Themes → View report
  3. Edge error rate — Cloudflare: Workers → Metrics; Vercel: Deployments → Functions tab
  4. Geographic latency breakdown — Cloudflare Analytics shows latency by country; use this to identify regions that would benefit from an additional origin

Best Practices

  • Use edge for routing decisions, not business logic — edge functions are best for fast decisions based on request metadata (country, cookie, header); complex business logic (pricing, inventory) belongs at the origin with a result cached at the edge
  • Keep edge functions fast — Cloudflare Workers have 10ms CPU limit on free plan, 30ms on paid; avoid synchronous external API calls from edge middleware on the critical path
  • Pre-populate KV before product launches — Workers KV has eventual consistency; pre-populate edge inventory cache before a flash sale via the KV REST API
  • Test geo-routing from multiple locations — use a VPN to verify redirect logic; production geo-routing mistakes affect all users in a region

Common Pitfalls

ProblemSolution
Edge making external API calls on every requestCache external data in Edge Config or Workers KV; never make synchronous third-party API calls from edge middleware on the critical path
Personalized responses cached without Vary headerSet Vary: Cookie or a custom header that differentiates personalized responses; without it, one user's content can be served to others
Workers KV stale inventory causing oversellsUse edge KV only for displaying inventory status; always validate against the authoritative inventory source at checkout time
A/B variant flickering on first loadSet the variant cookie in the response before the page renders; on first visit, set the cookie and redirect to ensure consistent rendering

Related Skills

  • @ecommerce-caching
  • @flash-sale-scaling
  • @monitoring-alerting-commerce
  • @image-optimization-cdn

平台分布

Codex

34.03%
按下载量换算52

Claude

33.18%
按下载量换算51

Cursor

18.85%
按下载量换算29

Gemini CLI

10.41%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills