Back to skills
SKILL.md
Performance
ASecurity```typescript // Simple profiling const timers = new Map<string, number>() export function startTimer(name: string) { timers.set(name, Date.now()) } export function endTimer(name: string) { const start = timers.get(name) if (!start) return console.log(`${name}: ${Date.now() - start}ms`) timers.delete(name) } // Usage startTimer('db-query') const users = await db.query('SELECT * FROM users') endTimer('db-query') ``` ```sql -- Use EXPLAIN ANALYZE EXPLAIN AN
- 21 stars
- 0 votes
- 0 copies
- 10 views
- Added September 7, 2026
Works with
Security analysis
100/100npx -y skills add modbender/skill-library-mcp --skill performance --agent claude-codeAre you the author of Performance?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/modbender-performance)# Performance Engineering
## Bottleneck Detection
```typescript
// Simple profiling
const timers = new Map<string, number>()
export function startTimer(name: string) {
timers.set(name, Date.now())
}
export function endTimer(name: string) {
const start = timers.get(name)
if (!start) return
console.log(`${name}: ${Date.now() - start}ms`)
timers.delete(name)
}
// Usage
startTimer('db-query')
const users = await db.query('SELECT * FROM users')
endTimer('db-query')
```
## Query Optimization
```sql
-- Use EXPLAIN ANALYZE
EXPLAIN ANALYZE SELECT * FROM users WHERE email = 'test@example.com';
-- Add indexes
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_orders_user_id ON orders(user_id, created_at DESC);
```
## Caching Strategy
| Data Type | TTL | Strategy |
|-----------|-----|----------|
| User session | 24h | Redis |
| Config | 1h | Memory |
| Product catalog | 1h | Redis + CDN |
| API responses | 1min | Cache-aside |
## Checklist
- [ ] Profile critical paths
- [ ] Optimize database queries
- [ ] Add appropriate indexes
- [ ] Implement caching
- [ ] Set up load testing
- [ ] Monitor Core Web Vitals (frontend)
Attribution
Related skills
View all in databases →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.