Caffeine Cache Optimization Experiments
ben-manes/caffeine
Runs controlled JMH experiments on the Caffeine cache to find shared contention and hot-path waste, then reviews correctness and returns a reviewable patch.
How to identify and fix Java memory leaks in Android Chrome using LeakCanary traces.
$ npx skills add nwjs/chromium.src --skill java-memory-leaks -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nwjs/chromium.src java-memory-leaks --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/java-memory-leaks .claude/skills/java-memory-leaks && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "java-memory-leaks" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/java-memory-leaks into .claude/skills/java-memory-leaks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "java-memory-leaks", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nwjs/chromium.src/tree/main/agents/skills/java-memory-leaksType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nwjs/chromium.src --skill java-memory-leaks -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nwjs/chromium.src java-memory-leaks --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/skills/java-memory-leaks .agents/skills/java-memory-leaks && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "java-memory-leaks" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/java-memory-leaks into .agents/skills/java-memory-leaks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "java-memory-leaks", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nwjs/chromium.src --skill java-memory-leaks -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nwjs/chromium.src java-memory-leaks --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/skills/java-memory-leaks .cursor/skills/java-memory-leaks && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "java-memory-leaks" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/java-memory-leaks into .cursor/skills/java-memory-leaks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "java-memory-leaks", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nwjs/chromium.src.git --path agents/skills/java-memory-leaks--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nwjs/chromium.src --skill java-memory-leaks -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nwjs/chromium.src java-memory-leaks --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/skills/java-memory-leaks .gemini/skills/java-memory-leaks && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "java-memory-leaks" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/java-memory-leaks into .gemini/skills/java-memory-leaks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "java-memory-leaks", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nwjs/chromium.src java-memory-leaksInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nwjs/chromium.src --skill java-memory-leaks -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/skills/java-memory-leaks .github/skills/java-memory-leaks && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "java-memory-leaks" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/java-memory-leaks into .github/skills/java-memory-leaks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "java-memory-leaks", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nwjs/chromium.src --skill java-memory-leaks -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nwjs/chromium.src java-memory-leaks --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/skills/java-memory-leaks .opencode/skills/java-memory-leaks && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "java-memory-leaks" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/java-memory-leaks into .opencode/skills/java-memory-leaks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "java-memory-leaks", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
java-memory-leaksHow to identify and fix Java memory leaks in Android Chrome using LeakCanary traces.
Java Memory Leaks is an agent skill from nwjs/chromium.src. How to identify and fix Java memory leaks in Android Chrome using LeakCanary traces.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.
It sits in Development, covering Performance optimization. It works with Java and Android. The repository describes itself as: Chromium codebase with NW.js modifications. Based on https://chromium.googlesource.com/chromium/src.git. The licence is BSD-3-Clause.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit a9e8946. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are java).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Java Memory Leaks loads about 1.4k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 536 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nwjs/chromium.src at commit a9e8946, republished under its BSD-3-Clause licence (© nwjs). 536 words, ~1,364 tokens.
.claude/skills/java-memory-leaks/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.This skill guides the process of identifying, debugging, and fixing Java memory leaks in Android Chrome, typically identified by LeakCanary in instrumentation tests.
Confirm the Leak:
@Batch, it may be
necessary to run the whole test class to reproduce the leak.--enable-leak-checks to the test runner if the class
lacks @EnableLeakChecks.Analyze Leak Trace:
Leaking: YES).Leaking: UNKNOWN nodes in between to find where the chain should
be broken.Identify the Break Point:
destroy() on components that hold resources or
observers.Apply Fix Patterns:
removeObserver() is called in onDestroy() or equivalent lifecycle
teardown.DestroyObserver, consider making it one and
registering it with ActivityLifecycleDispatcher.onDestroy().@Nullable and add explicit
null checks where needed. This is safer and satisfies NullAway without
suppressions.@Nullable causes too
much "collateral damage" (requiring null checks in many places), you can
use @SuppressWarnings("NullAway") on the onDestroy() method to set
the field to null while keeping it non-null for the rest of the
lifecycle.private @Nullable CustomTabActivityTabProvider mTabProvider;
@Override
public void onDestroy() {
mTabProvider = null; // Breaks leak trace
}removeTab()), ensure
this is done by the owner of the component, not by an observer or
registrar. Observers should not have side effects that mutate the
observed object during teardown.Verify:
autoninja -C out/Debug chrome_public_test_apk.out/Debug/bin/run_chrome_public_test_apk --enable-leak-checks -f "YourLeakTest*".Cq-Include-Trybots: luci.chromium.try:android-16-x64-leakcanary-relonDestroy() can cause
NullPointerExceptions if other components try to use them during their own
destruction (e.g., to unregister observers). Ensure that cleanup methods like
unregisterObserver handle null references gracefully.public void unregisterActivityTabObserver(CustomTabTabObserver observer) {
mActivityTabObservers.removeObserver(observer);
if (mTabProvider == null) return; // Guard against NPE during destruction
Tab activeTab = mTabProvider.getTab();
...
}Before:
public class MyComponent implements DestroyObserver {
private final LongLivedProvider mProvider; // Retains activity
public MyComponent(LongLivedProvider provider) {
mProvider = provider;
}
@Override
public void onDestroy() {
// Provider still holds reference to this component, leaking activity
}
}After (Preferred):
public class MyComponent implements DestroyObserver {
private @Nullable LongLivedProvider mProvider;
public MyComponent(LongLivedProvider provider) {
mProvider = provider;
}
@Override
public void onDestroy() {
if (mProvider != null) {
mProvider.removeObserver(this); // If applicable
mProvider = null; // Break the leak chain
}
}
}© nwjs, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in agents/skills/java-memory-leaks of nwjs/chromium.src.
Open the folder on GitHubat commit a9e8946
Java Memory Leaks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Java Memory Leaks this skillnwjs/chromium.src | 160 | — | ~1.4k | Automated safety check: Pass | BSD-3-Clause | |
| Caffeine Cache Optimization Experimentsben-manes/caffeine | 18k | — | ~2.6k | Automated safety check: Notes | Apache-2.0 | |
| Android Code Quality Checkerwordpress-mobile/WordPress-Android | 3.2k | — | ~587 | Automated safety check: Pass | GPL-2.0 | |
| Caffeine Performance Auditben-manes/caffeine | 18k | — | ~559 | Automated safety check: Pass | Apache-2.0 | |
| Groovy 5 Developer Guideapache/grails-core | 2.9k | — | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Climber Step Minimizationben-manes/caffeine | 18k | — | ~3k | Automated safety check: Notes | Apache-2.0 |
ben-manes/caffeine
Runs controlled JMH experiments on the Caffeine cache to find shared contention and hot-path waste, then reviews correctness and returns a reviewable patch.
wordpress-mobile/WordPress-Android
Runs detekt, checkstyle, and Android lint together, reads their reports, and proposes approved fixes grouped by file.
ben-manes/caffeine
Audits the Caffeine cache source for hot-path costs such as allocations, contention and memory layout, reporting only findings tied to specific lines.
apache/grails-core
Guidance for Groovy 5 work in Grails projects: syntax, closures, traits, DSLs, metaprogramming, Spock tests, static compilation and Java 21 integration.
ben-manes/caffeine
Prices each step of the window climber algorithm by disabling it in turn, to find steps that no longer earn their keep and branches that no longer fire.
BrowserWorks/waterfox-android
Run Firefox performance tests locally or in CI. An agent skill from BrowserWorks/waterfox-android.
nwjs/chromium.src
Extracts raw trace data from Perfetto traces, runs arbitrary SQL queries for custom follow-up analysis, and applies expert cognitive principles (Tiered Flow Analysis, Semantic Mismatch, Redundancy)…
nwjs/chromium.src
Autonomous multi-agent performance optimization loop for Chromium and V8.
nwjs/chromium.src
Automated Tracing & Performance Telemetry in Chromium using Perfetto and Telemetry benchmarks.
nwjs/chromium.src
Queries Chrome commit, version, release, and milestone metadata.
nwjs/chromium.src
Search and reference Chromium documentation from the local docs index, including design docs, APIs, and development guides.
nwjs/chromium.src
Diagnose Chromium GN dependency and include-visibility failures, including BUILD.gn deps/publicdeps, DEPS include rules, private headers, and circular dependencies.
Categories
How to identify and fix Java memory leaks in Android Chrome using LeakCanary traces. src. How to identify and fix Java memory leaks in Android Chrome using LeakCanary traces.
Java Memory Leaks fits situations like: tasks that involve Performance optimization.
Run `npx skills add nwjs/chromium.src --skill java-memory-leaks -a claude-code`. Or copy the skill folder (agents/skills/java-memory-leaks in nwjs/chromium.src) into .claude/skills/java-memory-leaks in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nwjs/chromium.src --skill java-memory-leaks -a codex`. Or copy the skill folder (agents/skills/java-memory-leaks in nwjs/chromium.src) into .agents/skills/java-memory-leaks in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nwjs/chromium.src --skill java-memory-leaks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/java-memory-leaks, .gemini/skills/java-memory-leaks, .github/skills/java-memory-leaks and .opencode/skills/java-memory-leaks in your project.
SKILL.md names no scripts, command-line tools or credentials: Java Memory Leaks is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Java Memory Leaks is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Java Memory Leaks: Caffeine Cache Optimization Experiments (ben-manes/caffeine, 18k stars), Android Code Quality Checker (wordpress-mobile/WordPress-Android, 3.2k stars), Caffeine Performance Audit (ben-manes/caffeine, 18k stars) and Groovy 5 Developer Guide (apache/grails-core, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nwjs (a GitHub organization) maintains it in nwjs/chromium.src, which has 160 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 3, 2026.
Source: nwjs/chromium.src on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.