Agent skill

Performance Tuning

by NoobyGains in NoobyGains/godmode

A skill your agent uses when performance is a concern - sluggish pages, slow queries, bloated bundles, high-latency APIs, or whenever someone says "optimize" or "make it faster"

MITAuto-check passedDatabases

Install Performance Tuning

skills CLI
$ npx skills add NoobyGains/godmode --skill performance-tuning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NoobyGains/godmode performance-tuning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NoobyGains/godmode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/performance-tuning .claude/skills/performance-tuning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
performance-tuning
GitHub stars
107
Token cost
~2.3k tokens
SKILL.md length
835 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when performance is a concern - sluggish pages, slow queries, bloated bundles, high-latency APIs, or whenever someone says "optimize" or "make it faster"

  • Works in 4 steps: Establish a Baseline → Locate the Bottleneck → Resolve the Bottleneck → …
  • Performance is a concern - sluggish pages
  • SKILL.md covers Overview, The Prime Directive, When to Use and The Entry Protocol, plus 6 more sections
  • Calls curl

What it does

Performance Tuning is an agent skill from NoobyGains/godmode. Use when performance is a concern - sluggish pages, slow queries, bloated bundles, high-latency APIs, or whenever someone says "optimize" or "make it faster"

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Query optimization and Web performance. The repository describes itself as: The AI development framework that thinks before it builds. 36 composable skills for Claude Code, Cursor, Codex, and OpenCode. The licence is MIT.

When your agent uses it

  • Performance is a concern - sluggish pages
  • Bloated bundles
  • High-latency APIs
  • Whenever someone says optimize

Example prompts

  • “optimize”
  • “make it faster”
  • “/performance-tuning”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Establish a Baseline
  2. Locate the Bottleneck
  3. Resolve the Bottleneck
  4. Confirm the Improvement

What it can do on your machine

Read from SKILL.md and the folder at commit 441103a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Performance Tuning loads about 2.3k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 835 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NoobyGains/godmode at commit 441103a, republished under its MIT licence (© NoobyGains). 835 words, ~2,270 tokens.

