Token导航 LogoToken导航

Agent Skill · 研究检索

load-testing-commerce(负载测试商务)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

load-testing-commerce 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 56,028。

总安装 465周安装 19GitHub Stars 19下载 150核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

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

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助测试设计、自动化测试、用例整理和回归验证。适用于研究检索类任务,可结合来源仓库和原始 README 核验具体用法。通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和安装路径。使用时需确认项目测试框架和运行命令,避免为了通过测试而修改真实逻辑。

load-testing-commerce 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

load-testing-commerce 怎么安装?

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

load-testing-commerce 支持哪些 AI 工具?

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

load-testing-commerce 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

load-testing-commerce 是免费的吗?

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

load-testing-commerce 用的人多吗?

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

load-testing-commerce 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

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

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
load-testing-commerce

负载测试商务 · 本页

46519需要联网未明确有提醒

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

SKILL.md 原文

Load Testing — Commerce

Overview

Load testing e-commerce applications requires more than hammering an endpoint with concurrent requests. Realistic test scenarios simulate actual user behavior: browsing the catalog, searching for products, adding items to a cart, and completing checkout — including the think time between actions. This skill covers building realistic shopping scenarios in k6 and Artillery, interpreting results to find bottlenecks, and establishing performance baselines before major sales events.

When to Use This Skill

  • When preparing for a flash sale, Black Friday, or seasonal traffic spike
  • When deploying a major infrastructure change (new database, CDN, checkout service)
  • When establishing performance SLOs and baselines for a new storefront
  • When a production incident was caused by load and you need to reproduce it in staging
  • When a new checkout feature is being released and its performance impact is unknown

Core Instructions

Step 1: Determine your platform and what you can test

PlatformLoad Testing ScopeRecommended Approach
ShopifyShopify's infrastructure scales automatically — you cannot overload it meaningfullyTest your theme's frontend performance with Google PageSpeed Insights and Lighthouse CI; test any custom apps or storefronts you host separately
WooCommerceYou own the server — load testing is critical before sales eventsUse Loader.io (free tier: 1 target, 10K connections/test) against your staging site; or k6/Artillery for detailed scenario testing
BigCommerceBigCommerce scales automatically — platform infrastructure is not a concernTest your theme's frontend performance with PageSpeed Insights; test any custom middleware or headless layer you host
Custom / HeadlessFull control — load testing is your responsibilityUse k6 (open-source, scriptable) or Artillery (YAML-based) with realistic shopping scenarios against a staging environment

Step 2: Platform-specific load testing


Shopify

Shopify's infrastructure handles virtually any traffic spike. Your load testing focus is the frontend experience:

  1. Run Google PageSpeed Insights on your most critical pages (product page, collection page, checkout):

- Go to pagespeed.web.dev and test your product and collection pages - Target a Performance score of 75+ on mobile; address any red/orange recommendations before your sale

  1. Check Shopify's built-in performance report:

- Go to Online Store → Themes and click View report - This shows your store's Core Web Vitals (LCP, CLS, FID) based on real user data - A poor LCP score on mobile almost always means the hero image needs fetchpriority="high" or compression

  1. Audit your installed apps before a sale:

- Go to Apps in your Shopify admin and review every app injecting scripts into your storefront - Each third-party script adds 50–200ms; remove unused apps and disable any that load synchronously

  1. For Shopify Plus — notify Shopify support before major launches:

- Submit a flash sale notification through your Plus support channel at least 48 hours before the event - Shopify can pre-allocate resources and monitor your store during the event


WooCommerce

WooCommerce runs on your hosting infrastructure. Test against a staging environment that mirrors your production configuration (same PHP version, same MySQL version, same caching stack).

Quick load test with Loader.io (no code required):

  1. Sign up at loader.io (free tier: 1 target, 10K connections per test)
  2. Click New Test and enter your staging URL
  3. Configure a ramp test: start at 0 clients, ramp to your expected peak traffic over 60 seconds, hold for 120 seconds
  4. Loader.io provides a verification token — add it to a page on your staging site to confirm ownership
  5. Run the test against your checkout page specifically — product browse is usually cached; checkout hits the database

Interpret results:

  • Response time under 3 seconds at peak: acceptable
  • Error rate above 1%: investigate server logs for PHP fatal errors, database timeouts, or memory exhaustion
  • If the server struggles at lower than expected traffic: upgrade your hosting tier or add Redis Object Cache before the sale

Before your test, ensure your staging stack is properly configured:

  • Redis Object Cache is active (Settings → Redis — green status)
  • WP Rocket page cache is enabled and has warmed the most-visited product pages
  • You're testing against the same server size you'll run in production

Custom / Headless

For custom storefronts, use k6 or Artillery against a staging environment that mirrors production.

