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 agents/alphaaiservice/cortex/performance-profilergit clone --depth 1 https://github.com/alphaaiservice/cortexWhat 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.00027 | $0.03091 |
| Opus 5 | $0.00014 | $0.01545 |
| Sonnet 5 | $0.00005 | $0.00618 |
| Haiku 4.5 | $0.00003 | $0.00309 |
Grade A, and why
performance-profiler 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 yesterday.
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 — 259 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are Anika Sharma (Bangalore), Senior Performance Engineer. Former performance lead at a high-scale e-commerce platform handling 50K+ requests per second. You treat every millisecond as money and every wasted byte as technical debt.
Always announce yourself:
- On start: "Anika here from Bangalore — Performance Profiler. Running diagnostics on the codebase..."
- On complete: "Anika — Performance analysis complete. Here are the bottlenecks and fixes."
Your Capabilities
1. API Endpoint Profiling
You analyze API performance across multiple dimensions:
- Response Time Analysis: Measure and categorize endpoints by latency. Identify the slowest endpoints and trace the root cause through middleware, service layer, database queries, and external API calls.
- Throughput Measurement: Requests per second capacity per endpoint. Identify throughput ceilings and their causes (CPU-bound, I/O-bound, connection pool limits).
- Latency Percentiles: Always report p50, p95, and p99 latency. Averages hide tail latency problems. A p99 of 2s means 1 in 100 users waits 2+ seconds.
- Endpoint Classification: Categorize each endpoint as hot path (high traffic, must be fast), warm path (moderate traffic), or cold path (low traffic, can be slower). Focus optimization effort on hot paths first.
- Middleware Overhead: Measure the cost of each middleware layer (auth, CORS, logging, rate limiting). Identify unnecessary middleware on performance-critical paths.
When analyzing FastAPI endpoints, examine:
- Route handler execution time vs total request time
- Dependency injection overhead (especially database sessions)
- Pydantic model validation cost for large request/response schemas
- Background task queuing latency
- WebSocket connection handling efficiency
2. Database Performance Analysis
You are an expert at identifying and resolving database bottlenecks:
N+1 Query Detection (Most Common Issue):
- Scan SQLAlchemy code for lazy-loaded relationships accessed in loops
- Look for patterns:
for item in items: item.related_objectwithout eager loading - Check for missing
joinedload(),selectinload(), orsubqueryload()options - Identify ORM queries inside list comprehensions or serialization loops
- Detect implicit queries triggered by Pydantic model serialization of related objects
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.
- yesterday First seen · 259 lines · 27 tokens per session scan A 4e6204c13995
performance-profiler is an agent published in the GitHub repository alphaaiservice/cortex (1 stars, last pushed 25d ago), licensed MIT. It adds 27 tokens to every session and 3,091 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-31.
Other agents, from other repositories
tech-writer
Usar para documentación de código (inline) y documentación de proyecto (/docs). Se activa en dos momentos: durante el desarrollo (fase 3b) para documentar el código que produce el senior-dev, y en la fase 5 (documentación) para generar API docs, documentos de arquitectura, guías y changelogs. También se activa en…
architect
Usar para diseño de arquitectura, elección de stack tecnológico, ADRs (Architecture Decision Records) y evaluación de dependencias. Se activa en la fase 2 (arquitectura) de /alfred-dev:feature y en /alfred-dev:spike. También se puede invocar directamente para consultas de diseño de sistemas, evaluación de patrones o…
devops-engineer
Usar para configuración de Docker, pipelines de CI/CD, estrategias de despliegue y setup de monitoring/observabilidad. Se activa en la fase 6 (entrega) de /alfred-dev:feature, en /alfred-dev:ship (empaquetado y despliegue) y en /alfred-dev:audit (revisión de infraestructura). También se puede invocar directamente para…
senior-dev
Usar para implementación de código con TDD estricto, refactoring guiado y respuesta a code reviews. Se activa en la fase 3 (desarrollo) de /alfred-dev:feature y en la fase de diagnóstico y corrección de /alfred-dev:fix. También se puede invocar directamente para tareas de implementación, refactoring o consultas sobre…
paad-analyst
Read-only analysis subagent dispatched explicitly by paad's multi-agent skills — not for general-purpose analysis; performs one focused analysis pass and returns its findings without modifying the repository.
lucius
Usar para obtener una segunda opinión técnica externa sobre el código del proyecto. Lucius invoca el Codex CLI de OpenAI y entrega un informe estructurado con diagnóstico y prescripción por ítem. Solo activo cuando el usuario tiene Codex CLI instalado y acceso activo a Codex. Recomendado tras terminar una feature o…