Token导航 LogoToken导航

Agent Skill · 前端设计

benchmarking(benchmarking 搜索)

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

benchmarking 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 6,920。

总安装 442周安装 19GitHub Stars 2,531下载 155核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/garden-co/jazz --skill benchmarking

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

benchmarking 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中整理协作事项。适用于围绕仓库状态、代码变更或协作流程进行信息梳理。

通过 npx skills add 命令从指定 GitHub 仓库安装并使用。安装前需确认权限范围、维护状态及是否触发联网或文件操作。建议结合原始 README 核验具体用法和功能边界。

来源仓库内路径:skills/benchmarking

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

benchmarking 怎么安装?

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

benchmarking 支持哪些 AI 工具?

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

benchmarking 需要什么权限?

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

benchmarking 是免费的吗?

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

benchmarking 用的人多吗?

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

benchmarking 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 2,531 星,维护活跃度相对可查。

先想清楚的地方

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

适不适合你

更适合

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

不太适合

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

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
benchmarking

benchmarking 搜索 · 本页

4422,531需要联网未明确通过

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

SKILL.md 原文

Writing Benchmarks

When to Use This Skill

  • Comparing implementations: Measuring old vs new approach after an optimization
  • Regression testing: Verifying a refactor doesn't degrade performance
  • Comparing with published version: Benchmarking workspace code against the latest published npm package

Do NOT Use This Skill For

  • General app-level performance optimization (use jazz-performance)
  • Profiling or debugging slow user-facing behavior

Directory Structure

All benchmarks live in the bench/ directory at the repository root:

bench/
├── package.json              # Dependencies: cronometro, cojson, jazz-tools, vitest
├── jazz-tools/               # jazz-tools benchmarks
│   └── *.bench.ts

File Naming

Benchmark files follow the pattern: <subject>.<operation>.bench.ts

Each file should focus on a single benchmark comparing multiple implementations (e.g., @latest vs @workspace).

Examples:

  • comap.create.jazz-tools.bench.ts — benchmarks CoMap creation
  • filestream.getChunks.bench.ts — benchmarks FileStream.getChunks()
  • filestream.asBase64.bench.ts — benchmarks FileStream.asBase64()
  • binaryCoStream.write.bench.ts — benchmarks binary stream writes

Benchmark Library: cronometro

Benchmarks use cronometro, which runs each test in an isolated worker thread for accurate measurement.

Basic Template

import cronometro from "cronometro";

const TOTAL_BYTES = 5 * 1024 * 1024;
let data: SomeType;

await cronometro(
  {
    "operation - @latest": {
      async before() {
        // Setup — runs once before the test iterations
        data = prepareTestData(TOTAL_BYTES);
      },
      test() {
        // The code being benchmarked — runs many times
        latestImplementation(data);
      },
      async after() {
        // Cleanup — runs once after all iterations
        cleanup();
      },
    },
    "operation - @workspace": {
      async before() {
        data = prepareTestData(TOTAL_BYTES);
      },
      test() {
        workspaceImplementation(data);
      },
      async after() {
        cleanup();
      },
    },
  },
  {
    iterations: 50,
    warmup: true,
    print: {
      colors: true,
      compare: true,
    },
    onTestError: (testName: string, error: unknown) => {
      console.error(`\nError in test "${testName}":`);
      console.error(error);
    },
  },
);

Single Cronometro Instance Per Benchmark

Each benchmark file should have a single cronometro() call that compares multiple implementations of the same operation. This makes results easier to read and compare:

import cronometro from "cronometro";

const TOTAL_BYTES = 5 * 1024 * 1024;
let data: InputType;

await cronometro(
  {
    "operationName - @latest": {
      async before() {
        data = generateInput(TOTAL_BYTES);
      },
      test() {
        latestImplementation(data);
      },
      async after() {
        cleanup();
      },
    },
    "operationName - @workspace": {
      async before() {
        data = generateInput(TOTAL_BYTES);
      },
      test() {
        workspaceImplementation(data);
      },
      async after() {
        cleanup();
      },
    },
  },
  {
    iterations: 50,
    warmup: true,
    print: { colors: true, compare: true },
    onTestError: (testName: string, error: unknown) => {
      console.error(`\nError in test "${testName}":`);
      console.error(error);
    },
  },
);

