performance-optimizer

performance-optimizer is a skill for Claude Code, Codex from Firstp1ck/pi-coding-agent-forge. It costs 47 tokens per session (2,022 once invoked), scanned A, original, MIT.

An evidence-based method for finding and fixing slow code. It uses profiling and benchmarks to locate the real bottleneck before changes are made.

In plain words
What is it for?
Use it for high CPU or memory use, slow responses, large data processing, complex algorithms, and performance investigations in Rust and other codebases.
Why use it?
It prevents developers from optimizing the wrong part of a program and makes speed improvements measurable, while considering trade-offs such as memory use and readability.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it for high CPU or memory use, slow responses, large data processing, complex algorithms, and performance investigations in Rust and other codebases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/firstp1ck/pi-coding-agent-forge/performance-optimizer
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.

Any agent
npx skills add Firstp1ck/pi-coding-agent-forge --skill performance-optimizer
Clone the repo
git clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forge

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 performance-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/performance-optimizer/github.svg)](https://agentmods.dev/skills/firstp1ck/pi-coding-agent-forge/performance-optimizer)
Your own site
<a href="https://agentmods.dev/skills/firstp1ck/pi-coding-agent-forge/performance-optimizer"><img src="https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/performance-optimizer/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 performance-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/firstp1ck/pi-coding-agent-forge/performance-optimizer"><img src="https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/performance-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,022 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 195
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00047 $0.02022
Opus 5.5 $0.00019 $0.00809
Sonnet 5.5 $0.00009 $0.00404
Haiku 4.5 $0.00005 $0.00202

Measured 1mo ago against content hash e4e35945348a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-optimizer scanned grade A with 0 findings 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.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

pi-skill-performance-optimizer/skills/performance-optimizer/SKILL.md · 202 lines

How it starts

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

Performance Optimizer

Evidence-based performance optimization. Never optimize without profiling first. Every optimization comes with a trade-off analysis.

Quick Start

Investigate a Performance Issue

  1. Reproduce: Can you reliably reproduce the slowness? What are the conditions?
  2. Measure: Profile to find the actual bottleneck. Don't guess.
  3. Analyze: What's the root cause? Algorithm? I/O? Memory? Contention?
  4. Propose: 2-3 options with trade-offs (speed vs readability, memory vs CPU, etc.)
  5. Verify: After optimization, re-measure to confirm improvement.

The cardinal rule: Profile first, optimize second. Gut feelings about performance are wrong more often than right.


Profiling Toolkits

Rust

Tool Purpose Command
cargo bench Micro-benchmarks (criterion) cargo bench
cargo flamegraph CPU flamegraph visualization cargo flamegraph --bin <name>
perf Linux perf events perf record --call-graph dwarf ./target/release/<bin>
valgrind --tool=callgrind Instruction-level profiling valgrind --tool=callgrind ./target/release/<bin>
cargo bloat Binary size analysis cargo bloat --release
DHAT (via valgrind) Heap allocation profiling valgrind --tool=dhat ./target/release/<bin>

Quick benchmark setup with criterion:

// benches/my_bench.rs
use criterion::{criterion_group, criterion_main, Criterion};

fn benchmark_function(c: &mut Criterion) {
    c.bench_function("descriptive name", |b| {
        b.iter(|| {
            // code to benchmark
        })
    });
}

criterion_group!(benches, benchmark_function);
criterion_main!(benches);

TypeScript / React

Tool Purpose How
React DevTools Profiler Component render timing Browser extension, Profiler tab
Lighthouse Overall web performance Chrome DevTools > Lighthouse
console.time() / console.timeEnd() Quick timing Wrap suspicious code
webpack-bundle-analyzer Bundle size analysis bun run build --analyze
performance.mark() / performance.measure() Web Performance API Precise timing of code sections
React <Profiler> component Programmatic render profiling Wrap components in <Profiler>

Read the full file on GitHub · 202 lines

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 First seen · 202 lines · 47 tokens per session scan A e4e35945348a

Subscribe to this mod's changes

performance-optimizer is a skill published in the GitHub repository Firstp1ck/pi-coding-agent-forge (91 stars, last pushed 3d ago), licensed MIT. It adds 47 tokens to every session and 2,022 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. 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

smiles-validation

Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.

synthetic-sciences/openscience · 24 tokens

confirm-failures-are-causally-linked-to-the-task-before-reportin

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 29 tokens

surf

Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling, page inspection, network/CPU emulation, DevTools streaming, or AI queries via ChatGPT/Gemini/Perplexity/Grok/AI Studio.

w-winter/dot314 · 60 tokens

ci-fix-monitor

Codex adapter for monitoring and fixing CI failures on opencode-swarm PRs. Use when diagnosing failed checks, fixing package-check (npm tarball) failures, resolving quality/lint/format errors, fixing macOS cross-platform file I/O failures, or watching a PR until all checks are green.

ZaxbyHub/opencode-swarm · 68 tokens

smell

Detect software architecture bad smells, algorithmic complexity hotspots, and anti-patterns in a codebase. Produces a detailed markdown report identifying violations of architectural principles, design patterns, code quality, and performance complexity. Triggers on: smell, code smell, architecture smell, find…

smallnest/pigo · 97 tokens

issue-tracer

Use when asked to trace, investigate, root-cause, reproduce, plan, fix, resolve, close, or prepare a PR for an issue, bug report, defect, regression, failing test, or confusing runtime behavior. This Codex adapter delegates to the canonical protocol at .opencode, which owns the Full-Resolution Contract, reproduction…

ZaxbyHub/opencode-swarm · 99 tokens