pwp-perf

pwp-perf is a skill for Claude Code, Codex from shandar/pwp-plugin. It costs 113 tokens per session (900 once invoked), scanned A, original, MIT.

A performance-tuning workflow for software projects. It measures a slow area, identifies the main cause, applies a change, and checks whether the result improved.

In plain words
What is it for?
Use it to investigate page loads, API responses, rendering, bundle size, memory use, or database queries, then verify the improvement.
Why use it?
It prevents spending time on guesses or on optimizing code that is not causing the delay. It requires before-and-after evidence for the change.

Skill for Claude CodeCodex

Part of the pwp plugin — 11 skills 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/shandar/pwp-plugin/pwp-perf
Any agent
npx skills add shandar/pwp-plugin --skill pwp-perf
Clone the repo
git clone --depth 1 https://github.com/shandar/pwp-plugin

Made for: Claude Code, Codex.

Or install pwp, the plugin that ships this one along with the rest of its 11 skills.

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 pwp-perf

README.md
[![agentmods](https://agentmods.dev/badge/skills/shandar/pwp-plugin/pwp-perf.svg)](https://agentmods.dev/skills/shandar/pwp-plugin/pwp-perf)
Your own site
<a href="https://agentmods.dev/skills/shandar/pwp-plugin/pwp-perf"><img src="https://agentmods.dev/badge/skills/shandar/pwp-plugin/pwp-perf.svg" alt="Measured on agentmods" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 900 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.00113 $0.00900
Opus 5 $0.00056 $0.00450
Sonnet 5 $0.00023 $0.00180
Haiku 4.5 $0.00011 $0.00090

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

Security

Grade A, and why

pwp-perf 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 3d 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/pwp-perf/SKILL.md · 85 lines

How it starts

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

Performance Optimization Skill

The cardinal rule: never optimize on vibes. Measure, identify the bottleneck, fix it, prove it's faster.

Performance Mindset

  • Measure before optimizing. Intuition about performance is wrong more often than right. Profile first.
  • Optimize the bottleneck. Making a fast operation faster doesn't help.
  • Premature optimization is real. Only optimize measured problems or known-critical paths.
  • Verify the improvement. Before/after numbers or it didn't happen.

Investigation Protocol

Step 1: Define the Problem

  • What is slow? (Page load, API, render, build)
  • How slow? (Actual numbers: "3.2 seconds")
  • What is the target? ("Under 1 second")

Step 2: Measure Current State

Area How to Measure
Page load Lighthouse, DevTools Performance tab
Core Web Vitals LCP, INP, CLS via Lighthouse
API response Network tab timing, server-side logging
Render React DevTools Profiler
Bundle size Build output, bundlephobia
Memory DevTools Memory tab, heap snapshots
Database Query EXPLAIN plans

Step 3: Identify the Bottleneck

  1. Network — too many requests, large payloads, no caching
  2. Data — slow queries, over-fetching, N+1 patterns
  3. Rendering — unnecessary re-renders, layout thrashing
  4. Compute — expensive calculations on main thread
  5. Assets — uncompressed images, unminified JS

Step 4: Fix the Bottleneck

Bottleneck Common Fixes
Large bundle Code splitting, dynamic imports, tree shaking
Slow page load Lazy loading, preload critical resources
Re-renders useMemo, useCallback, React.memo (only where profiled)
Slow API Caching, pagination, field selection
N+1 queries Batch queries, eager loading, DataLoader
Large images WebP/AVIF, responsive srcset, lazy loading
Heavy computation Web Workers, caching results

Read the full file on GitHub · 85 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. 3d ago First seen · 85 lines · 113 tokens per session scan A 03735325080a

Subscribe to this mod's changes

pwp-perf is a skill published in the GitHub repository shandar/pwp-plugin (1 stars, last pushed 6mo ago), licensed MIT. It adds 113 tokens to every session and 900 once invoked, about $0.0006 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

glossary-init

USE WHEN setting up a repo for AI-first work, when an agent hallucinates domain term meaning, or when user asks to bootstrap / extend the repo's domain glossary. Surfaces candidate terms by identifier frequency, asks the user for 1-sentence definitions, writes GLOSSARY.md at repo root. Idempotent — re-running adds new…

Filip-Podstavec/claude-leverage · 119 tokens

status

Set a status message on your DevGlobe profile.

Nako0/devglobe-extension · 12 tokens

codex-pair-resume

Resume codex-pair for this project after a previous pause. Removes .codex-pair/state/paused and clears failure state. Review resumes on the next supported file edit; missing state is a no-op.

Lykhoyda/ask-llm · 51 tokens

conventions-init

USE WHEN setting up a repo for AI-first work (after /init-repo), or when the context-surface hook should start feeding repo conventions to agents before edits. Drafts conventions.yml at repo root: per-kind casing (inferred from the code), a vague-name denylist seed, directory roles, and a hand-filled house-rules…

Filip-Podstavec/claude-leverage · 124 tokens

opik

This skill should be used when the user needs to add Opik tracing or integrations to their code, instrument an LLM application, or needs reference for Opik SDK usage (Python, TypeScript, REST API). Use for tasks like "add tracing", "instrument my code", "use trackopenai", "add OpikTracer", "what span types are…

comet-ml/opik-claude-code-plugin · 84 tokens

codex-review

Get a second opinion from OpenAI Codex on your current code changes. Analyzes staged/unstaged diffs and returns prioritized findings. Use when user asks to "review with Codex", "Codex code review", or "ask Codex to check my code".

Lykhoyda/ask-llm · 60 tokens