Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Allocation Profiling

ASecurity

Attribute Java heap allocation to code and validate reductions in bytes per operation. Use when allocation or GC frequency regresses, JFR allocation events are empty or disagree with counters, large buffers trigger G1 humongous collections or ZGC stalls, or pooling, TLAB tuning, or assumed JIT elimination is proposed without measurements. Covers sampling semantics and allocation-specific triage; general capture selection belongs to jfr-and-async-profiler, retention diagnosis to heap-dump-anal...

2 stars
0 votes
0 copies
0 views
Added 9/19/2026
developmentgojavaperformance

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add robsonkades/agent-skills --skill allocation-profiling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Allocation Profiling?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Allocation Profiling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/robsonkades-allocation-profiling/badge)](https://www.skillsdirectory.com/skills/robsonkades-allocation-profiling)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: allocation-profiling
description: >
  Attribute Java heap allocation to code and validate reductions in bytes per operation.
  Use when allocation or GC frequency regresses, JFR allocation events are empty or disagree
  with counters, large buffers trigger G1 humongous collections or ZGC stalls, or pooling,
  TLAB tuning, or assumed JIT elimination is proposed without measurements. Covers sampling
  semantics and allocation-specific triage; general capture selection belongs to
  jfr-and-async-profiler, retention diagnosis to heap-dump-analysis, and scalar replacement
  mechanisms to jit-inlining-and-escape-analysis.
---

# Allocation Profiling

Find which code produces heap bytes, decide whether those bytes are avoidable, and test
whether reducing them improves the reported problem. Allocation is neither retained heap
nor GC cost. A large allocation site is a candidate, not automatically the cause of latency.

The reference baseline is OpenJDK 25 GA and async-profiler 4.1, not a minimum target
version. Before version-sensitive advice, inspect Maven/Gradle release and toolchain
settings, resolved logging/profiler dependencies, CI/runtime images and actual JVM flags.
Keep the project's Java and dependency versions; using this skill does not authorize
upgrades or enabling preview/experimental features. HotSpot-specific events and flags
are not portable Java guarantees.

## Workflow

1. **Define the comparison.** Record the JDK build, collector, heap and relevant flags,
   profiler version, workload/payload mix, concurrency, warm-up state, affected time window,
   and target metric. Reuse the existing handoff, project evidence and artifacts before asking
   for missing facts that change the tool or decision. With source alone, provide a hypothesis
   and collection plan; do not invent a rate or confirmed fix.
2. **Establish the rate and denominator.** Prefer existing counters or a recording from the
   affected window. Report bytes/s and bytes/completed operation when that denominator is
   meaningful; account for background work and failed requests. Compare like workloads.
   GC-log Eden consumption is only an estimate of young allocation and can miss direct-old
   allocation. Read [allocation tools](references/allocation-tools.md) before collecting or
   interpreting events, counters, empty profiles, or virtual-thread data.
3. **Attribute bytes under representative load.** Use weighted allocation stacks to rank
   sites, preserving the sample population, interval/throttle, filters and window. Verify
   events and stacks are present and the target path ran. Reconcile totals with independent
   counters where available. A missing site may be undersampled or filtered; it does not
   prove that the JIT eliminated it. First-instrument and general capture planning belong
   to `jfr-and-async-profiler`.
4. **Test the connection to the symptom.** Separate allocation churn from survival and
   retention. Neither a live-allocation profile nor an old-object sample measures promotion
   rate. Correlate latency windows with GC/stall timelines; coincidence supports a hypothesis,
   not exclusive causality. Read [collector symptoms](references/symptoms-and-collector-behaviour.md)
   for humongous allocation, stalls, TLAB attribution, or conflicting measurements. Route
   retention/root questions to `heap-dump-analysis`.
5. **Decide whether to intervene.** Keep the current implementation when it meets the stated
   goal and extra work has no justified payoff; attribution alone may answer the request.
   For a candidate change, state the site, estimated contribution, mechanism and expected
   effect. Read [reducing allocation](references/reducing-allocation.md) before
   proposing code, reuse or flags. Preserve behavior; a semantic shortcut is not an
   allocation fix. Use `jit-inlining-and-escape-analysis` when the decision needs C2
   inlining or scalar-replacement analysis.
6. **Validate both bytes and outcome.** Repeat a matched workload in the affected lifecycle
   phase with comparable instrumentation: warm it for steady-state claims, but retain cold
   start or ramp allocation when that is the goal. Compare site bytes, total bytes/op,
   throughput, CPU, retained heap and the original latency/GC metric. Repeat enough to
   distinguish the effect from variation.
   A smaller percentage alone is insufficient, and moving bytes to another site is not a
   reduction. JMH `-prof gc` can test an isolated mechanism; it does not establish a service
   latency improvement. Report inconclusive results and the next discriminating measurement.

## Minimum result

For each actionable finding, give the evidence artifact/window and measurement semantics,
the observation, the hypothesis and why it remains uncertain, the proposed adjustment,
and the measurement that would confirm or refute it. A short paragraph or table row is
enough. State separately what was executed and what remains a plan; do not label a
source-based prediction as a measured result.
An attribution-only or no-change result should state what was established, its limits and
what new evidence would justify further work; it need not invent an intervention.

## Capture constraints

Reuse suitable existing counters or recordings first. If a new capture is needed, choose a
representative target and an explicit CPU/latency/disk budget; shorten or stop it if that
budget is exceeded. During live degradation, preserve accessible evidence within the existing
recovery authority and deadline; do not delay authorized mitigation for a complete profile.
Recording defaults are not proof that an event is enabled in an existing capture.
Do not bypass attach/container controls
when collection fails; report the error and use an available recording or a controlled
reproduction. Profiles may expose class, method and thread names and other JFR context;
store and retain them according to the service's telemetry policy.

When reviewing this skill or practicing its ambiguous decisions, use
[validation cases](references/validation-cases.md). These are behavioral evaluation inputs,
not evidence that the skill has already improved an agent's performance.

Attribution

robsonkadesrobsonkades
View sourceMore from robsonkades →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

281612 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2132 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →