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.
npx skills add mickeyyaya/refactoring-skills --skill performance-anti-patternsgit clone --depth 1 https://github.com/mickeyyaya/refactoring-skillsWrote 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.
[](https://agentmods.dev/skills/mickeyyaya/refactoring-skills/performance-anti-patterns)<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.
<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>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.
| Model | Per session | Once 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 |
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`) 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.queryinside a loop over results - TypeScript/Prisma/TypeORM:
findOne/findByIdinsidePromise.all(items.map(...))
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.
- 9d ago First seen · 365 lines · 41 tokens per session scan A a183d3171662
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.
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.
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.
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…
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.
cleanup-code-inspections
Reduce technical debt and improve code quality by systematically resolving static analysis warnings.
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.