performance-optimization

performance-optimization is a skill for Claude Code, Codex from monkilabs/opencastle. It costs 52 tokens per session (362 once invoked), scanned A, original, MIT.

A guide for measuring and improving application speed, resource use, and web performance metrics such as LCP, CLS, and INP. These metrics describe loading speed, layout movement, and response to user actions.

In plain words
What is it for?
Use it to profile Node.js and React code, reduce bundles and payloads, add caching, optimize assets, and check Lighthouse or CI performance regressions.
Why use it?
It helps locate the actual cause of slow pages or services before changes are made and verifies that the fix improves the measured problem.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to profile Node.js and React code, reduce bundles and payloads, add caching, optimize assets, and check Lighthouse or CI performance regressions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/monkilabs/opencastle/performance-optimization
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 monkilabs/opencastle --skill performance-optimization
Clone the repo
git clone --depth 1 https://github.com/monkilabs/opencastle

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/monkilabs/opencastle/performance-optimization/github.svg)](https://agentmods.dev/skills/monkilabs/opencastle/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/monkilabs/opencastle/performance-optimization"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/performance-optimization/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-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/monkilabs/opencastle/performance-optimization"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/performance-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00052 $0.00362
Opus 5 $0.00026 $0.00181
Sonnet 5 $0.00010 $0.00072
Haiku 4.5 $0.00005 $0.00036

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

Security

Grade A, and why

performance-optimization 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 6d 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.

src/orchestrator/skills/performance-optimization/SKILL.md · 24 lines

What it actually says

Performance Optimization

Measure before changing anything. Add React.memo/useMemo/useCallback only after a profile shows the cost — never speculatively. Set budgets (load time, memory, API latency) and enforce them in CI.

Rules

  • Node: async APIs only — never readFileSync or other sync I/O on a request path.
  • Debounce input-driven fetches at 300 ms.
  • INP replaced FID as a Core Web Vital in March 2024: budget it at ≤200 ms, and measure every interaction, not just the first.
  • Profile Node with clinic.js or node --inspect; profile React with <Profiler onRender> or the DevTools Profiler.

Profiling Workflow

  1. Lighthouse (or the CI perf job) for a baseline; name the failing metric (LCP/CLS/INP/TTI). Lighthouse emulates mobile by default; pass --preset=desktop when the regression is desktop-only.
  2. Profile to locate the hotspot call stacks / long tasks.
  3. Apply the minimal fix (code-split, memoize, shrink payloads, defer non-critical work); confirm in the profiler that the measured hotspot actually shrank.
  4. Re-run Lighthouse / the CI perf job. Ship only at ≥10% improvement or once inside budget.
  5. If the regression persists, iterate and record a rollback plan; note fixes in the changelog.
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. 6d ago First seen · 24 lines · 52 tokens per session scan A 495dbbdaaee6

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository monkilabs/opencastle (61 stars, last pushed 12d ago), licensed MIT. It adds 52 tokens to every session and 362 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

codegen-html

Scaffold and iterate on standalone Preact + HTM applications with zero build dependencies.

initializ/forge · 20 tokens

codegen-react

Scaffold and iterate on Vite + React applications.

initializ/forge · 14 tokens

product-architect

Complete product development system with 80 agents and 36 frameworks. Use when the user wants to build a product, write a PRD, plan an MVP or roadmap, design an app, research a market or check whether a feature already exists or is novel, do competitive analysis, run a security audit, build a financial model, plan…

ankitjha67/product-architect · 253 tokens

orchardcore-blazor

Skill for building Blazor CMS applications with Orchard Core. Covers Blazor SSR and Server Interactive rendering, Razor class library structure, Blazor component architecture (App, Layout, NavMenu, Router), content integration with IContentHandleManager, dependency injection in Blazor pages, loading CMS content in…

CrestApps/CrestApps.AgentSkills · 186 tokens

orchardcore-decoupled-cms

Skill for building decoupled CMS applications with Orchard Core. Covers headless CMS architecture, content API consumption, custom Razor Pages for content rendering, loading content by ID, alias, and handle, auto-generating aliases with Liquid patterns, preview feature integration, and content property access…

CrestApps/CrestApps.AgentSkills · 202 tokens

orchardcore-asset-manager

Skill for building, watching, hosting, and copying frontend assets in Orchard Core 3.0 with the Assets Manager. Covers Assets.json actions, Concurrently, Parcel, Vite, Webpack, Yarn workspace setup, migration from Gulp, common commands, package dependencies, and troubleshooting. Use this skill for framework-only…

CrestApps/CrestApps.AgentSkills · 94 tokens