Enforces performance rules (PERF-1 through PERF-3). Loaded by the conductor for review operations. Detects N+1 query patterns, unbounded loops over large collections, and missing pagination on list endpoints using static analysis.
From clean-code-codexnpx claudepluginhub mikecubed/agent-orchestration --plugin clean-code-codexThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
Precedence in the overall system: SEC → TDD → ARCH/TYPE → PERF-1 (BLOCK) → PERF-2, PERF-3 (WARN).
Severity: BLOCK | Languages: * | Source: CCC
What it prohibits: A database query or external API call executed inside a loop body, causing O(n) queries for a list of n items.
Detection patterns:
for/while/forEach/map) containing ORM call:
.find(), .findOne(), .query(), db.execute() inside iteration bodyawait fetch(), axios.get() inside loop bodyitems.map(async item => await repo.findBy(item.id))for item in items: with session.query(...) or Model.objects.get()
inside the loop bodyfor _, item := range items with db.QueryRow() or db.Query()
inside the loop bodyagent_action:
PERF-1 (BLOCK): N+1 query pattern at {file}:{line_range} — '{pattern}' called inside loop..findByIds(), batch load, DataLoader, or WHERE id IN (...) query--fix: refactor the loop to use a batch query and map results by keySeverity: WARN | Languages: * | Source: CCC
What it prohibits: Iteration over a collection that may be large with no limit, early-exit condition, or pagination guard.
Detection patterns:
for item in collection: / for _, item := range collection /
items.forEach( with no .slice(), .limit(), break, or size guard
within the loopLIMIT clause in the querywhile loops consuming an iterator/generator with no take(), islice(),
or maximum iteration countagent_action:
PERF-2 (WARN): Unbounded loop at {file}:{line} — iterating '{collection}' with no limit guard.--fix: add a .slice(0, MAX) or equivalent guard with a configurable limitSeverity: WARN | Languages: * | Source: CCC
What it prohibits: An API handler or route that returns a list of items without pagination parameters.
Detection patterns:
limit, offset, page, cursor,
or take/skip parameters in the request schema.limit(), .take(), LIMIT clause, or page-size guardfirst/after argumentsfindAll() or SELECT * without paginationagent_action:
PERF-3 (WARN): Missing pagination at {file}:{line} — endpoint '{path}' returns unbounded list.// Cursor-based (preferred for large datasets)
app.get('/items', async (req, res) => {
const { cursor, limit = 20 } = req.query;
const items = await repo.findAfter(cursor, Math.min(limit, 100));
res.json({ items, nextCursor: items[items.length - 1]?.id });
});
--fix: add pagination parameters and apply default + maximum limitsOutput format per finding:
PERF-N | BLOCK/WARN | <file>:<line> | <pattern name> | Suggestion: <guidance>
Activation:
Loaded by the conductor for review operations. Signal phrases: "review",
"check", "audit", "performance", "slow query", "N+1".
Report schema: see skills/conductor/shared-contracts.md.