Key principles:

  • One file = one benchmark (e.g., getChunks, asBase64, write)
  • One cronometro call comparing @latest vs @workspace (or old vs new)
  • Fixed data size at the top of the file (e.g., const TOTAL_BYTES = 5 * 1024 * 1024)
  • Descriptive test names with format "operation - @implementation"

Comparing workspace vs published package

To compare current workspace code against the latest published version:

1. Add npm aliases to bench/package.json:

{
  "dependencies": {
    "cojson": "workspace:*",
    "cojson-latest": "npm:cojson@0.20.7",
    "jazz-tools": "workspace:*",
    "jazz-tools-latest": "npm:jazz-tools@0.20.7"
  }
}

Then run pnpm install in bench/.

2. Import both versions:

import * as localTools from "jazz-tools";
import * as latestPublishedTools from "jazz-tools-latest";
import { WasmCrypto as LocalWasmCrypto } from "cojson/crypto/WasmCrypto";
import { WasmCrypto as LatestPublishedWasmCrypto } from "cojson-latest/crypto/WasmCrypto";

3. Use @ts-expect-error when passing the published package since the types won't match the workspace version:

ctx = await createContext(
  // @ts-expect-error version mismatch
  latestPublishedTools,
  LatestPublishedWasmCrypto,
);

Benchmarking with a Jazz context

When benchmarking CoValues (not standalone functions), create a full Jazz context. Use this helper pattern:

async function createContext(tools: typeof localTools, wasmCrypto: typeof LocalWasmCrypto) {
  const ctx = await tools.createJazzContextForNewAccount({
    creationProps: { name: "Bench Account" },
    peers: [],
    crypto: await wasmCrypto.create(),
    sessionProvider: new tools.MockSessionProvider(),
  });
  return { account: ctx.account, node: ctx.node };
}

Key points:

  • Pass peers: [] — benchmarks don't need network sync
  • Use MockSessionProvider — avoids real session persistence
  • Call (ctx.node as any).gracefulShutdown() in after() to clean up

Test data strategy

Define a fixed data size constant at the top of the file, then generate test data inside the before hook:

const TOTAL_BYTES = 5 * 1024 * 1024; // 5MB

let chunks: Uint8Array[];

await cronometro({
  "operationName - @workspace": {
    async before() {
      chunks = makeChunks(TOTAL_BYTES, CHUNK_SIZE);
    },
    test() {
      doWork(chunks);
    },
  },
}, options);

Choose a size large enough to measure meaningfully. Small data (e.g., 100KB) may complete so fast that measurement noise dominates. 5MB is typically a good default for file/stream operations.

All fixture generation must be done inside the before hook, not at module level. This ensures data is created in the same worker thread that runs the test.

Running Benchmarks

Add a script entry to bench/package.json:

{
  "scripts": {
    "bench:mytest": "node --experimental-strip-types --no-warnings ./jazz-tools/mytest.jazz-tools.bench.ts"
  }
}

Then run from the bench/ directory:

cd bench
pnpm run bench:mytest

Critical Gotchas

1. Use node --experimental-strip-types, NOT tsx

Cronometro spawns worker threads that re-import the benchmark file. Workers don't inherit tsx's custom ESM loader, so the TypeScript import fails silently and the benchmark hangs forever.

Use node --experimental-strip-types --no-warnings instead:

"bench:foo": "node --experimental-strip-types --no-warnings ./jazz-tools/foo.bench.ts"

2. before/after hooks MUST be async or accept a callback

Cronometro's lifecycle hooks expect either:

  • An async function (returns a Promise)
  • A function that accepts and calls a callback parameter

A plain synchronous function that does neither will silently prevent the test from ever starting, causing the benchmark to hang indefinitely:

// BAD — test never starts, benchmark hangs
{
  before() {
    data = generateInput();  // sync, no callback, no promise
  },
  test() { ... },
}

// GOOD — async function returns a Promise
{
  async before() {
    data = generateInput();
  },
  test() { ... },
}

// ALSO GOOD — callback style
{
  before(cb: () => void) {
    data = generateInput();
    cb();
  },
  test() { ... },
}

3. test() can be sync or async

Unlike before/after, the test function works correctly as a plain synchronous function. Make it async only if the code under test is genuinely asynchronous.

4. TypeScript constraints under --experimental-strip-types

Node's type stripping handles annotations, as casts, and ! assertions. But it does not support:

  • enum declarations (use const objects instead)
  • namespace declarations
  • Parameter properties in constructors (constructor(private x: number))
  • Legacy import = / export = syntax

