agentleFS
harrissohail6harrissohail6/claude-code-config/skills/performance-tuning/SKILL.md

performance-tuning

Skill1 starsChanged 11 months agoMITView on GitHub

Performance optimization techniques. Auto-activates when discussing slow code, optimization, or performance issues.

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always profile before optimizing:

    line 9

“Common” is measured: kept by at least 6 in 10 of the 6 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Performance Tuning

Measure First

Always profile before optimizing:

  • Browser DevTools Performance tab
  • Node.js: --inspect or clinic.js
  • Database: EXPLAIN ANALYZE

Database Optimization

Indexing

-- Index frequently queried columns
CREATE INDEX idx_users_email ON users(email);

-- Composite index for multi-column queries
CREATE INDEX idx_orders_user_date ON orders(user_id, created_at);

Query Optimization

-- Avoid SELECT *
SELECT id, name, email FROM users;

-- Use LIMIT
SELECT * FROM logs ORDER BY created_at DESC LIMIT 100;

-- Batch operations
INSERT INTO users (name) VALUES ('a'), ('b'), ('c');

JavaScript Optimization

React Performance

// Memoize expensive components
const MemoizedList = React.memo(ExpensiveList);

// Memoize callbacks
const handleClick = useCallback(() => {}, [deps]);

// Memoize computed values
const total = useMemo(() => items.reduce(...), [items]);

// Virtualize long lists
<VirtualizedList items={items} />

General JS

// Debounce frequent events
const debouncedSearch = debounce(search, 300);

// Use appropriate data structures
const map = new Map(); // O(1) lookup vs array O(n)
const set = new Set(); // O(1) has vs array includes O(n)

Caching

  • HTTP caching headers
  • Redis/Memcached for hot data
  • CDN for static assets
  • Query result caching

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.