skills/crazydubya/performance-profiler/SKILL.md
Identifies performance bottlenecks including N+1 queries, inefficient loops, memory leaks, and slow algorithms. Use when user mentions performance issues, slow code, optimization, or profiling.
npx skillsauth add aiskillstore/marketplace performance-profilerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Identifies and suggests fixes for common performance bottlenecks in code.
N+1 Query Problems:
// Bad: N+1 queries
users.forEach(user => {
const posts = db.query('SELECT * FROM posts WHERE user_id = ?', user.id);
});
// Good: Single query with JOIN
const usersWithPosts = db.query('SELECT * FROM users LEFT JOIN posts ON users.id = posts.user_id');
Inefficient Loops:
# Bad: O(n²) nested loops
for item in list1:
for other in list2:
if item.id == other.id:
process(item, other)
# Good: O(n) with hash map
lookup = {other.id: other for other in list2}
for item in list1:
if item.id in lookup:
process(item, lookup[item.id])
Unnecessary Re-renders (React):
// Bad: Creates new object on every render
<Component style={{ margin: 10 }} />
// Good: Define outside or useMemo
const style = { margin: 10 };
<Component style={style} />
Memory Leaks:
Blocking Operations:
Check for:
Suggest:
CREATE INDEX idx_user_id ON posts(user_id);Identify:
Common fixes:
Check for:
Suggest:
const Component = lazy(() => import('./Component'));Issues:
Solutions:
Performance Analysis
===================
Critical Issues (Fix Immediately):
1. N+1 query in UserController.index (file.js:45)
- Impact: 100+ DB queries per request
- Fix: Use eager loading or JOIN
2. Memory leak in EventEmitter (file.js:120)
- Impact: Memory grows unbounded
- Fix: Remove listeners in cleanup
High Priority:
3. O(n²) loop in processData (file.js:200)
- Impact: Slow for large datasets
- Fix: Use hash map for O(n)
Medium Priority:
4. Missing image optimization
- Impact: Slow page load
- Fix: Use next/image or optimize manually
JavaScript:
console.time() / console.timeEnd()Python:
Database:
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.