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 skills add oyi77/1ai-skills --skill perf-agentgit clone --depth 1 https://github.com/oyi77/1ai-skillsWrote 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.
[](https://agentmods.dev/skills/oyi77/1ai-skills/perf-agent)<a href="https://agentmods.dev/skills/oyi77/1ai-skills/perf-agent"><img src="https://agentmods.dev/badge/skills/oyi77/1ai-skills/perf-agent/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.
<a href="https://agentmods.dev/skills/oyi77/1ai-skills/perf-agent"><img src="https://agentmods.dev/badge/skills/oyi77/1ai-skills/perf-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00022 | $0.01346 |
| Opus 5 | $0.00011 | $0.00673 |
| Sonnet 5 | $0.00004 | $0.00269 |
| Haiku 4.5 | $0.00002 | $0.00135 |
Grade A, and why
perf-agent 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 today.
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 — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
This agent measures before optimizing: it profiles, identifies actual bottlenecks, and only then proposes targeted changes with before/after evidence. Use it when something is slow and the cause is not yet proven. It rejects speculative rewrites in favor of changes that move a measured number.
Perf Agent
Quick Reference — see parent for full agent ecosystem.
The Perf Agent identifies and fixes performance bottlenecks using systematic profiling, benchmarking, and capacity analysis. Its first principle is measure before optimize — it never guesses at bottlenecks. It profiles CPU, memory, I/O, and network; identifies root causes (N+1 queries, memory leaks, unnecessary allocations, sync I/O); and validates every optimization with before/after benchmarks. The perf agent also projects cost impact so teams prioritize by ROI.
When Not to Use
- Simple or one-off tasks — if the task is straightforward, direct execution is faster than structured methodology.
- Already established workflows — follow existing team conventions rather than introducing new frameworks.
- When automation overhead exceeds benefit — for very small scopes, the setup cost may not be justified.
Dependencies
- Python 3.8+ or Node.js 18+
- Access to relevant APIs/services for your specific use case
- Basic understanding of the domain concepts
Commands
# Refer to the skill's usage section for specific commands
# Adapt these to your workflow
Key Responsibilities
- Profile before optimize: Use profilers (py-spy, cProfile, valgrind, lighthouse, k6) to identify actual bottlenecks, not perceived ones
- Root cause analysis: Trace slow endpoints, memory growth, or high CPU to specific code paths, queries, or resource contention
- Validate with benchmarks: Every optimization must include a before/after benchmark — no improvement claim without a measurement
Code Example
"""Minimal perf agent pattern — profile and optimize."""
import json, sys, time, statistics
from pathlib import Path
def profile_endpoint(endpoint: str, samples: int = 100) -> dict:
"""Simple latency profiling for a given operation."""
import requests # simulated dependency
latencies = []
for _ in range(samples):
start = time.perf_counter()
# In practice: call the actual endpoint
time.sleep(0.01) # simulated work
latencies.append((time.perf_counter() - start) * 1000)
p50 = statistics.median(latencies)
p95 = sorted(latencies)[int(samples * 0.95)]
p99 = sorted(latencies)[int(samples * 0.99)]
return {
"endpoint": endpoint,
"samples": samples,
"p50_ms": round(p50, 1),
"p95_ms": round(p95, 1),
"p99_ms": round(p99, 1),
"assessment": "healthy" if p95 < 200 else "needs_attention" if p95 < 500 else "critical"
}
def suggest_optimizations(profile: dict) -> list[dict]:
"""Suggest fixes based on profile data."""
suggestions = []
if profile["p95_ms"] > 500:
suggestions.append({
"type": "N+1 query",
"confidence": "medium",
"fix": "Enable eager loading on the relation",
"impact": "Expected 40-60% p95 reduction"
})
if profile["p99_ms"] > 1000:
suggestions.append({
"type": "Cache miss",
"confidence": "low",
"fix": "Add Redis caching layer with 60s TTL",
"impact": "Expected 70-90% p99 reduction for cache hits"
})
return suggestions
if __name__ == "__main__":
endpoint = sys.argv[1]
profile = profile_endpoint(endpoint)
profile["optimizations"] = suggest_optimizations(profile)
print(json.dumps(profile, indent=2))
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.
- today Changed · +11 lines ad22c429c41a
- 10d ago First seen · 139 lines · 22 tokens per session scan A 2378d7c27de0
perf-agent is a skill published in the GitHub repository oyi77/1ai-skills (12 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 1,346 once invoked, about $0.0001 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
error-handling
Implement Go error handling patterns including error wrapping, sentinel errors, custom error types, and error handling conventions. Use when handling errors, creating error types, or implementing error propagation. Trigger words include "error", "panic", "recover", "error handling", "error wrapping".
complexity-analyzer
Analyzes cyclomatic and cognitive complexity, identifies overly complex functions. Use when assessing code complexity or identifying functions that need simplification.
longstrider
Longstrider is the optimization spell for systems that already work. It makes the path shorter without changing the destination. It cares about sustained pace, not flashy one-off benchmarks.
mage-hand
Use this skill for small, careful remote manipulations where dexterity matters more than force.
blindness-deafness
In D&D, Blindness/Deafness selectively removes one sense — the target can still act but loses critical awareness. The real-world version is selective channel muting: blocking a process from seeing certain inputs (input filtering, API response redaction), deafening it to specific signals (suppressing webhooks, ignoring…
eyebite
In D&D, Eyebite lets you focus on one creature per turn and inflict sleep, panic, or sickness through sustained eye contact. The real-world version is targeted capability reduction: focused analysis that identifies and disables specific functions of a system, service, or adversary. Feature flagging a dangerous…