inspect-perf
Installation
SKILL.md
inspect-perf — Semantic Performance & Resource Efficiency Auditor
Domain Rubric
1. Scope & Tolerability Guardrails (What to Ignore)
- Mandatory Target Scope: The user MUST specify an explicit target path (
file,directory, orsubsystem). If no target scope is provided, halt turn immediately and prompt for scope; forbid speculative full-repository scans. - Semantic Debt vs. Micro-Benchmarking: Confine analysis strictly to structural algorithmic risks, I/O multipliers, and resource retention; ignore sub-microsecond instruction micro-optimizations, compiler inlining nits, or premature caching on cold paths.
- Governing Reference: Evaluate performance patterns strictly against
references/performance-rubric.md.
2. Decision Bifurcation: [LOCAL-FIX] vs. [ARCHITECTURAL-REFACTOR]
[LOCAL-FIX](Localized In-Function Optimization): Algorithmic lookup indexing ($O(1)$ set/map), loop invariant hoisting, or string builder replacement within a single method/file. Route behavior-preserving candidates to/simplify-audit; new query limits or altered result semantics require/changeset.[ARCHITECTURAL-REFACTOR](Systemic Structural Remediation): Decomposing Cartesian joins into Split Queries / DataLoaders, extracting Transactional Outbox to decouple network I/O from database transactions, worker thread offloading, or introducing bounded distributed caches. Route remediation to/changeset.
Canonical Output Contract
# Performance Audit Dossier: <Target Scope>