performance-anti-patterns

performance-anti-patterns is a skill for Claude Code, Codex from mickeyyaya/refactoring-skills. It costs 41 tokens per session (3,165 once invoked), scanned A, original, MIT.

A checklist of recurring coding mistakes that make software slower or use more memory, especially in database and network code. It is intended for reviewing proposed code changes and investigating slow services.

In plain words
What is it for?
Use it to review changes involving databases, network requests, loops, caching, connections, CPU use, memory use, or response times.
Why use it?
It helps find performance problems before they appear under heavy real-world use, such as repeated database queries or blocking network calls.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to review changes involving databases, network requests, loops, caching, connections, CPU use, memory use, or response times.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mickeyyaya/refactoring-skills/performance-anti-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mickeyyaya/refactoring-skills --skill performance-anti-patterns
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/refactoring-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance-anti-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/mickeyyaya/refactoring-skills/performance-anti-patterns/github.svg)](https://agentmods.dev/skills/mickeyyaya/refactoring-skills/performance-anti-patterns)
Your own site
<a href="https://agentmods.dev/skills/mickeyyaya/refactoring-skills/performance-anti-patterns"><img src="https://agentmods.dev/badge/skills/mickeyyaya/refactoring-skills/performance-anti-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-anti-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/mickeyyaya/refactoring-skills/performance-anti-patterns"><img src="https://agentmods.dev/badge/skills/mickeyyaya/refactoring-skills/performance-anti-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.03165
Opus 5 $0.00020 $0.01582
Sonnet 5 $0.00008 $0.00633
Haiku 4.5 $0.00004 $0.00316

Measured 9d ago against content hash a183d3171662, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

performance-anti-patterns scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**Detection:** `fetch`, `axios.get`, `redisClient.get`, or `fs.write` inside a loop when bulk APIs exist. Redis `GET` in a loop should be `MGET`.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Node.js: `Sync` suffix (`readFileSync`, `writeFileSync`, `execSync`)
skills/performance-anti-patterns/SKILL.md · 365 lines

How it starts

The opening of the file, as written. The whole thing — 365 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Performance Anti-Patterns for Code Review

Overview

Performance anti-patterns are recurring mistakes that degrade throughput, latency, or resource efficiency. They often go undetected in development and surface only under production load. This catalog focuses on signals a reviewer can spot in a PR diff.

Use alongside anti-patterns-catalog (structural problems) and review-code-quality-process (review workflow).

When to Use

  • PR touches database queries, HTTP clients, or any I/O layer
  • p95 latency or memory usage increased without obvious cause
  • Load testing shows non-linear scaling
  • PR introduces loops, recursion, or collection transforms
  • PR modifies caching logic or connection management

Quick Reference

Category Anti-Pattern Severity Primary Signal in PR
Database N+1 Query HIGH Loop containing a query call
Database Unbounded Data Fetching HIGH Missing LIMIT/pagination
Database Improper Connection Management HIGH Connection created inside function
I/O Chatty I/O HIGH Repeated small I/O calls in a loop
I/O Synchronous I/O in Hot Path HIGH Blocking call without async/await
Resilience Retry Storm CRITICAL Retry loop with no backoff or jitter
Memory Memory Leak HIGH Event listener added without removal
Concurrency Blocking the Event Loop HIGH CPU-heavy work on main thread
Efficiency No Caching MEDIUM Identical fetch/compute on every call
Efficiency String Concatenation in Loops MEDIUM += on strings inside a loop
Efficiency Over-rendering MEDIUM Missing memoization in render path
Process Premature Optimization LOW Optimization without profiling comment

Category 1: Database Anti-Patterns

N+1 Query

Detection: ORM/DB call nested inside a loop or array transform. Lazy-loading ORMs do this by default.

  • Python/SQLAlchemy: session.query inside a loop over results
  • TypeScript/Prisma/TypeORM: findOne/findById inside Promise.all(items.map(...))

Read the full file on GitHub · 365 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 365 lines · 41 tokens per session scan A a183d3171662

Subscribe to this mod's changes

performance-anti-patterns is a skill published in the GitHub repository mickeyyaya/refactoring-skills (6 stars, last pushed 5mo ago), licensed MIT. It adds 41 tokens to every session and 3,165 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

gsd-ns-review

Route to the appropriate quality / review skill based on the user's intent. gsd-code-review-fix was absorbed by gsd-code-review --fix in #2790.

open-gsd/gsd-core · 16 tokens

issue

Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…

jeremylongshore/tons-of-skills-marketplace · 115 tokens

gitnexus

A code-graph analysis add-on for examining an existing codebase, including symbols, call paths, execution flows, and effects across repositories. It can query GitNexus through its command-line or MCP interfaces.

hashgraph-online/awesome-codex-plugins · 58 tokens

cleanup-code-inspections

Reduce technical debt and improve code quality by systematically resolving static analysis warnings.

flutter/flutter-intellij · 19 tokens

superlint

This skill describes the mandatory standard operating procedure for using our internal SuperLint tool. Use this when tasks require fixing code quality issues according to corporate standards.

mgechev/skillgrade · 0 tokens