performance-tuning

performance-tuning is a skill for Claude Code, Codex from Teddy563/mcwrench. It costs 191 tokens per session (934 once invoked), scanned A, original, MIT.

A Minecraft server troubleshooting guide for diagnosing lag, low ticks per second, high milliseconds per tick, garbage-collection pauses, and out-of-memory crashes. Ticks are the server's regular update cycles, so slow ticks can make gameplay stutter.

In plain words
What is it for?
Use it to inspect server health and profiles, investigate lag during gameplay, tune heap size and JVM settings, and troubleshoot memory pressure.
Why use it?
It encourages measuring the actual cause with Spark before changing memory settings or Java options, helping distinguish workload, memory, garbage collection, and disk problems.

Skill for Claude CodeCodex

Part of the mcwrench plugin — 13 skills, 19 commands, 2 agents shipped together

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.

agentmods
npx agentmods add skills/teddy563/mcwrench/performance-tuning
Any agent
npx skills add Teddy563/mcwrench --skill performance-tuning
Clone the repo
git clone --depth 1 https://github.com/Teddy563/mcwrench

Made for: Claude Code, Codex.

Or install mcwrench, the plugin that ships this one along with the rest of its 13 skills, 19 commands, 2 agents.

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-tuning

README.md
[![agentmods](https://agentmods.dev/badge/skills/teddy563/mcwrench/performance-tuning.svg)](https://agentmods.dev/skills/teddy563/mcwrench/performance-tuning)
Your own site
<a href="https://agentmods.dev/skills/teddy563/mcwrench/performance-tuning"><img src="https://agentmods.dev/badge/skills/teddy563/mcwrench/performance-tuning.svg" alt="Measured on agentmods" height="20"></a>
Per session 191 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 934 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00191 $0.00934
Opus 5 $0.00096 $0.00467
Sonnet 5 $0.00038 $0.00187
Haiku 4.5 $0.00019 $0.00093

Measured 4d ago against content hash 28f81e136f20, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

performance-tuning scanned grade A with 0 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/performance-tuning/SKILL.md · 67 lines

How it starts

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

Performance Tuning

Diagnose first, tune second. Never hand someone a wall of flags without measuring.

Step 1 — Measure with Spark

Spark (spark.lucko.me) is the modern profiler (replaces Timings; Paper bundles it). See references/spark-cheatsheet.md. The minimum diagnostic loop:

  1. /spark tps and /spark health — is it a TPS problem, an MSPT spike problem, or memory?
  2. /spark profiler start --timeout 300 during the lag, then read the uploaded flame graph.
  3. For memory pressure / GC churn: /spark profiler start --alloc, /spark gc, /spark heapsummary.

Identify whether the cost is the main thread (ticking: entities, hoppers, redstone, chunk gen), GC, or I/O (world saves, plugin storage on slow disk).

Step 2 — Heap & JVM flags

See references/aikars-flags.md for the full verified flag set and sizing rules. Key points:

  • Xms == Xmx. Leave 1–1.5 GB headroom for the OS + JVM native memory beyond the heap.
  • Aikar's flags are G1GC-tuned and remain the proven default on the official PaperMC page.
  • Java 25 nuance: Paper 26.1+ requires Java 25. Hosting/community guidance (e.g. WinterNode — NOT PaperMC's own docs) recommends not pairing Aikar's G1 flags with Java 25's Generational ZGC; choose one GC. Present Aikar's/G1 as the safe default and ZGC as an alternative to benchmark, and never mix the two flag sets.
  • On memory-capped containers (Pterodactyl/Pelican), -XX:+AlwaysPreTouch can cause "Cannot allocate memory" at boot — drop it there.

Step 3 — Config tuning (biggest wins first)

In observed frequency order:

  1. view-distance / simulation-distance (server.properties, spigot.yml, per-world paper-world.yml). The lower of the configured values wins per world. Typical sane values: view 6–10, simulation 4–6. Anarchy/huge servers go lower.
  2. Mob farms / entity loadspigot.yml: entity-activation-range, mob-spawn-range, Paper per-player mob spawns; cap with entity-per-chunk-save-limit for experience_orb, arrow, ender_pearl, item.
  3. Hopperspaper-world.yml hopper tuning / transfer-cooldown; reduce move-event overhead on hopper-heavy economies.
  4. Chunk storms — cap player-max-chunk-load-rate (~100.0) for exploration-heavy servers.
  5. Redstone clocks / lag machines — find them in the Spark profile and address the build.
  6. Sync I/O — move LuckPerms/world storage off slow disks; stagger autosaves.

Read the full file on GitHub · 67 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 67 lines · 191 tokens per session scan A 28f81e136f20

Subscribe to this mod's changes

performance-tuning is a skill published in the GitHub repository Teddy563/mcwrench (1 stars, last pushed 11d ago), licensed MIT. It adds 191 tokens to every session and 934 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. 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

develop-web-game

Use when Codex is building or iterating on a web game (HTML/JS) and needs a reliable development + testing loop: implement small changes, run a Playwright-based test script with short input bursts and intentional pauses, inspect screenshots/text, and review console errors with rendergametotext.

netease-youdao/LobsterAI · 64 tokens

ai-behavior-trees-utility-ai

Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential, sigmoid, quadratic — considerations, and action evaluators), plus hybrid BT-drives-Utility agents. Use when implementing a…

gamedev-skills/awesome-gamedev-agent-skills · 158 tokens

camera-systems

Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person orbit with collision and first-person look; plus multi-target framing and a shake hook. Engine-neutral techniques that pair with the engine's camera node and rigs like Unity Cinemachine or…

gamedev-skills/awesome-gamedev-agent-skills · 127 tokens

create-game-assets

Plan, generate, source, normalize, and validate cohesive visual game assets. Use for art direction, style bibles, sprites, tilesets, backgrounds, UI art, icons, textures, concept art, or 3D asset briefs.

gamedev-skills/awesome-gamedev-agent-skills · 52 tokens

game-ai

Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API. Use when building enemy AI, an FSM or behavior tree, steering/flocking, or pathfinding, or when the user mentions state…

gamedev-skills/awesome-gamedev-agent-skills · 85 tokens

game-feel

Add "juice" and game feel that makes actions satisfying — screen shake, hit-stop/freeze frames, tweened/eased motion, squash & stretch, knockback, and layered audio-visual feedback — as engine-neutral techniques that pair with the detected engine's tween, particle, and camera APIs. Use when the user mentions game…

gamedev-skills/awesome-gamedev-agent-skills · 116 tokens