Important before you start:

  • Always test against staging, never production
  • Use test-mode payment tokens (Stripe: tok_visa) — never run load tests against real payment processors
  • Tag test orders with a recognizable email domain (e.g., @test-load.invalid) so you can bulk-delete them after
  • Reserve test products with unlimited inventory so the checkout scenario doesn't fail due to oversells

k6 realistic shopping scenarios:

k6 uses a ramping-arrival-rate executor to control requests per second (more realistic than VU-based approaches). Typical e-commerce traffic distribution: 60% browse, 25% product detail, 10% cart, 5% checkout.

// k6/commerce-load-test.js
import http from 'k6/http';
import { check, sleep } from 'k6';
import { SharedArray } from 'k6/data';

const BASE_URL = __ENV.BASE_URL || 'https://staging.mystore.com';

const products = new SharedArray('products', function() {
  return JSON.parse(open('./data/products.json')); // array of {id, defaultVariantId}
});

export const options = {
  scenarios: {
    catalog_browsing: {
      executor: 'ramping-arrival-rate',
      startRate: 0, timeUnit: '1s',
      preAllocatedVUs: 50, maxVUs: 200,
      stages: [
        { target: 60, duration: '2m' },  // Ramp up
        { target: 60, duration: '5m' },  // Steady state
        { target: 0,  duration: '1m' },  // Ramp down
      ],
      exec: 'catalogBrowsing',
    },
    checkout_flow: {
      executor: 'ramping-arrival-rate',
      startRate: 0, timeUnit: '1s',
      preAllocatedVUs: 10, maxVUs: 50,
      stages: [
        { target: 5, duration: '2m' },
        { target: 5, duration: '5m' },
        { target: 0, duration: '1m' },
      ],
      exec: 'checkoutFlow',
    },
  },
  thresholds: {
    'http_req_duration{scenario:checkout_flow}': ['p(95)<3000'],
    'http_req_failed{scenario:checkout_flow}': ['rate<0.01'],
    'http_req_duration{scenario:catalog_browsing}': ['p(95)<1000'],
  },
};

export function catalogBrowsing() {
  http.get(`${BASE_URL}/api/collections/featured`, { tags: { step: 'homepage' } });
  sleep(2 + Math.random() * 3); // Think time: 2–5s

  const categories = ['t-shirts', 'hoodies', 'accessories'];
  const category = categories[Math.floor(Math.random() * categories.length)];
  http.get(`${BASE_URL}/api/collections/${category}?page=1&sort=popular`, { tags: { step: 'category' } });
  sleep(3 + Math.random() * 5);
}

export function checkoutFlow() {
  const product = products[Math.floor(Math.random() * products.length)];

  // View product
  const productRes = http.get(`${BASE_URL}/api/products/${product.id}`, { tags: { step: 'view_product' } });
  check(productRes, { 'product page 200': r => r.status === 200 });
  sleep(2 + Math.random() * 3);

  // Add to cart
  const cartRes = http.post(`${BASE_URL}/api/cart`, JSON.stringify({
    items: [{ productId: product.id, variantId: product.defaultVariantId, quantity: 1 }],
  }), { headers: { 'Content-Type': 'application/json' }, tags: { step: 'add_to_cart' } });
  check(cartRes, { 'add to cart 200': r => r.status === 200 });
  const cart = JSON.parse(cartRes.body);
  sleep(1 + Math.random() * 2);

  // Start checkout
  const checkoutRes = http.post(`${BASE_URL}/api/checkout/start`, JSON.stringify({
    cartId: cart.id,
    customer: { email: `test-${Math.random().toString(36).slice(7)}@test-load.invalid` },
  }), { headers: { 'Content-Type': 'application/json' }, tags: { step: 'start_checkout' } });
  check(checkoutRes, { 'checkout start 200': r => r.status === 200 });
  const checkout = JSON.parse(checkoutRes.body);
  sleep(5 + Math.random() * 10); // Think time: filling form

  // Place order
  const orderRes = http.post(`${BASE_URL}/api/checkout/complete`, JSON.stringify({
    checkoutId: checkout.id,
    paymentToken: 'tok_visa', // Stripe test token
    shippingMethodId: checkout.shippingMethods[0]?.id,
  }), { headers: { 'Content-Type': 'application/json' }, tags: { step: 'place_order' } });
  check(orderRes, { 'order placed 201': r => r.status === 201 });
}

Artillery YAML config (alternative to k6 — good for API-focused testing):

# artillery/commerce-load-test.yml
config:
  target: "{{ $processEnvironment.BASE_URL }}"
  phases:
    - name: "Warm-up"
      duration: 60
      arrivalRate: 5
    - name: "Ramp up"
      duration: 120
      arrivalRate: 5
      rampTo: 50
    - name: "Peak load"
      duration: 300
      arrivalRate: 50
    - name: "Spike"
      duration: 30
      arrivalRate: 200
    - name: "Recovery"
      duration: 60
      arrivalRate: 20
  processor: "./processors/commerce-helpers.js"