Download SKILL.mdSave it as .claude/skills/performance-tuning/SKILL.md (or your agent's skills folder).
name
performance-tuning
description
Use when performance is a concern - sluggish pages, slow queries, bloated bundles, high-latency APIs, or whenever someone says "optimize" or "make it faster"

Performance Tuning

Overview

Blind optimization is the root of wasted effort. Measure, pinpoint the bottleneck, fix that specific thing.

Core principle: No optimization without measurement. No measurement without a demonstrated performance problem.

No exceptions. No workarounds. No shortcuts.

The Prime Directive

NO OPTIMIZATION WITHOUT A MEASUREMENT PROVING THE PROBLEM

If you have not profiled it, you are not qualified to optimize it. Intuitions about performance are reliably wrong.

When to Use

dot
digraph perf_gate {
    problem [label="Is there a\nmeasurable\nperformance deficit?", shape=diamond];
    measure [label="MEASURE\nProfile and locate\nthe bottleneck", shape=box, style=filled, fillcolor="#ccffcc"];
    halt [label="HALT\nDo not optimize", shape=box, style=filled, fillcolor="#ffcccc"];
    found [label="Bottleneck\npinpointed?", shape=diamond];
    fix [label="FIX\nthat specific thing", shape=box, style=filled, fillcolor="#ccccff"];
    dig [label="Investigate further\nor accept current\nperformance", shape=box];

    problem -> measure [label="yes"];
    problem -> halt [label="no"];
    measure -> found;
    found -> fix [label="yes"];
    found -> dig [label="no"];
    fix -> measure [label="re-measure"];
}

Engage when:

  • Users report perceptible slowness
  • Telemetry shows regression (response time, page load, throughput)
  • Performance budgets are breached (bundle size, Core Web Vitals)
  • Database queries exceed 100ms for routine operations
  • API responses exceed 500ms for typical requests

Do not engage when:

  • "It might be slow someday" (measure when it actually is)
  • "Best practice recommends optimizing X" (is X actually slow?)
  • Current performance satisfies current requirements
  • The feature does not yet work correctly (correctness first)

The Entry Protocol

BEFORE any optimization effort:

1. MEASURE: What is the current performance? (Numbers, not hunches)
2. TARGET: What performance level is required? (Specific threshold)
3. PINPOINT: Where is the bottleneck? (Profiler data, not speculation)
4. FIX: Address that specific bottleneck
5. VERIFY: Did the measurement improve? By how much?

Omit any step = premature optimization

The Methodology

Phase 1: Establish a Baseline

You must have numbers before changing anything.

DimensionHow to Measure
Page load latencyLighthouse, WebPageTest, browser DevTools Performance panel
API response timeServer logs, APM instrumentation, time curl
Query execution timeEXPLAIN ANALYZE, slow query log, ORM query logging
Bundle weightwebpack-bundle-analyzer, source-map-explorer
Memory consumptionHeap snapshots, process.memoryUsage()
CPU utilizationFlame charts via profiler, perf, py-spy

Record the baseline. You need it to prove the optimization was effective.

Phase 2: Locate the Bottleneck

The bottleneck is almost never where you expect it.

Profile -> identify the function/query/resource consuming the most time
                                    |
                    That is your optimization target
                                    |
                    Everything else is a distraction

Check these locations in order (most common first):

  1. Database queries -- N+1 patterns, absent indexes, full table scans
  2. Network calls -- Sequential when parallelizable, no caching layer
  3. Serialization -- Oversized payloads, unnecessary nested data
  4. Computation -- Suboptimal algorithms, redundant processing
  5. I/O operations -- File system access, disk reads, external API latency
Phase 3: Resolve the Bottleneck

Fix only what the profiler revealed. Change one variable at a time.

Database Tuning
SymptomRemedy
N+1 queriesEager loading / JOIN / batched query
Missing indexAdd index on columns in WHERE/JOIN/ORDER BY clauses
Full table scanAdd appropriate index; constrain result set
Oversized result setsCursor-based pagination for large datasets
Expensive aggregationsMaterialized views or pre-computed summaries
Lock contentionTighten transaction scope; introduce read replicas
sql
-- BEFORE: Diagnose the problem
EXPLAIN ANALYZE SELECT * FROM transactions WHERE account_id = 789;

-- Look for: Seq Scan (missing index), high cost, slow execution
-- AFTER: Add index, re-run EXPLAIN ANALYZE, compare numbers
Frontend Tuning (Core Web Vitals)
MetricThresholdTypical Remedies
LCP (Largest Contentful Paint)< 2.5sOptimize hero images, preload critical resources, enable SSR
INP (Interaction to Next Paint)< 200msBreak long tasks, defer non-critical JS, offload to web workers
CLS (Cumulative Layout Shift)< 0.1Set explicit dimensions on media, avoid dynamic content insertion above fold

Bundle weight reduction:

1. Audit: what occupies space in the bundle?
2. Remove unused dependencies
3. Code-split by route (lazy loading)
4. Ensure ESM imports for tree-shaking
5. Enable compression (gzip/brotli)
API Tuning
SymptomRemedy
Over-fetchingReturn only requested fields; support sparse fieldsets
Under-fetchingBatch endpoints; return compound documents
No cachingAdd Cache-Control headers and ETags
Synchronous heavy processingReturn 202 Accepted with async processing + polling
Oversized responsesPaginate, compress, or stream
Slow serializationProfile the serializer; reduce nesting depth
Algorithm Tuning

Only when the profiler points to computation as the bottleneck:

FromToWhen Applicable
O(n^2) nested loopsHash map lookup O(n)Large input sets
Repeated computationMemoization or cachingSame inputs, expensive function
Synchronous blockingAsync / parallel executionI/O-bound work
Full recomputationIncremental updateSmall mutations to large datasets
Show full SKILL.md (327 more words)Show less
Phase 4: Confirm the Improvement

Re-run the identical measurement. Compare the numbers.

Baseline: API response 920ms
After optimization: API response 145ms
Improvement: 84% reduction
Required threshold: < 500ms -- ACHIEVED

If the improvement is not measurable, revert the change. An optimization that cannot be measured is not an optimization.

Anti-Patterns to Avoid

Anti-PatternWhy It FailsBetter Approach
Premature cachingAdds complexity and stale-data risksOptimize the query first
Premature indexingIndexes degrade write throughput and consume storageAdd only when a query is demonstrably slow
Micro-optimizing tight loopsSaves nanoseconds, destroys readabilityProfile first; only touch what the profiler flags
"Async all the things"Adds cognitive complexity, harder debuggingApply async only to I/O-bound operations
Optimizing in dev environmentDev performance diverges from productionProfile in a production-like environment
Caching without invalidationStale data, consistency bugsDesign invalidation strategy before adding cache

Cognitive Traps

RationalizationTruth
"This will be slow at scale"Is it slow NOW? Optimize when evidence arrives.
"Best practice says to add an index"Is the query actually slow? Indexes impose write overhead.
"Caching will speed everything up"Have you measured what is actually slow? Caching adds complexity.
"Async will make this faster"Is this I/O-bound? Async adds mental overhead for no gain on CPU-bound work.
"I know where the bottleneck is"Profilers exist because human intuition about performance is unreliable. Measure.
"Quick optimization while I am in here"Unplanned optimizations are premature by definition.

Guardrails -- HALT and Measure

  • Optimizing without profiler output on hand
  • "While I am here, let me tune this..."
  • Adding a cache without measuring what is slow
  • Optimizing code that runs once (startup routines, one-time migrations)
  • Sacrificing readability for unmeasured performance gains
  • Solving scaling problems that do not yet exist
  • Applying multiple optimizations simultaneously (isolate impact per change)

Every item on this list means: HALT. Measure first. Optimize only the measured bottleneck.

Integration

Complementary skills:

  • godmode:system-design -- Architectural choices that influence performance characteristics
  • godmode:completion-gate -- Validate optimization with measurements
  • godmode:quality-enforcement -- Performance budgets as automated quality gates

The Bottom Line

Measure -> Pinpoint bottleneck -> Fix that one thing -> Confirm improvement

Everything else is speculation. Speculation about performance is always wrong.

© NoobyGains, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/performance-tuning of NoobyGains/godmode.

Open the folder on GitHubat commit 441103a

Compare with similar skills

Performance Tuning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Performance Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Performance Tuning this skillNoobyGains/godmode107—~2.3kAutomated safety check: PassMIT
Jpa Patternsdecebals/claude-code-java7511 repos~4kAutomated safety check: PassMIT
Performance OptimizationHack23/cia239—~1.9kAutomated safety check: PassApache-2.0
Performanceericrisco/rsc-harness167—~4kAutomated safety check: PassMIT
Doctrine Fetch Modesdev-toolings/superpowers-symfony222—~560Automated safety check: NotesMIT
SQL Optimization Patternsynulihao/AgentSkillOS61711 repos~3.3kAutomated safety check: PassNone

Similar skills

  • Jpa Patterns

    decebals/claude-code-java

    JPA/Hibernate patterns and common pitfalls (N+1, lazy loading, transactions, queries).

    751 GitHub starsUsed in 1 repo~4k tokens
    DatabasesAuto-check passed
  • Application performance tuning, JVM optimization, database query tuning, Vaadin UI performance

    239 GitHub stars~1.9k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Performance

    ericrisco/rsc-harness

    A skill your agent uses when a page or interaction is slow for one user and the fix starts from a measurement — a failing Core Web Vital (LCP, INP, CLS), a heavy JS bundle, wasted re-renders, an…

    167 GitHub stars~4k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Doctrine Fetch Modes

    dev-toolings/superpowers-symfony

    Optimize Doctrine fetching with DTO hydration (SELECT NEW), fetch joins, lazy loading, query hints, and DBAL 4 access

    222 GitHub stars~560 tokensUpdated 3 days ago
    DatabasesAuto-check: notes
  • SQL Optimization Patterns

    ynulihao/AgentSkillOS

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.

    617 GitHub starsUsed in 11 repos~3.3k tokens
    DatabasesAuto-check passed
  • Official

    Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services.

    21k GitHub stars~1.7k tokensUpdated today
    DatabasesAuto-check passed

More from NoobyGains/godmode

All 34 skills in this repo
  • Activation

    NoobyGains/godmode

    A skill your agent uses when starting any conversation - establishes how to locate and invoke skills, mandating Skill tool usage before ANY response including clarifying questions

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed
  • Agent Messaging

    NoobyGains/godmode

    A skill your agent uses when dispatching subagents, composing prompts for teammates, structuring handoff reports, or managing context boundaries between agents.

    107 GitHub stars~3k tokensUpdated 7 mo ago
    Auto-check passed
  • Codebase Research

    NoobyGains/godmode

    A skill your agent uses when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches…

    107 GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check: notes
  • Completion Gate

    NoobyGains/godmode

    A skill your agent uses when about to declare work done, fixed, or passing, before committing or opening PRs - demands executing verification commands and reading their output before making any…

    107 GitHub stars~1.6k tokensUpdated 7 mo ago
    Auto-check passed
  • Comprehension Check

    NoobyGains/godmode

    A skill your agent uses when implementing any substantial feature, multi-file modification, or architectural change - produces a plain-language walkthrough of every alteration so the developer can…

    107 GitHub stars~1.5k tokensUpdated 7 mo ago
    Auto-check passed
  • Delegated Execution

    NoobyGains/godmode

    A skill your agent uses when executing implementation plans with independent tasks in the current session

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed

Questions about Performance Tuning

What does Performance Tuning do?

A skill your agent uses when performance is a concern - sluggish pages, slow queries, bloated bundles, high-latency APIs, or whenever someone says "optimize" or "make it faster". Performance Tuning is an agent skill from NoobyGains/godmode.

When should I use Performance Tuning?

Performance Tuning fits situations like: performance is a concern - sluggish pages; bloated bundles; high-latency APIs; whenever someone says optimize.

How do I install Performance Tuning in Claude Code?

Run `npx skills add NoobyGains/godmode --skill performance-tuning -a claude-code`. Or copy the skill folder (skills/performance-tuning in NoobyGains/godmode) into .claude/skills/performance-tuning in your project. Claude Code loads it when a task matches its description.

How do I install Performance Tuning in Codex?

Run `npx skills add NoobyGains/godmode --skill performance-tuning -a codex`. Or copy the skill folder (skills/performance-tuning in NoobyGains/godmode) into .agents/skills/performance-tuning in your project. Codex loads it when a task matches its description.

Can I use Performance Tuning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NoobyGains/godmode --skill performance-tuning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-tuning, .gemini/skills/performance-tuning, .github/skills/performance-tuning and .opencode/skills/performance-tuning in your project.

What does Performance Tuning need to run?

Going by SKILL.md and its folder, Performance Tuning needs the command-line tools its instructions call (curl).

Does Performance Tuning access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Performance Tuning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Performance Tuning use?

Performance Tuning is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Performance Tuning use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Performance Tuning?

Skills that share tags, products or a category with Performance Tuning: Jpa Patterns (decebals/claude-code-java, 751 stars), Performance Optimization (Hack23/cia, 239 stars), Performance (ericrisco/rsc-harness, 167 stars) and Doctrine Fetch Modes (dev-toolings/superpowers-symfony, 222 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Performance Tuning?

NoobyGains (a GitHub user) maintains it in NoobyGains/godmode, which has 107 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on March 9, 2026.

Source: NoobyGains/godmode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.