Keep benchmark files to simple TypeScript that only uses type annotations, interfaces, type aliases, and casts.

Example: Full Benchmark

This example shows a benchmark comparing getChunks() between the published package and workspace code:

import cronometro from "cronometro";
import * as localTools from "jazz-tools";
import * as latestPublishedTools from "jazz-tools-latest";
import { WasmCrypto as LocalWasmCrypto } from "cojson/crypto/WasmCrypto";
import { cojsonInternals } from "cojson";
import { WasmCrypto as LatestPublishedWasmCrypto } from "cojson-latest/crypto/WasmCrypto";

const CHUNK_SIZE = cojsonInternals.TRANSACTION_CONFIG.MAX_RECOMMENDED_TX_SIZE;
const TOTAL_BYTES = 5 * 1024 * 1024;

function makeChunks(totalBytes: number, chunkSize: number): Uint8Array[] {
  const chunks: Uint8Array[] = [];
  let remaining = totalBytes;
  while (remaining > 0) {
    const size = Math.min(chunkSize, remaining);
    const chunk = new Uint8Array(size);
    for (let i = 0; i < size; i++) {
      chunk[i] = Math.floor(Math.random() * 256);
    }
    chunks.push(chunk);
    remaining -= size;
  }
  return chunks;
}

type Tools = typeof localTools;

async function createContext(tools: Tools, wasmCrypto: typeof LocalWasmCrypto) {
  const ctx = await tools.createJazzContextForNewAccount({
    creationProps: { name: "Bench Account" },
    peers: [],
    crypto: await wasmCrypto.create(),
    sessionProvider: new tools.MockSessionProvider(),
  });
  return { account: ctx.account, node: ctx.node, FileStream: tools.FileStream };
}

function populateStream(ctx: Awaited<ReturnType<typeof createContext>>, chunks: Uint8Array[]) {
  let totalBytes = 0;
  for (const c of chunks) totalBytes += c.length;
  const stream = ctx.FileStream.create({ owner: ctx.account });
  stream.start({ mimeType: "application/octet-stream", totalSizeBytes: totalBytes });
  for (const chunk of chunks) stream.push(chunk);
  stream.end();
  return stream;
}

const benchOptions = {
  iterations: 50,
  warmup: true,
  print: { colors: true, compare: true },
  onTestError: (testName: string, error: unknown) => {
    console.error(`\nError in test "${testName}":`);
    console.error(error);
  },
};

let readCtx: Awaited<ReturnType<typeof createContext>>;
let readStream: ReturnType<typeof populateStream>;

await cronometro(
  {
    "getChunks - @latest": {
      async before() {
        readCtx = await createContext(
          // @ts-expect-error version mismatch
          latestPublishedTools,
          LatestPublishedWasmCrypto,
        );
        readStream = populateStream(readCtx, makeChunks(TOTAL_BYTES, CHUNK_SIZE));
      },
      test() {
        readStream.getChunks();
      },
      async after() {
        (readCtx.node as any).gracefulShutdown();
      },
    },
    "getChunks - @workspace": {
      async before() {
        readCtx = await createContext(localTools, LocalWasmCrypto);
        readStream = populateStream(readCtx, makeChunks(TOTAL_BYTES, CHUNK_SIZE));
      },
      test() {
        readStream.getChunks();
      },
      async after() {
        (readCtx.node as any).gracefulShutdown();
      },
    },
  },
  benchOptions,
);

Checklist

  • One benchmark file per operation (e.g., filestream.getChunks.bench.ts)
  • Single cronometro() call comparing @latest vs @workspace
  • Fixed data size constant at top of file (e.g., const TOTAL_BYTES = 5 * 1024 * 1024)
  • Benchmark file placed in bench/jazz-tools/ with *.bench.ts naming
  • Script added to bench/package.json using node --experimental-strip-types --no-warnings
  • before/after hooks are async (not plain sync)
  • iterations set to at least 50 for stable results
  • warmup: true enabled
  • onTestError handler included to surface worker failures
  • Test names follow format "operation - @implementation" (e.g., "getChunks - @workspace")
  • When comparing vs published: npm aliases added to bench/package.json and pnpm install run
  • When using Jazz context: gracefulShutdown() called in after() hook
  • Test data generated inside before() hooks (not at module level or inside test())

平台分布

Codex

32.75%
按下载量换算51

Claude

31.11%
按下载量换算48

Cursor

17.49%
按下载量换算27

Gemini CLI

9.78%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills