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.
npx agentmods add skills/firstp1ck/pi-coding-agent-forge/performance-optimizernpx skills add Firstp1ck/pi-coding-agent-forge --skill performance-optimizergit clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forgeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00047 | $0.02022 |
| Opus 5 | $0.00023 | $0.01011 |
| Sonnet 5 | $0.00009 | $0.00404 |
| Haiku 4.5 | $0.00005 | $0.00202 |
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 2d 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.
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
- Reproduce: Can you reliably reproduce the slowness? What are the conditions?
- Measure: Profile to find the actual bottleneck. Don't guess.
- Analyze: What's the root cause? Algorithm? I/O? Memory? Contention?
- Propose: 2-3 options with trade-offs (speed vs readability, memory vs CPU, etc.)
- 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> |
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.
- 2d ago First seen · 202 lines · 47 tokens per session scan A e4e35945348a
performance-optimizer is a skill published in the GitHub repository Firstp1ck/pi-coding-agent-forge (74 stars, last pushed 2d ago), licensed MIT. It adds 47 tokens to every session and 2,022 once invoked, about $0.0002 per session on Opus 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.
Other skills, from other repositories
flow-nexus-platform
Comprehensive Flow Nexus platform management - authentication, sandboxes, app deployment, payments, and challenges.
github-code-review
Comprehensive GitHub code review with AI-powered swarm coordination.
github-project-management
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning.
github-release-management
Comprehensive GitHub release orchestration with AI swarm coordination for automated versioning, testing, deployment, and rollback management.
github-workflow-automation
Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management.
Pair Programming
AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with…