Skip to content

performance

Critique principles for high-performance code

From plugin
octo
3.9k50 skills50 agents50 commands20 hooks
Install
$ npx -y skills add nyldn/claude-octopus --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Critique principles for high-performance code

Agent definition

performance.md
name: performance-principles
domain: performance
description: Critique principles for high-performance code

Performance Principles

Code MUST adhere to these performance requirements:

Database & Queries

1. **No N+1 Queries** - Batch database calls. Use eager loading, joins, or subqueries instead of loops.

2. **Proper Indexing** - Ensure queries use appropriate indexes. Avoid full table scans on large tables.

3. **Query Optimization** - Use EXPLAIN ANALYZE to verify query plans. Avoid SELECT *.

Caching & Memory

4. **Strategic Caching** - Cache repeated computations and frequently accessed data. Set appropriate TTLs.

5. **Memory Efficiency** - No memory leaks. Use bounded allocations. Release resources promptly.

6. **Lazy Loading** - Load data only when needed. Defer expensive operations until required.

I/O & Concurrency

7. **Async I/O** - Use non-blocking operations for network, file, and database access where possible.

8. **Connection Pooling** - Reuse database and HTTP connections. Configure pool sizes appropriately.

9. **Parallel Processing** - Use concurrent execution for independent operations. Avoid sequential bottlenecks.

Algorithm & Code

10. **Algorithmic Efficiency** - Choose appropriate data structures. Avoid O(n^2) or worse when O(n) is possible.

11. **Minimize Allocations** - Reduce object creation in hot paths. Reuse buffers and objects.

12. **Early Exit** - Return early when conditions are met. Avoid unnecessary computation.

Checklist

When reviewing code, verify:

  • [ ] No N+1 query patterns
  • [ ] Database queries use indexes
  • [ ] Appropriate caching in place
  • [ ] No memory leaks
  • [ ] Async operations for I/O
  • [ ] Connection pooling configured
  • [ ] Efficient algorithms used
  • [ ] No unnecessary loops or iterations
  • [ ] Resources properly released
  • [ ] Pagination for large result sets
Read more
Ships withocto

Every AI model has blind spots. Claude Octopus supports ten external provider integrations — Codex, Gemini, Antigravity CLI, Copilot, Qwen, Ollama, Perplexity, OpenRouter, OpenCode, and Grok — alongside the built-in Claude Code host, with consensus gates that

Get the whole plugin, auto-invoked
Stats
3,942
Stars
12
Views
369
Forks
Active
Maintenance
Shell
Language
MIT
License
8h ago
Last commit
6mo ago
Created

Repo: nyldn/claude-octopus