benchmark

benchmark is a skill for Claude Code, Codex from nguyenyou/scalex. It costs 152 tokens per session (3,526 once invoked), scanned C, original, MIT.

A toolkit for measuring how quickly Scalex runs its indexing and query operations. It includes quick timing checks, before-and-after comparisons, detailed profiling, memory checks, and small isolated tests.

In plain words
What is it for?
It is for benchmarking Scalex, investigating slow indexes or queries, finding CPU or memory bottlenecks, and comparing performance across changes.
Why use it?
It helps show where time or memory is being used and whether a code change made the program faster or slower.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nguyenyou/scalex/benchmark
Any agent
npx skills add nguyenyou/scalex --skill benchmark
Clone the repo
git clone --depth 1 https://github.com/nguyenyou/scalex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for benchmark

README.md
[![agentmods](https://agentmods.dev/badge/skills/nguyenyou/scalex/benchmark.svg)](https://agentmods.dev/skills/nguyenyou/scalex/benchmark)
Your own site
<a href="https://agentmods.dev/skills/nguyenyou/scalex/benchmark"><img src="https://agentmods.dev/badge/skills/nguyenyou/scalex/benchmark.svg" alt="Measured on agentmods" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,526 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00152 $0.03526
Opus 5 $0.00076 $0.01763
Sonnet 5 $0.00030 $0.00705
Haiku 4.5 $0.00015 $0.00353

Measured 4d ago against content hash 667c86f31106, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

benchmark scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/bench-compare.sh, scripts/bench.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf benchmark/scala3/.scalex
.agents/skills/benchmark/SKILL.md · 367 lines

How it starts

The opening of the file, as written. The whole thing — 367 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

Scalex has a multi-layered profiling and benchmarking system. Pick the right layer for the situation:

Layer Tool When to use Works in native?
1. --timings Built-in flag Quick phase breakdown, first look at any perf question Yes
2. hyperfine bench.sh Reproducible before/after comparison with statistics Yes
3. async-profiler profiling/profile.sh Deep CPU/alloc/lock flame graphs to find hotspots JVM only
4. JFR profiling/scalex.jfc GC pressure, file I/O patterns, thread utilization JVM only
5. Microbenchmarks src/bench.scala Isolate per-function cost with warmup + statistics JVM only
6. Memory profiling bench.sh memory Heap usage, GC pressure, peak memory across scenarios JVM only

Decision guide

"Where is time spent?" → Start with --timings (Layer 1)

"Is this change faster?" → Use hyperfine before/after (Layer 2), optionally with bench-compare.sh

"Why is parsing slow?" → async-profiler CPU flame graph (Layer 3)

"Why are allocations high?" → async-profiler alloc or JFR ObjectAllocationSample (Layer 3/4)

"Is there GC pressure?" → JFR (Layer 4)

"How fast is extractSymbols on one file?" → Microbenchmark (Layer 5)

"How much memory does indexing use?" → Memory profiling (Layer 6)

"Is there a memory leak or GC regression?" → Memory profiling before/after (Layer 6)


Layer 1: --timings flag

The fastest way to see where time goes. Works in both JVM and native image. Prints to stderr.

# Cold index phase breakdown
rm -rf benchmark/scala3/.scalex
./scalex index benchmark/scala3 --timings

# Warm index
./scalex index benchmark/scala3 --timings

# Query with bloom/text-search breakdown
./scalex refs benchmark/scala3 Compiler --timings

# JVM mode
scala-cli run src/ -- index benchmark/scala3 --timings

Phases reported

Index phases: git-ls-files, cache-load, oid-compare, parse, index-build, cache-save

Read the full file on GitHub · 367 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 367 lines · 152 tokens per session scan C 667c86f31106

Subscribe to this mod's changes

benchmark is a skill published in the GitHub repository nguyenyou/scalex (94 stars, last pushed 2mo ago), licensed MIT. It adds 152 tokens to every session and 3,526 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

projectatlas

Use ProjectAtlas as the atlas-first orientation layer before broad source reads, with MCP-first task startup, short-alias worktree registration and routing, safe targeted initialization, ranked navigation, exact or federated graph evidence, purpose curation, health, lint, and repository-wide token reporting.

styler-ai/ProjectAtlas · 60 tokens

codex-coding-plugin

Build, review, or fix ProjectAtlas plugin/runtime installer integration for Codex, Claude Code, and OpenCode, especially version convergence, stale ProjectAtlas cache repair, MCP config generation, skill artifacts, host smoke tests, and fake-host tests for ProjectAtlas releases.

styler-ai/ProjectAtlas · 59 tokens

research

Performs deep research on a topic via deepresearch. Simulates a multi-step research process and returns a comprehensive research result as a string.

study8677/repobrain · 32 tokens

octocode-chrome-devtools

Use when a live page needs Chrome DevTools/CDP evidence: network failures, console errors, performance, DOM/CSS actionability, screenshots/PDF, cookies/storage, click/fill/search, HAR, or auth-gated pages. Phrases like debug in Chrome, live page health, CDP snapshot, cookie bridge. Not for static crawl or bulk extract…

bgauryy/octocode · 87 tokens

octocode-graph-eval

Use when you need a measurable keep/discard loop — goal→KPI, baseline vs target, held-out checks, eval suites, or don't-stop-till-done against a runnable sensor. Not for ordinary ship checks where 'tests passed' is enough.

bgauryy/octocode · 59 tokens

octocode-subagent

Use when spawning workers or offloading work: Task/subagents, specialist handoffs, A2A peers, sealed packets, coordinate/synthesize, challenge techniques (rubber-duck, interview, mimic-flow, red-team, blind review, consensus), or local Ollama one-shots to save tokens. Measuring keep/discard KPIs → octocode-graph-eval.

bgauryy/octocode · 80 tokens