Borrowing it
Nothing to install: this file belongs to Insight-Services-APAC/ingenious. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Insight-Services-APAC/ingenious/main/.claude/commands/analysis/perf.mdgit clone --depth 1 https://github.com/Insight-Services-APAC/ingeniousWrote 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/commands/insight-services-apac/ingenious/perf)<a href="https://agentmods.dev/commands/insight-services-apac/ingenious/perf"><img src="https://agentmods.dev/badge/commands/insight-services-apac/ingenious/perf/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/commands/insight-services-apac/ingenious/perf"><img src="https://agentmods.dev/badge/commands/insight-services-apac/ingenious/perf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00000 | $0.00697 |
| Opus 5.5 | $0.00000 | $0.00279 |
| Sonnet 5.5 | $0.00000 | $0.00139 |
| Haiku 4.5 | $0.00000 | $0.00070 |
Grade A, and why
perf 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 — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance Bottleneck Analysis
Perform deep analysis to identify performance bottlenecks across the codebase.
1. Database and Query Performance
Search for:
- N+1 query patterns (loops containing database queries)
- Missing indexes on frequently queried columns
- SELECT * queries instead of specific columns
- Lack of query result caching
- Missing pagination on large result sets
- Synchronous database calls in loops
- Missing connection pooling configuration
Check: ORM models, database queries, migration files
2. API and Network Performance
Search for:
- Sequential API calls that could be parallelized
- Missing request/response caching
- Large payloads without compression
- Synchronous external API calls blocking request handlers
- Missing timeout configurations
- Repeated API calls for same data
- No rate limiting or circuit breakers
Check: API routes, HTTP clients, service layers
3. Frontend Performance
Search for:
- Large inline scripts/data in HTML templates
- Missing lazy loading for images/components
- Excessive DOM manipulation in loops
- No debouncing/throttling on frequent events
- Large reactive data objects causing overhead
- Missing code splitting or bundling
- Synchronous operations blocking UI rendering
- Unnecessary re-renders or watchers
Check: Templates, JavaScript files, event handlers
4. Backend Processing Performance
Search for:
- Synchronous processing of large datasets
- Missing async/await patterns
- Blocking I/O operations
- Inefficient loops (nested loops, repeated operations)
- Large file operations without streaming
- Missing worker queues for background tasks
- Heavy computation in request handlers
- No caching of expensive operations
Check: Service classes, background jobs, data processing logic
5. Memory and Resource Management
Search for:
- Memory leaks (unclosed connections, unreleased resources)
- Large objects kept in memory unnecessarily
- Missing context managers for file/connection handling
- Unbounded collections or caches
- Circular references preventing garbage collection
- Missing resource pooling
- Large log statements in hot paths
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 First seen · 109 lines · 0 tokens per session scan A 328e7841133a
perf is a command published in the GitHub repository Insight-Services-APAC/ingenious (25 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 697 tokens. 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-09-04.
Other commands, from other repositories
root-cause
Use when any test fails, bug appears, or behaviour surprises you, before proposing a fix - find the cause and prove it, by reading real evidence, tracing bad values back to their origin, comparing against a working case, and testing one hypothesis at a time.
data-flow-analysis
Trace how data flows through the system from input to output.
trace-regression
Investigate a newly introduced bug or regression to identify the offending change and formulate a fix.
cleanup
Run a systematic cleanup on the provided code to resolve smells, simplify complexity, and enforce best practices.
flutter-build
Fix Dart analyzer errors and Flutter build failures incrementally. Invokes the dart-build-resolver agent for minimal, surgical fixes.
fix-issue
Command "fix-issue" from HKTITAN/cursor-best-practices, covering steps and rules.