Agent skill

Benchmark

by androidx in androidx/androidx

Benchmarking and improving the performance of Jetpack Compose.

Apache-2.0Auto-check passedMobile

Install Benchmark

skills CLI
$ npx skills add androidx/androidx --skill benchmark -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install androidx/androidx benchmark --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/androidx/androidx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/benchmark .claude/skills/benchmark && rm -rf skills-src

Use ~/.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/

Facts

Skill name
benchmark
GitHub stars
6.1k
Token cost
~1.1k tokens
SKILL.md length
391 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

Benchmarking and improving the performance of Jetpack Compose.

  • Requested to run
  • SKILL.md covers Core Principles, Microbenchmarks and Macrobenchmarks
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Create microbenchmarks and macrobenchmarks for Compose components

What it does

Benchmark is an agent skill from androidx/androidx. Benchmarking and improving the performance of Jetpack Compose. Use this skill when requested to run, analyze, or create microbenchmarks and macrobenchmarks for Compose components or features.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Android development. It works with Jetpack Compose and Android. The repository describes itself as: Development environment for Android Jetpack extension libraries under the androidx namespace. Synchronized with Android Jetpack's primary development branch on AOSP. The licence is Apache-2.0.

When your agent uses it

  • Requested to run
  • Create microbenchmarks and macrobenchmarks for Compose components

Example prompts

  • “/benchmark”

What it can do on your machine

Read from SKILL.md and the folder at commit 6069429. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Benchmark loads about 1.1k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 391 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from androidx/androidx at commit 6069429, republished under its Apache-2.0 licence (© androidx). 391 words, ~1,090 tokens.

