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 smicolon/ai-kit --skill performance-optimizergit clone --depth 1 https://github.com/smicolon/ai-kitWrote 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/smicolon/ai-kit/performance-optimizer)<a href="https://agentmods.dev/skills/smicolon/ai-kit/performance-optimizer"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/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.
<a href="https://agentmods.dev/skills/smicolon/ai-kit/performance-optimizer"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/performance-optimizer.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.00057 | $0.02911 |
| Opus 5.5 | $0.00023 | $0.01164 |
| Sonnet 5.5 | $0.00011 | $0.00582 |
| Haiku 4.5 | $0.00006 | $0.00291 |
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.
How it starts
The opening of the file, as written. The whole thing — 481 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance Optimizer
Auto-detects and fixes Django ORM performance issues before they reach production.
Activation Triggers
This skill activates when:
- Writing ORM queries
- Accessing related objects (foreign keys, M2M)
- Creating views that fetch data
- Mentioning "slow", "performance", "optimization"
- Looping over querysets
- Creating list/detail views
Performance Targets
- ✅ NO N+1 queries
- ✅ Appropriate indexes on frequently queried fields
- ✅ Pagination for list endpoints
- ✅
select_related()for foreign keys - ✅
prefetch_related()for reverse foreign keys and M2M - ✅ Caching for expensive operations
Auto-Detection Patterns
Pattern 1: N+1 Query Detection
❌ INEFFICIENT (N+1 query):
# Bad: 1 query for users + N queries for organizations
users = User.objects.all() # 1 query
for user in users: # N queries
print(user.organization.name) # Hits DB each time!
✅ OPTIMIZED:
# Good: 2 queries total (1 for users + 1 JOIN for organizations)
users = User.objects.select_related('organization').all()
for user in users:
print(user.organization.name) # No DB hit!
Pattern 2: Reverse Foreign Key N+1
❌ INEFFICIENT:
# Bad: 1 + N queries
organizations = Organization.objects.all() # 1 query
for org in organizations: # N queries
users = org.users.all() # Hits DB each time!
print(f"{org.name}: {users.count()} users")
✅ OPTIMIZED:
# Good: 2 queries total
organizations = Organization.objects.prefetch_related('users').all()
for org in organizations:
users = org.users.all() # Pre-fetched!
print(f"{org.name}: {users.count()} users")
Pattern 3: Many-to-Many N+1
❌ INEFFICIENT:
# Bad: 1 + N queries
users = User.objects.all() # 1 query
for user in users: # N queries
roles = user.roles.all() # Hits DB each time!
✅ OPTIMIZED:
# Good: 2 queries total
users = User.objects.prefetch_related('roles').all()
for user in users:
roles = user.roles.all() # Pre-fetched!
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.
- 1mo ago Changed · +33 lines cceaf0c4f89a
- 1mo ago First seen · 448 lines · 57 tokens per session scan A abe972862334
performance-optimizer is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 2,911 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-31.
Other skills, from other repositories
optimize
Analyze and suggest performance improvements for code, queries, or systems.
triage-issues
Triage GitHub issues in the googleapis/mcp-toolbox repo: propose the correct labels (type / priority / product / status), check for duplicates, verify a bug has enough info to act on, and draft a triage comment. Use whenever a maintainer asks you to triage, label, categorize, prioritize, or "look at" an issue (or a…
postgresql-indexing
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing…
graphjin-eval
Create, extend, run, baseline, and diagnose GraphJin agent evaluations through the graphjin eval CLI.
ha-logs
A read-only troubleshooting skill for querying Hope Agent’s local SQLite databases, which store logs, conversations, and background-job status.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…