performance-optimization

performance-optimization is a skill for Claude Code from loiane/specs-driven-development-spring-angular. It costs 89 tokens per session (2,614 once invoked), scanned A, original, MIT.

A measurement-first guide to improving the performance of Spring Boot 4 and Java applications. It covers ways to collect evidence about CPU use, memory, database queries, response times, and throughput before changing code.

In plain words
What is it for?
Use it when investigating slow endpoints, database queries, memory or garbage-collection issues, connection-pool sizing, caching, or virtual-thread problems.
Why use it?
It helps distinguish a measured performance problem from a guess and gives each optimization a clear target and way to verify the result.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it when investigating slow endpoints, database queries, memory or garbage-collection issues, connection-pool sizing, caching, or virtual-thread problems.

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

Made for: Claude Code.

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/loiane/specs-driven-development-spring-angular/performance-optimization/github.svg)](https://agentmods.dev/skills/loiane/specs-driven-development-spring-angular/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/loiane/specs-driven-development-spring-angular/performance-optimization"><img src="https://agentmods.dev/badge/skills/loiane/specs-driven-development-spring-angular/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/loiane/specs-driven-development-spring-angular/performance-optimization"><img src="https://agentmods.dev/badge/skills/loiane/specs-driven-development-spring-angular/performance-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,614 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.
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.00089 $0.02614
Opus 5.5 $0.00036 $0.01046
Sonnet 5.5 $0.00018 $0.00523
Haiku 4.5 $0.00009 $0.00261

Measured 1mo ago against content hash 06b7478c0468, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

.claude/skills/performance-optimization/SKILL.md · 164 lines

How it starts

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

Performance optimization (Spring Boot 4 / JVM)

Rule zero: measure first

No optimization without a profile or a benchmark. "It feels slow" is a hypothesis, not a finding.

If a PR labeled perf lands without a profile artifact, a JMH result, a flame graph, or a before/after metric screenshot, request changes. The artifact path goes in the PR description and in 05-implementation-log.md.

Acceptable evidence:

  • async-profiler flame graph (CPU or alloc) saved as SVG/HTML.
  • JDK Flight Recorder recording (.jfr) with the relevant view captured.
  • JMH benchmark output (*.json from -rf json) with before/after.
  • Micrometer histogram screenshots (p50/p95/p99) from before and after.
  • Database EXPLAIN ANALYZE output for the query in question.

SLO-first, not optimization-first

Every perf claim is tied to a Service Level Objective. If there is no stated SLO, the work has no exit criterion — write the SLO first.

Template (the user fills the blanks; never invent the numbers):

Endpoint:        <method> <path>
p50 latency:     ___ ms   (current: ___ ms)
p95 latency:     ___ ms   (current: ___ ms)
p99 latency:     ___ ms   (current: ___ ms)
Throughput:      ___ rps  (current: ___ rps)
Error budget:    ___ %    (window: ___ )
Measurement:     <Micrometer metric name + dashboard link>

If the user has not committed to numbers, file a Q-NNN in 01-spec.md or 03-design.md and halt.

Tools

Tool Use for Notes
async-profiler CPU and allocation flame graphs in production-like envs -e cpu or -e alloc; safe in prod (sample-based)
JFR + JDK Mission Control Always-on low-overhead recording; method profiling, allocation, GC, locks Enable with -XX:StartFlightRecording=...
JMH Microbenchmarks for hot loops, parsers, serialization, comparator/equality changes Fork ≥ 2, warmup ≥ 5, measure ≥ 5; run on the deploy hardware class
Micrometer + Spring Boot Actuator Production metrics (latency histograms, throughput, error rate) Use Timer with publishPercentileHistogram(true); not Counter for latency
EXPLAIN ANALYZE Real query plan with row counts, buffers, timing PostgreSQL: EXPLAIN (ANALYZE, BUFFERS, VERBOSE) ...
-Djdk.tracePinnedThreads=full Detect virtual-thread pinning during dev/test Enable in test profiles when investigating throughput regressions
-Xlog:gc* or JFR GC events GC pause analysis Look at p99 pause, not average

Read the full file on GitHub · 164 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. 1mo ago First seen · 164 lines · 89 tokens per session scan A 06b7478c0468

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository loiane/specs-driven-development-spring-angular (62 stars, last pushed 3d ago), licensed MIT. It adds 89 tokens to every session and 2,614 once invoked, about $0.0004 per session on Opus 5.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-30.

Related

Other skills, from other repositories

spk-admin-setup-doctor

Install, verify, and repair Spec Kitty commands, skills, agent paths, runtime prerequisites, and common setup failures.

Priivacy-ai/spec-kitty · 31 tokens

spk-run-blocked-recovery

Recover from Spec Kitty blocked runtime states, missing artifacts, failed guards, stale worktrees, and decision-required loops.

Priivacy-ai/spec-kitty · 31 tokens

github-issue-manager

Classifies a user request as Bug, Compatibility, Feature, Question, or Task for the explyt/spring-plugin GitHub repo, lightly researches the relevant codebase, searches similar existing issues, and either reports an existing issue or creates a correctly titled, typed, and labeled one following the repository issue…

explyt/spring-plugin · 100 tokens

develop-gutter-navigation-feature

End-to-end workflow for adding or repairing a navigation gutter / line marker in the explyt/spring-plugin repository: the two independent provider entry points, the lazy-targets contract of NavigationGutterIconBuilder, module resolution and search scope for library PSI, honest empty-state wording, target renderers for…

explyt/spring-plugin · 142 tokens

github-bugs-triage

Triages the open bug queue of the explyt/spring-plugin GitHub repository: fetches the oldest open issues of type Bug plus compatibility reports, refines titles, suggests labels, missing issue types and priorities with evidence, detects duplicates, and writes a structured triage table. Use when asked to triage…

explyt/spring-plugin · 84 tokens

022-root-cause-analysis

Use when a framed problem needs root-cause investigation rather than a symptom-level fix, applying Five Whys, Fishbone (Ishikawa), Current Reality Tree, and constraint identification. This should trigger when an issue's Root Cause Analysis point of view needs evaluation, or when a maintainer directly asks to find the…

jabrena/plinth · 85 tokens