Download SKILL.mdSave it as .claude/skills/benchmark/SKILL.md (or your agent's skills folder).
name
benchmark
description
Benchmarking and improving the performance of Jetpack Compose. Use this skill when requested to run, analyze, or create microbenchmarks and macrobenchmarks for Compose components or features.

Overview

This skill focuses on benchmarking and improving the performance of Compose.

Core Principles

  • Prefer Existing Benchmarks: Focus mostly on running existing benchmarks. ONLY add new ones if the requested scenario is not tested or when explicitly requested.
  • Address Flakiness: Some benchmarks are flaky. If results are uncertain, run the same benchmark multiple times.
    • 1-2% variation is normal.
    • 10% variation implies a broken benchmark that cannot be trusted.
  • Hardware Requirement: Always use a real device for microbenchmarks. DO NOT use an emulator as it is not representative.

Microbenchmarks

Microbenchmarks measure fine-grained performance (e.g., individual component measure/layout).

Location & Execution
  • Location: <module-name>/benchmark (e.g., compose/ui/ui/benchmark).
  • Command: Run as an Android test (e.g., :compose:ui:ui-benchmark:connectedReleaseAndroidTest).
  • Filter Tests: Use -Pandroid.testInstrumentationRunnerArguments.tests_regex to run specific tests. This is especially useful for parameterized tests where class#method filtering might not work as expected.
    • Example: ./gradlew :compose:ui:ui-benchmark:connectedReleaseAndroidTest -Pandroid.testInstrumentationRunnerArguments.tests_regex=.*MyBenchmark.myMethod.*
    • Validation: Always verify the console output to ensure only the intended number of tests were executed (e.g., Finished 1 tests). If more tests ran than expected, refine your regex.
  • Preparation:
    1. Run ./benchmark/gradle-plugin/src/main/resources/scripts/disableJit.sh to stabilize the platform.
    2. Run ./benchmark/gradle-plugin/src/main/resources/scripts/lockClocks.sh. Make sure it is run /after/ disabling JIT.
  • Errors: Do NOT suppress configuration errors; they guide proper device setup.
Analysis
  • Output Path: ../../out/androidx/compose/<folder>/benchmark/build/outputs/connected_android_test_additional_output/
  • Files:
    • .txt: Short summary.
    • .json: Full data for analysis.
    • .perfetto_trace: Detailed trace.
  • Method Tracing: The trace includes every method executed. Note that method tracing adds overhead and significantly affects timing accuracy, but it is invaluable for verifying which codepaths were executed.
  • Tooling: Use ~/trace_processor to analyze traces.
Show full SKILL.md (149 more words)Show less
After benchmark
  • Cleanup: Reset device with ./benchmark/gradle-plugin/src/main/resources/scripts/resetDevice.sh

Macrobenchmarks

Macrobenchmarks measure high-level interactions (startup, scrolling) using UI Automator on a real application.

Location
  • Standard: compose/integration-tests/macrobenchmark (Target app: macrobenchmark-target).
  • Hero Benchmarks: compose/integration-tests/hero (More representative of real-world apps).
Execution & Metrics
  • Command: Run with connectedReleaseAndroidTest.
  • Filter Tests: Use -Pandroid.testInstrumentationRunnerArguments.tests_regex to run specific tests. This is especially useful for parameterized tests where class#method filtering might not work as expected.
    • Example: ./gradlew :compose:ui:ui-benchmark:connectedReleaseAndroidTest -Pandroid.testInstrumentationRunnerArguments.tests_regex=.*MyBenchmark.myMethod.*
    • Validation: Always verify the console output to ensure only the intended number of tests were executed (e.g., Finished 1 tests). If more tests ran than expected, refine your regex.
  • Metrics:
    • Startup: timeToInitialDisplayMs, timeToFullDisplayMs.
    • Scroll: Frame duration and frame overrun.
  • Output Path: ../../out/androidx/compose/<folder>/build/outputs/connected_android_test_additional_output/
Analysis & Optimization
  • Traces: These traces do not have method traces by design. They contain hand-annotated spans for recompose, measure, and layout.
  • Tooling: Use ~/trace_processor.
  • Custom Tracing: Add temporary trace blocks to investigate specific codepaths:
    kotlin
    trace("name") {
        // target code block
    }

© androidx, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/benchmark of androidx/androidx.

Open the folder on GitHubat commit 6069429

Compare with similar skills

Benchmark 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.

Benchmark compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Benchmark this skillandroidx/androidx6.1k—~1.1kAutomated safety check: PassApache-2.0
Compose Multiplatform Patternsmonta-app/ocpp-emulator1795 repos~2kAutomated safety check: PassApache-2.0
Android Developmentdpconde/claude-android-skill336—~1.7kAutomated safety check: PassMIT
Stylesarindamxd/camerax-android1324 repos~2.3kAutomated safety check: PassApache-2.0
Mobile Android Designopenvetta/open-vetta2903 repos~950Automated safety check: PassApache-2.0
Generating Baseline ProfilesrosuH/EasyWatermark1.9k1 repos~5kAutomated safety check: PassApache-2.0

Similar skills

  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    179 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Android Development

    dpconde/claude-android-skill

    Create production-quality Android applications following Google's official architecture guidance and NowInAndroid best practices.

    336 GitHub stars~1.7k tokensUpdated 10 mo ago
    MobileAuto-check passed
  • Styles

    arindamxd/camerax-android

    A skill your agent uses to integrate the Jetpack Compose Styles API into an Android project.

    132 GitHub starsUsed in 4 repos~2.3k tokens
    MobileAuto-check passed
  • Mobile Android Design

    openvetta/open-vetta

    Master Material Design 3 and Jetpack Compose patterns for building native Android apps.

    290 GitHub starsUsed in 3 repos~950 tokens
    MobileAuto-check passed
  • Generating Baseline Profiles

    rosuH/EasyWatermark

    A skill your agent uses to generate and measure Jetpack Compose Baseline Profiles end-to-end with the AGP 8.2+ Baseline Profile Generator module and the Macrobenchmark harness.

    1.9k GitHub starsUsed in 1 repo~5k tokens
    MobileAuto-check passed
  • Jetpack Compose Audit

    hamen/compose_skill

    Audit Android Jetpack Compose repositories for performance, animation phase correctness, state management, side effects, composable API quality, and adjacent Android launch UX resource risks such as…

    373 GitHub stars~6k tokensUpdated 2 mo ago
    MobileAuto-check: notes

More from androidx/androidx

  • Find My Flags

    androidx/androidx

    A skill your agent uses to find Compose feature flags introduced by a specific git user or email and map them to the library version in which they were added.

    6.1k GitHub stars~664 tokensUpdated today
    Auto-check passed
  • Remove Feature Flag

    androidx/androidx

    A skill your agent uses to remove a feature flag when the flag is no longer needed and its current state must be made permanent.

    6.1k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Webkit API Development

    androidx/androidx

    Step-by-step guide for implementing AndroidX WebKit APIs in frameworks/support/webkit/ after boundary interface roll.

    6.1k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Compose Catalog

    androidx/androidx

    Build, install, and run the Compose Material Catalog application on connected devices or emulators.

    6.1k GitHub stars~499 tokensUpdated today
    Auto-check passed
  • Health Connect

    androidx/androidx

    Comprehensive guide for Health Connect Jetpack SDK development.

    6.1k GitHub stars~1k tokensUpdated today
    Auto-check passed

Categories

Questions about Benchmark

What does Benchmark do?

Benchmarking and improving the performance of Jetpack Compose. Benchmark is an agent skill from androidx/androidx. Benchmarking and improving the performance of Jetpack Compose.

When should I use Benchmark?

Benchmark fits situations like: requested to run; create microbenchmarks and macrobenchmarks for Compose components.

How do I install Benchmark in Claude Code?

Run `npx skills add androidx/androidx --skill benchmark -a claude-code`. Or copy the skill folder (.agents/skills/benchmark in androidx/androidx) into .claude/skills/benchmark in your project. Claude Code loads it when a task matches its description.

How do I install Benchmark in Codex?

Run `npx skills add androidx/androidx --skill benchmark -a codex`. Or copy the skill folder (.agents/skills/benchmark in androidx/androidx) into .agents/skills/benchmark in your project. Codex loads it when a task matches its description.

Can I use Benchmark in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add androidx/androidx --skill benchmark -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/benchmark, .gemini/skills/benchmark, .github/skills/benchmark and .opencode/skills/benchmark in your project.

What does Benchmark need to run?

SKILL.md names no scripts, command-line tools or credentials: Benchmark is instructions for the agent only.

Does Benchmark access the network?

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.

Is Benchmark safe to install?

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.

What licence does Benchmark use?

Benchmark is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Benchmark use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Benchmark?

Skills that share tags, products or a category with Benchmark: Compose Multiplatform Patterns (monta-app/ocpp-emulator, 179 stars), Android Development (dpconde/claude-android-skill, 336 stars), Styles (arindamxd/camerax-android, 132 stars) and Mobile Android Design (openvetta/open-vetta, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Benchmark?

androidx (a GitHub organization) maintains it in androidx/androidx, which has 6,107 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 7, 2026.

Source: androidx/androidx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.