performance-audit
Skill11 starsChanged 19 days agoMITView on GitHub
Analyze and identify performance bottlenecks across the full stack (Rust concurrency and memory, Tauri IPC, React rendering, SQLite queries), and generate a prioritized action plan report (P0-P2) with concrete Before/After code solutions. Use when asked to audit performance, investigate UI lag or freezes, optimize Rust async/locks or memory allocations, eliminate React re-render cascades, diagnose slow SQLite queries or IPC serialization overhead, or when user triggers: "성능상의 개선점 분석", "성능 감사", "성능 최적화", "병목 분석", "performance audit", "perf audit", "profile bottlenecks".
20 other projects use a version of this.
Adopted by
Most recently taken up by
- LeonardoEnnes/ai-engineering-toolkittheir own version, first seen Nov 8, 2026
- nseney1/Soma-Governancetheir own version, first seen Nov 1, 2026
- RBraga01/a-teamtheir own version, first seen Nov 1, 2026
- nseney1/Aegis-Guardrailstheir own version, first seen Oct 25, 2026
- greglas75/zuvotheir own version, first seen Oct 16, 2026
- arndvs/ctrlshfttheir own version, first seen Oct 15, 2026
Used with
Projects with it also use incident-response, threat-model and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 4 projects that use this
OpenAISkillthreat-model
Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 8 projects that use this
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 4 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- octanejs/octane★ 1.5ksame name
- gwdevhub/GWToolboxpp★ 1.1ksame name
- termio-sh/termio★ 787same name
- me2resh/apexyard★ 542same name
- wallstop/unity-helpers★ 176same name
- RBraga01/a-team★ 24same name
- patrickserrano/skills★ 13same name
- greglas75/zuvo★ 7same name
- nseney1/Aegis-Guardrails★ 4same name
- nseney1/Soma-Governance★ 4same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- agents.mdAGENTS.md
- .agents/skills/react-best-practices/AGENTS.mdAGENTS.md
- .agents/skills/react-native-skills/AGENTS.mdAGENTS.md
- .agents/skills/react-view-transitions/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-initSkill
- agy-delegateSkill
- audit-docsSkill
- code-audit-expertSkill
- computer-diagnosisSkill
- create-builtin-toolSkill
- create-prSkill
- critique-builtin-toolSkill
- doc-auditorSkill
- docxSkill
- extract-log-debugSkill
- feature-refactor-proposalSkill
- gatekeeper-loopSkill
- harbor-harness-improvement-loopSkill
- i18n-language-standardsSkill
- jobs-trace-analyzerSkill
- lean-builtin-tool-auditorSkill
- libragent-qualitySkill
- libr-delegateSkill
- libr-tool-e2e-harness-loopSkill
- modular-large-file-refactorSkill
- pptxSkill
- vercel-react-best-practicesSkill
- vercel-react-native-skillsSkill
- vercel-react-view-transitionsSkill
- readme-showcase-syncSkill
- refactor-builtin-toolSkill
- release-managerSkill
- review-local-changesSkill
- review-pr-commentsSkill
- science-searchSkill
- setup-wizardSkill
- skill-creatorSkill
- soul-awakeningSkill
- sqlite-analyzerSkill
- sync-pending-approvalsSkill
- tool-creatorSkill
- trace-analyzerSkill
- trace-eval-loopSkill
- vitepress-doc-syncSkill
- worker-loopSkill
- x-cliSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 56
Check Tokio task safety: Are there std::fs calls or sync loops in async functions?
- Very specific: line 57
Check lock granularity: Is a Mutex locked across an .await or around long iterations?
- Distinctive: line 58
Check React render trees: Is parent state triggering re-renders of heavy children without memoization?
- Very specific: line 59
Check SQLite access: Are queries executed in loops?
- Distinctive: line 84
Verify that the fix does not introduce architectural bloat (KISS/YAGNI).
- Very specific: line 88
Write the final audit to .libragent/work/perf_audit_<target>_<YYYYMMDD>.md (or present directly to user) following …
- Very specific: line 94
No Raw Cargo Execution: NEVER execute raw cargo test, cargo build, or cargo clippy.
- Distinctive: line 97
Do NOT introduce dual-ID / dual-state caching mechanisms to "save a few bytes" or "optimize lookups".
- Distinctive: line 98
Do NOT build distributed-scale caching layers for a local SQLite desktop app.
- Distinctive: line 99
Evidence-Based Citing: Every bottleneck must cite specific file paths, line ranges, or measurable complexity.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Performance Audit
Systematically identify performance bottlenecks, CPU/memory hotspots, and latency culprits across LibrAgent's full stack, then generate a prioritized action plan (P0-P2) with actionable Before/After code solutions.
Scope & Diagnostic Domains
LibrAgent is a local desktop application (Tauri + Rust + React/TypeScript + SQLite). Performance issues primarily fall into four domains:
- Rust Concurrency & Memory:
- Synchronous blocking inside Tokio async tasks
- Lock contention and extended guard scopes (
Mutex,RwLock) - Unnecessary cloning, large buffer allocations, and non-streaming file/payload processing
- Tauri IPC Boundary:
- Massive JSON payload serialization across IPC
- Chatty, unbatched command invocations
- Unreleased event listeners causing leaks
- Frontend (React / TypeScript):
- Re-render cascades and unmemoized heavy computations in render paths
- Unstable object/callback references invalidating child memoization
- Unvirtualized long lists (chat items, logs, file trees)
- SQLite & Data Access:
- N+1 queries and missing index full-table scans
- Unbatched bulk inserts/updates outside transactions
- Connection pool contention and non-WAL mode operations
Detailed checklist: see references/checklist-fullstack.md.
Performance Audit Workflow
1. Target Hot Path ➔ 2. Inspect Code ➔ 3. Classify Priority (P0-P2) ➔ 4. Draft Before/After ➔ 5. Action Plan Report1. Identify Target Scope
- Clarify or identify the target module, feature, or flow under investigation (e.g., chat stream rendering, session transcript loading, tool execution pipeline, history search).
- Examine relevant source files directly without guessing.
2. Systematic Code Inspection
Cross-examine the target against the Full-Stack Checklist:
- Check Tokio task safety: Are there
std::fscalls or sync loops in async functions? - Check lock granularity: Is a
Mutexlocked across an.awaitor around long iterations? - Check React render trees: Is parent state triggering re-renders of heavy children without memoization?
- Check SQLite access: Are queries executed in loops? Are
WHERE/ORDER BYcolumns indexed?
3. Priority Classification
Classify all identified bottlenecks strictly by impact:
- P0 (Critical):
- Freezes main/UI thread for >100ms
- OOM risks, memory leaks, or potential deadlocks
- Tokio runtime starvation (sync blocking on worker threads)
- P1 (High):
- Noticeable UI stutter or rendering cascades (e.g., 50+ child components re-rendering on every keystroke/token)
- N+1 SQLite queries or missing indexes on growing tables
- Uncompressed/unpaginated multi-megabyte IPC serialization
- P2 (Medium / Low):
- Micro-optimizations (redundant clones, small heap allocations)
- Opportunities to use
Vec::with_capacityor pass references instead of owned values
4. Provide Concrete Before/After Solutions
For each finding:
- Specify exact code location:
relative/path/to/file.ext:line. - Explain the precise root cause (why it degrades performance).
- Provide minimal, idiomatic Before and After code snippets.
- Verify that the fix does not introduce architectural bloat (KISS/YAGNI).
5. Generate Action Plan Report
Write the final audit to .libragent/work/perf_audit_<target>_<YYYYMMDD>.md (or present directly to user) following references/reporting-template.md.
Critical Rules & Guardrails
- No Raw Cargo Execution: NEVER execute raw
cargo test,cargo build, orcargo clippy. These cause OOM and system freezes. If verification is needed, only use lightweight commands (pnpm rust:check,pnpm rust:fmt:check). - No Unauthorized Test Runs: Static analysis and diff-based inspection are primary. Do not run heavy test suites unless explicitly directed by the user.
- KISS / YAGNI (No Over-Engineering):
- Do NOT introduce dual-ID / dual-state caching mechanisms to "save a few bytes" or "optimize lookups".
- Do NOT build distributed-scale caching layers for a local SQLite desktop app.
- Evidence-Based Citing: Every bottleneck must cite specific file paths, line ranges, or measurable complexity. Never invent theoretical speedups (e.g. "will make it 300% faster") without concrete measurements.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

