rune-perf

Detects N+1 queries, sync-in-async violations, memory leaks, and bundle bloat in code changes.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-perf-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-perf
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-perf
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-perf-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Performance regressions like N+1 database queries, blocking calls in async handlers, unbounded queries, and memory leaks often slip into production because they are invisible during code review. This Skill acts as a pre-merge performance gate that scans code changes for measurable slowdown patterns and reports them with file:line evidence and estimated impact. ## Core Features & Use Cases - Pattern Detection: Scans diffs or hotpath files for N+1 queries, unbounded queries, SELECT *, sync-in-async calls, missing awaits, event listener leaks, and unbounded caches. - Framework-Specific Checks: Applies targeted rules for React, Node.js/Express, Python/Django, and SQL, plus bundle bloat analysis for frontend projects. - Lighthouse & Core Web Vitals Gates: Enforces PASS/WARN/BLOCK thresholds for Performance, Accessibility, LCP, INP, and CLS when a public URL is available. - AI Token Budget Audit: Detects AI API calls in loops, missing token tracking, model mismatches, and unbounded max_tokens for cost control. - Use Case: Before merging a pull request that touches database access code, run the perf gate to catch an N+1 query in an ORM loop and get a BLOCK verdict with the exact file, line, and estimated latency impact. ## Quick Start Run the perf skill on my current diff and report any performance regressions with file and line evidence.

Frequently Asked Questions about rune-perf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect N+1 queries in my code before merging?

Run the perf gate on your diff or hotpath files. It scans for loops containing ORM calls and reports each N+1 finding with file:line, the collection and query involved, and a fix suggestion such as prefetch_related or a JOIN.

What performance patterns does a pre-merge performance gate check?

It checks N+1 queries, unbounded queries without LIMIT, SELECT *, synchronous I/O in async handlers, missing awaits, event listener leaks, unbounded caches, and bundle bloat from non-tree-shakeable imports, plus framework-specific rules for React, Node, Django, and SQL.

Does the perf skill fix the performance issues it finds?

No. The skill investigates and reports only; it never edits files. Each finding includes a suggested fix, and actual remediation is delegated to a separate fix workflow after the report is reviewed.

Can I use Lighthouse and Core Web Vitals checks on a backend-only project?

No. Lighthouse and Web Vitals gates only run for frontend or fullstack projects with a public URL. For backend-only projects the step is skipped and an INFO message suggests running Lighthouse manually before deploy.

Why did my performance finding get downgraded from BLOCK to WARN?

BLOCK requires measurable regression evidence on a hot path, including file:line and an estimated impact. Findings lacking impact estimates are downgraded to WARN or removed by the evidence gate to prevent severity inflation.

How does the skill audit AI API token costs?

When imports of anthropic, openai, langchain, or similar SDKs are detected, it flags AI calls inside loops, missing token usage tracking, expensive models used for simple tasks, missing max_tokens limits, and duplicate uncached calls, then reports an estimated monthly cost breakdown.