performance-profiling
Skill2 starsChanged 4 months agoMITView on GitHub
Measure and optimize hot paths, including SIMD/vectorization opportunities; design or investigate runtime benchmarks, complexity gates, allocation/memory growth and leak controls, test-suite feedback latency and measurement history. Use for speeding up code, bm/cg/mg integration, slow testing and performance regressions; not for unrelated correctness tests or ordinary build work.
25 other projects use a version of this.
Adopted by
Most recently taken up by
- Wade-DevCode/awesome-coding-skills-cntheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- ChariereFiedler/ronce-racinetheir own version, first seen Nov 1, 2026
- HeshamFS/materials-simulation-skillstheir own version, first seen Nov 1, 2026
- conorluddy/xclaude-plugintheir own version, first seen Oct 25, 2026
- troskater/flowdeck-claudetheir own version, first seen Oct 25, 2026
Used with
Projects with it also use intelligent-routing, bash-linux and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SKB3002Skillintelligent-routing
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
Also in 5 projects that use this
xenitV1Skillbash-linux
Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.
Also in 6 projects that use this
xenitV1Skillred-team-tactics
Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.
Also in 6 projects that use this
SKB3002Skillnextjs-react-expert
React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.
Also in 3 projects that use this
- +8 more from xenitV1
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- LiberatedPixelCup/Universal-LPC-Spritesheet-Character-Generator★ 1.9ksame name
- conorluddy/xclaude-plugin★ 186same name
- xenitV1/Antigravity-Workflows★ 130same name
- HeshamFS/materials-simulation-skills★ 83same name
- nahid-sparktales/agent-dispatcher★ 59same name
- VoDaiLocz/kilo-kit-mcp★ 28same name
- ChariereFiedler/ronce-racine★ 9same name
- soumatheusgomes/agentville★ 9same name
15 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- capture-collaboration-evidenceSkill
- clarify-before-buildingSkill
- cross-platform-project-build-archSkill
- deep-code-reviewSkill
- dispatchSkill
- erect-agent-stackSkill
- fix-zig-deps-hashSkill
- gather-project-intentionsSkill
- handoffSkill
- i18nSkill
- lean4-developmentSkill
- llvm-guided-optimizationSkill
- mechatron-ciSkill
- memoriesSkill
- mficSkill
- no-ai-slopSkill
- onboardSkill
- planning-workSkill
- scaffold-zig-projectSkill
- shipSkill
- test-isolationSkill
- universal-app-frontendSkill
- walking-decisionsSkill
- writing-bendSkill
- writing-nixSkill
- writing-rocSkill
- zig-microbenchmarksSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use one shared measurement/evaluation engine with language adapters.
- Distinctive: line 12
Read the references relevant to the task:
- Distinctive: line 26
When profiling or optimizing a CPU hot path, explicitly consider SIMD, compiler auto-vectorization and acceleration already offered by …
- Very specific: line 38
Read its README.md and docs/CONTRACT.md before adopting it.
- Distinctive: line 85
Before accepting an observation as an anchor, check its per-size sample spread and ratios.
- Distinctive: line 93
No zero-on-clock-error, Debug skip, guessed startup subtraction or hidden crossover.
- Very specific: line 95
Read and freeze the historical baseline before the new measurement is recorded.
- Very specific: line 96
Use hardware/runtime/measurement-qualified cohorts, two-sided configurable historical bounds and independent declared-shape/resource bounds.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Performance profiling
Use one shared measurement/evaluation engine with language adapters. The approved contract separates fixed-workload timing, input-growth evidence and memory cleanup. An unexpectedly faster or smaller result deserves review too.
Read the references relevant to the task:
- SIMD and vectorization for measured hot-path optimization, compiler inspection, scalar equivalence and portable dispatch.
- Feedback latency for test-suite runtime budgets, separate build timing, CI waiting, fixture minimization and actionable agent feedback.
- Time and complexity for workloads, startup, clocks, growth sweeps, noise and benchmark commands.
- Memory for allocator coverage, growth, residuals and RSS.
- History and acceptance before implementing storage, historical comparisons, retries, CI integration or baseline changes.
- Language adapters when implementing a probe, especially for Zig, C FFI or LuaJIT.
Required optimization checkpoint
When profiling or optimizing a CPU hot path, explicitly consider SIMD, compiler auto-vectorization and acceleration already offered by dependencies. Establish the bottleneck and a repeatable optimized baseline before changing code; inspect generated code or vectorization reports before assuming the compiler missed it. Record the outcome briefly: already vectorized, measured candidate retained or rejected, or deferred with a bottleneck/priority reason. This is a consideration requirement, not an instruction to add intrinsics to every loop. Follow the SIMD reference for correctness, platform dispatch and before/after evidence.
Existing tool and command boundary
The first reusable implementation is $HOME/Code/performance_profiling.
Read its README.md and docs/CONTRACT.md before adopting it. Its CLI is
performance-profile; ./build packages it with Nix. Add the pinned package
to a consuming project's devShell instead of assuming a global interpreter
has cjson, luv or the printable-binary map. Do not copy its baseline engine
into each project. A missing checkout is a dependency to resolve, not permission
to invent a second engine or claim a gate passed.
| Entry point | Purpose |
./cg | Bounded input-growth and historical ratio checks |
./mg | Bounded memory growth, peak usage and cleanup checks |
./bm | Thorough fixed-workload, startup and scaling measurements |
./test | All correctness suites and required bounded gates |
Root commands are Bash entry points delegating to the same engine and adapters.
Measure the quick-gate budget; under one second is a target, not a reason to
discard evidence. Long benchmark/fuzz campaigns can stay separate, while
acceptance-critical checks and discovered regressions remain in ./test.
Single-core and multicore cases
Measure each timing workload twice, as separate cases: single-core
(cores: 1) and multicore (12 cores unless the project states otherwise).
Some code parallelizes underneath (runtimes, allocators, libraries) and some
does not; one measurement cannot show both. Every case declares cores; the
engine pins Linux runs with taskset (override the CPU pool with
PERFORMANCE_CPUS), passes PERFORMANCE_CORES to the command, puts the count
and enforcement method in the cohort, and records the exact CPU list. Requesting
more cores than are available is an error, not a smaller run. Where affinity
cannot be enforced (macOS), the record says unenforced. Deterministic metrics
(allocation counts, operations) need not be measured twice unless the code's
behavior depends on the core count.
Run-to-run state, process modes and anchors
- Each timed sample starts from the state a real run would see. A program that normally runs once per process gets a settled heap before every sample (collect until the heap stops shrinking, outside timing), so the harness's own earlier runs do not leave garbage-collector or string-table state for later samples to pay for. Record that settling happened. Long-running behavior is a separate steady-state case that runs back to back without it.
- A JIT can settle into different modes in different processes. Where a
workload shows that, declare an odd
processescount: the engine gates on the median fresh process and keeps all of them. Do not average modes. - Size sweeps so the largest point is long enough to measure under load and short enough to keep the gate quick (about 150 ms worked for one LuaJIT project); drop sizes too short to measure rather than widen tolerances.
- Before accepting an observation as an anchor, check its per-size sample spread and ratios. A noisy smallest size can anchor a wrong ratio that the next clean run then fails against.
Non-negotiable comparison boundaries
Measure verified work in an optimized build. Prepare/warm up in the process, outside steady-state timing. Keep CPU and monotonic wall measurements distinct. No zero-on-clock-error, Debug skip, guessed startup subtraction or hidden crossover.
Read and freeze the historical baseline before the new measurement is recorded. Use hardware/runtime/measurement-qualified cohorts, two-sided configurable historical bounds and independent declared-shape/resource bounds. Finite sweeps are evidence, not Big-O proofs. New hardware is unbaselined, not automatically green.
History lives outside the measured repository in a project-configured URL.
V1 supports an absolute file:// directory and project-named immutable NDJSON
records. Both local and CI use the same pipeline outside the Nix build sandbox;
cached derivations are not fresh host measurements.
Delegate CI setup to the mechatron-ci skill and its exact-commit
.mechatron-prime/targets manifest. Coordinate fresh outside-sandbox measurements
with the runner owner; adding a cached Nix check alone does not wire that pipeline.
An otherwise valid timing failure gets at most one complete retry. Only its selected passing measurement can become a normal baseline observation. Nested failed attempts are diagnostic data, never baseline candidates. A rerun cannot approve an epoch. Explicit owner-approved acceptance records the exact run and reason; do not have an agent or automatic CI retry approve its own regression. Correctness failures, leaks and declared-shape violations are not accepted this way.
Scope adoption to the requested project. This skill does not authorize fleet rewrites, host scheduling changes, privileged storage provisioning or publication of private command/source metadata.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