scenarios:
  - name: "Browse catalog"
    weight: 60
    flow:
      - get:
          url: "/api/collections/all?page=1"
          capture:
            json: "$.products[0].id"
            as: "productId"
      - think: 3
      - get:
          url: "/api/products/{{ productId }}"

  - name: "Complete checkout"
    weight: 10
    flow:
      - function: "generateCheckoutData"
      - post:
          url: "/api/cart"
          json:
            productId: "{{ productId }}"
            quantity: 1
          capture:
            json: "$.id"
            as: "cartId"
      - think: 8
      - post:
          url: "/api/checkout/start"
          json:
            cartId: "{{ cartId }}"
            email: "{{ email }}"
          capture:
            json: "$.checkoutId"
            as: "checkoutId"
      - think: 10
      - post:
          url: "/api/checkout/complete"
          json:
            checkoutId: "{{ checkoutId }}"
            paymentToken: "tok_visa"
          expect:
            - statusCode: 201

Run the test and capture a baseline:

k6 run \
  --env BASE_URL=https://staging.mystore.com \
  --out json=results/baseline-$(date +%Y%m%d).json \
  k6/commerce-load-test.js

Analyze results per step using tags:

# Overall summary (k6 outputs this automatically at end of run)
# Per-step breakdown from the JSON output
cat results/baseline-*.json | jq '
  [.data_points[] | select(.type=="Point" and .metric=="http_req_duration")]
  | group_by(.tags.step)
  | map({step: .[0].tags.step, p95_ms: (map(.value) | sort | .[length * 0.95 | floor])})
'

Scale targets for e-commerce:

  • Catalog pages p95 < 1000ms
  • Product detail p95 < 1500ms
  • Checkout flow p95 < 3000ms
  • Error rate < 1% at peak

Run load tests in CI before major releases (GitHub Actions):

# .github/workflows/load-test.yml
name: Load Test (Pre-Release)
on:
  workflow_dispatch:
    inputs:
      target_url:
        description: 'Staging URL to test'
        required: true
        default: 'https://staging.mystore.com'

jobs:
  load-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install k6
        run: |
          curl -s https://dl.k6.io/key.gpg | sudo apt-key add -
          echo "deb https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
          sudo apt-get update && sudo apt-get install k6
      - name: Run load test
        env:
          BASE_URL: ${{ github.event.inputs.target_url }}
        run: k6 run --env BASE_URL=$BASE_URL --out json=results.json k6/commerce-load-test.js
      - uses: actions/upload-artifact@v4
        with:
          name: load-test-results
          path: results.json

Best Practices

  • Simulate think time between steps — real users pause between actions; removing think time creates an unrealistically high request rate that doesn't reflect production patterns
  • Use test-mode payment tokens — always use Stripe's tok_visa or equivalent test tokens; never run load tests against real payment processors
  • Run against staging, not production — load tests consume resources and can degrade service for real customers
  • Profile at 1.5×, 2×, and 3× expected peak — run multiple tests at different load levels to find your system's inflection point before the actual sale
  • Monitor the database and cache during tests — watch for connection pool exhaustion, Redis evictions, and lock wait times in your DB; application-tier throughput can look fine while the database is saturated
  • Tag test orders for easy cleanup — use a consistent test email domain (@test-load.invalid) so you can bulk-delete test data after runs: DELETE FROM orders WHERE email LIKE '%@test-load.invalid'

Common Pitfalls

ProblemSolution
Checkout scenario fails because products are sold outReserve test products with unlimited inventory; use a separate is_load_test_product flag and filter them from real catalog pages
Loader.io test passes but production still slows downStaging may not mirror production load — confirm Redis Object Cache is active, MySQL version matches, and the server size is the same
k6 VUs exhausted before reaching target RPSUse ramping-arrival-rate executor (controls RPS) instead of ramping-vus (controls concurrent users); increase preAllocatedVUs and maxVUs
Alert noise during planned load testsAdd a load test flag to your monitoring system (Datadog tag, Grafana annotation) to suppress non-critical alerts during the scheduled test window
Results not reproducible between runsUse a SharedArray with a fixed dataset file instead of Math.random() product generation; fix the test data set before the run

Related Skills

  • @flash-sale-scaling
  • @monitoring-alerting-commerce
  • @database-optimization-commerce
  • @bot-protection

平台分布

Codex

35.5%
按下载量换算53

Claude

31.19%
按下载量换算47

Cursor

16.41%
按下载量换算25

Gemini CLI

9.64%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills