Agent skill

Benchmark

by cometkim in cometkim/unicode-segmenter

Measure runtime perf, bundle size, and memory impact of unicode-segmenter changes.

MITAuto-check passedFrontend & Design

Install Benchmark

skills CLI
$ npx skills add cometkim/unicode-segmenter --skill benchmark -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cometkim/unicode-segmenter benchmark --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cometkim/unicode-segmenter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/benchmark .claude/skills/benchmark && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
benchmark
GitHub stars
112
Token cost
~1.3k tokens
SKILL.md length
662 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Measure runtime perf, bundle size, and memory impact of unicode-segmenter changes.

  • Works in 3 steps: Materialize the baseline's module… → Write one scratch mitata script… → Run at least twice with declaration…
  • Evaluating any src/ change
  • SKILL.md covers Commands, Interpreting results, A/B against a baseline revision and Size-sensitive coding notes…, plus 1 more section
  • Calls yarn, node and bun

What it does

Benchmark is an agent skill from cometkim/unicode-segmenter. Measure runtime perf, bundle size, and memory impact of unicode-segmenter changes. Use when evaluating any src/ change, running yarn perf / bundle-stats / memory-stats, comparing against a baseline revision, or when benchmark numbers look noisy or contradictory.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Web performance. The repository describes itself as: A lightweight implementation of the Unicode Text Segmentation (UAX 29). The licence is MIT.

When your agent uses it

  • Evaluating any src/ change
  • Running yarn perf / bundle-stats / memory-stats
  • Comparing against a baseline revision
  • Benchmark numbers look noisy

Example prompts

  • “/benchmark”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Materialize the baseline's module closure with read-only git into the scratchpad
  2. Write one scratch mitata script importing BOTH implementations plus _testcases.js, registering old/new for each case in the same process.
  3. Run at least twice with declaration order swapped to detect order bias.

What it can do on your machine

Read from SKILL.md and the folder at commit 5d3c738. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • yarn
    • node
    • bun
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use yarn and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Benchmark loads about 1.3k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 662 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cometkim/unicode-segmenter at commit 5d3c738, republished under its MIT licence (© cometkim). 662 words, ~1,290 tokens.

Download SKILL.mdSave it as .claude/skills/benchmark/SKILL.md (or your agent's skills folder).
name
benchmark
description
Measure runtime perf, bundle size, and memory impact of unicode-segmenter changes. Use when evaluating any src/ change, running yarn perf / bundle-stats / memory-stats, comparing against a baseline revision, or when benchmark numbers look noisy or contradictory.

Benchmarking unicode-segmenter

This library's priorities, in order: bundle size, runtime perf, memory footprint. Measure all three before claiming a change is a win — they regularly trade against each other.

Commands

AxisCommandNotes
Runtime perf (Node)yarn perf:grapheme (also :general, :emoji)mitata; script passes --expose-gc
Runtime perf (Bun)bun --bun run perf:grapheme--bun forces the Bun runtime instead of Node
Runtime perf (browser)yarn perf:grapheme:browservite page; capture procedure in the bench-records skill
Runtime perf (Hermes / QuickJS)yarn perf:grapheme:hermes, yarn perf:grapheme:quickjsMetro-based; see Metro warning
Bundle sizeyarn bundle-stats:graphemeesbuild; minified + gzip + brotli per library
Hermes bytecodeyarn bundle-stats:grapheme:hermesReact Native proxy metric
Memoryyarn memory-stats:graphemeretained heap per library; forked child per lib, median of 5 samples × 10 uses

Benchmarks import src/*.js directly — no build step needed, current checkout state is what gets measured.

Bundle-stats env options: PRINT_FORMAT=markdown prints a README-ready markdown table instead of console.table; UPDATE_README=true rewrites the matching README comparison table in place (rows/columns matched by name ignoring * footnote marks, which are preserved; hand-maintained cells like Unicode®/ESM? and the Intl.Segmenter row are untouched).

Interpreting results

  • Compare ratios within a run, not absolute ns across runs. Apple Silicon clock scaling (3.7–4.5 GHz observed on M4 Pro) swings absolute numbers ±20% between runs. Each perf run includes the competitors, so the summary "x faster than" lines are the stable signal.
  • Take best-of-3 when absolute numbers matter; close heavy apps first.
  • Do not add mitata's .gc('inner') when comparing — it attributes per-iteration GC cost to the benchmark and distorts small cases.
  • For bundle size, gzip/brotli are what users pay. Raw or minified chars can move opposite to compressed size (the base36-VLQ data encoding beats base64 after gzip despite more raw characters).
  • Per-case reporting: the six shared cases (ASCII, emoji/ZWJ, Hindi/InCB, Zalgo, tweet, code) rarely move in one direction. Report each; flag any case regressing >10%.

A/B against a baseline revision

Never move test inputs by copy-paste: they contain invisible codepoints (ZWJ, variation selectors) and were mangled exactly that way once. Always import benchmark/grapheme/_testcases.js.

  1. Materialize the baseline's module closure with read-only git into the scratchpad: git show origin/main:src/grapheme.js > <scratch>/baseline/grapheme.js — repeat for core.js, _grapheme_data.js, and whatever else that revision imports.
  2. Write one scratch mitata script importing BOTH implementations plus _testcases.js, registering old/new for each case in the same process.
  3. Run at least twice with declaration order swapped to detect order bias.
Show full SKILL.md (271 more words)Show less

Size-sensitive coding notes (learned the hard way)

  • esbuild inlines const-bound numeric literals into every use site but preserves let bindings. That makes a shared let bound tempting for size, but it compiles to a mutable context slot the engine cannot fold into the comparison: hoisting the hottest bound in src/grapheme.js into a let measured up to 25% slower on the count loop, and removing the three shared bounds was also smaller after gzip. Spell hot-path bounds out as literals.
  • Hot-loop helpers live near engine inlining cliffs — check them with --trace-turbo-inlining (prints bytecode size: N) after any edit to cat() or nextState(). TurboFan refuses callees at 460 bytecodes (cat sat at 453 before it was split into cat/catRare; falling off cost 15-45%), Maglev refuses at 100 (nextState must stay ≤ 99, worth 8-26% there). Measure the mid/low tiers with node --no-turbofan and node --jitless; a change can win big on TurboFan and still lose on Maglev.
  • Generator syntax is the deliberate choice over a class-based iterator: a class was 13–34% faster on V8 but cost ~+1.6 KiB Hermes bytecode after Babel class lowering (Hermes can't parse class syntax natively). Don't convert to a class without re-measuring V8, JSC, Hermes, and all three size metrics.
  • codePointAt() beat manual charCodeAt surrogate pairing on every measured engine (17–20% faster on Hermes) and is smaller. Don't "optimize" it back.

Metro warning (Hermes scripts)

Metro spawns a worker farm per invocation. When calling Metro programmatically (custom measurement pipelines, loops), always pass maxWorkers: 1 in the Metro.loadConfig overrides — a runaway farm once spawned enough node processes to freeze the machine. One-off runs of the repo's own scripts are fine.

© cometkim, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/benchmark of cometkim/unicode-segmenter.

Open the folder on GitHubat commit 5d3c738

Compare with similar skills

Benchmark next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Benchmark compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Benchmark this skillcometkim/unicode-segmenter112—~1.3kAutomated safety check: PassMIT
React Doctormakeplane/plane61k12 repos~657Automated safety check: PassAGPL-3.0
Fixing Motion Performanceibelick/ui-skills9.5k5 repos~1.4kAutomated safety check: PassMIT
GSAP Performance Tuninggreensock/gsap-skills16k4 repos~1kAutomated safety check: PassMIT
React Frontend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2.9kAutomated safety check: PassMIT
Web Quality Auditaddyosmani/web-quality-skills2.9k—~2.6kAutomated safety check: PassMIT

Similar skills

  • React Doctor

    makeplane/plane

    Scans React code for lint, accessibility, bundle size and architecture issues, reports a health score and checks that changes do not lower it.

    61k GitHub starsUsed in 12 repos~657 tokens
    Frontend & DesignAuto-check passed
  • Fixing Motion Performance

    ibelick/ui-skills

    Audits and fixes web animation performance: layout thrashing, work that belongs on the compositor, scroll-linked motion and costly blur effects.

    9.5k GitHub starsUsed in 5 repos~1.4k tokens
    Frontend & DesignAuto-check passed
  • GSAP Performance Tuning

    greensock/gsap-skills

    Guides the agent to keep GSAP animations smooth by animating transforms and opacity, batching DOM reads and writes, and avoiding layout-heavy properties.

    16k GitHub starsUsed in 4 repos~1k tokens
    Frontend & DesignAuto-check passed
  • React Frontend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.

    10k GitHub starsUsed in 2 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Web Quality Audit

    addyosmani/web-quality-skills

    Run an evidence-led web quality audit covering performance, accessibility, SEO, best practices, and agentic browsing.

    2.9k GitHub stars~2.6k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • SEO Google

    AgriciDaniel/codex-seo

    Google SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and GA4 organic traffic.

    791 GitHub starsUsed in 2 repos~3.4k tokens
    Frontend & DesignAuto-check passed

More from cometkim/unicode-segmenter

  • Codspeed Debug

    cometkim/unicode-segmenter

    Investigate CodSpeed CI performance reports on PRs — regressions or improbable improvements that don't reproduce locally.

    112 GitHub stars~814 tokensUpdated 2 mo ago
    Auto-check passed
  • Bench Records

    cometkim/unicode-segmenter

    Archive benchmark runs into benchmark/grapheme/records and regenerate the HTML report.

    112 GitHub stars~723 tokensUpdated 2 mo ago
    Auto-check passed
  • Unicode Data

    cometkim/unicode-segmenter

    Regenerate the generated Unicode data modules (src/graphemedata.js, generaldata.js, emojidata.js, test/unicodetestdata.js) and verify correctness.

    112 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Benchmark

What does Benchmark do?

Measure runtime perf, bundle size, and memory impact of unicode-segmenter changes. Benchmark is an agent skill from cometkim/unicode-segmenter. Measure runtime perf, bundle size, and memory impact of unicode-segmenter changes.

When should I use Benchmark?

Benchmark fits situations like: evaluating any src/ change; running yarn perf / bundle-stats / memory-stats; comparing against a baseline revision; benchmark numbers look noisy.

How do I install Benchmark in Claude Code?

Run `npx skills add cometkim/unicode-segmenter --skill benchmark -a claude-code`. Or copy the skill folder (.claude/skills/benchmark in cometkim/unicode-segmenter) into .claude/skills/benchmark in your project. Claude Code loads it when a task matches its description.

How do I install Benchmark in Codex?

Run `npx skills add cometkim/unicode-segmenter --skill benchmark -a codex`. Or copy the skill folder (.claude/skills/benchmark in cometkim/unicode-segmenter) into .agents/skills/benchmark in your project. Codex loads it when a task matches its description.

Can I use Benchmark in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cometkim/unicode-segmenter --skill benchmark -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/benchmark, .gemini/skills/benchmark, .github/skills/benchmark and .opencode/skills/benchmark in your project.

What does Benchmark need to run?

Going by SKILL.md and its folder, Benchmark needs the command-line tools its instructions call (yarn, node, bun and git).

Does Benchmark access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Benchmark safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Benchmark use?

Benchmark is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Benchmark use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Benchmark?

Skills that share tags, products or a category with Benchmark: React Doctor (makeplane/plane, 61k stars), Fixing Motion Performance (ibelick/ui-skills, 9.5k stars), GSAP Performance Tuning (greensock/gsap-skills, 16k stars) and React Frontend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Benchmark?

cometkim (a GitHub user) maintains it in cometkim/unicode-segmenter, which has 112 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on July 29, 2026.

Source: cometkim/unicode-segmenter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.