scalex: Skill for Claude Code

.agents/skills/benchmark/SKILL.md

benchmark is a skill for Claude Code, Codex from nguyenyou/scalex. It costs 152 tokens per session (3,562 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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is nguyenyou/scalex's own configuration. It tells Claude Code and Codex how to work on scalex itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything scalex configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./profiling/profile.sh benchmark/scala3.

Reuse

Borrowing it

Nothing to install: this file belongs to nguyenyou/scalex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nguyenyou/scalex/main/.agents/skills/benchmark/SKILL.md
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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for benchmark

Your own site · 80×15
<a href="https://agentmods.dev/skills/nguyenyou/scalex/benchmark"><img src="https://agentmods.dev/badge/skills/nguyenyou/scalex/benchmark.svg" alt="Reviewed on agentmods" width="80" 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,562 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00152 $0.03562
Opus 5.5 $0.00061 $0.01425
Sonnet 5.5 $0.00030 $0.00712
Haiku 4.5 $0.00015 $0.00356

Measured 1mo ago against content hash 714912226221, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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
./mill run index benchmark/scala3 --timings

Phases reported

Index phases: git-ls-files, cache-load, oid-compare, parse, cache-save, and lazy build-* lookup phases

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. 1mo ago Changed 714912226221
  2. 1mo 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 (110 stars, last pushed 1mo ago), licensed MIT. It adds 152 tokens to every session and 3,562 once invoked, about $0.0006 per session on Opus 5.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 before broad source reads, preferring the installed short atlas CLI for an exact checkout and MCP for registered worktree routing, compact session briefs, or federated graph evidence.

styler-ai/ProjectAtlas · 40 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

lsp-inspect

Full code quality audit for a file, package, or directory. Supports batch mode (directory walk with --top ranking), comparison mode (--diff for branch-only issues), severity calibration by blast radius, fix suggestions, and confidence tiers. Applies a check taxonomy (dead symbols, silent failures, error wrapping…

blackwell-systems/agent-lsp · 126 tokens

lsp-refactor

End-to-end safe refactor workflow — blast-radius analysis, speculative preview, apply to disk, verify build, run affected tests. Inlines lsp-impact + lsp-safe-edit + lsp-verify + lsp-test-correlation into one coordinated sequence.

blackwell-systems/agent-lsp · 57 tokens

lsp-edit-export

Safe workflow for editing exported symbols or public APIs. Use when changing a function signature, modifying a public type, or altering any symbol used outside its own package — finds all callers first so nothing breaks silently.

blackwell-systems/agent-lsp · 46 tokens

trace-mcp-refactoring

Safe refactoring workflow using trace-mcp — assess risk, find candidates, check impact, and rename symbols across all files without missing import sites or cross-file references.

nikolai-vysotskyi/trace-mcp · 39 tokens