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.5 | $0.00009 | $0.00538 |
| Sonnet 5.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 2mo 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 — 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.
- 2mo ago Changed · +11 lines ad22c429c41a
- 3mo 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 (19 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.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.
perf-agent compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| perf-agentoyi77/1ai-skills | Skill | 19 | today | MIT | A | 22 | Claude Code |
| adk-debuggoogle/adk-python | Skill | 22k | 2d ago | Apache-2.0 | A | 191 | Claude Code, Codex |
| rubber-duckkirodotdev/KiroCrew | Skill | 5.1k | today | Apache-2.0 | A | 161 | Claude Code, Codex |
| debug-gatewaykirodotdev/KiroCrew | Skill | 5.1k | today | Apache-2.0 | A | 63 | Claude Code, Codex |
| ai-discoverkirodotdev/KiroCrew | Skill | 5.1k | today | Apache-2.0 | A | 83 | Claude Code, Codex |
| debugging-websocket-issuesAgentWorkforce/relay | Skill | 1.2k | today | Apache-2.0 | A | 54 | Claude Code |
| goal-calculator-repairzhnt/loushang | Skill | 2.1k | today | Apache-2.0 | A | 16 | Claude Code, Codex |