Agent skill

Test Metro Locally

by ZacSweers in ZacSweers/metro

Publish the current Metro checkout to Maven Local and verify it in an external consumer or reproducer.

Apache-2.0Auto-check passedMobile

Install Test Metro Locally

skills CLI
$ npx skills add ZacSweers/metro --skill test-metro-locally -a claude-code

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

GitHub CLI
$ gh skill install ZacSweers/metro test-metro-locally --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/ZacSweers/metro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/test-metro-locally .claude/skills/test-metro-locally && 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
test-metro-locally
GitHub stars
1.4k
Token cost
~1.2k tokens
SKILL.md length
557 words
Files
2
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

Publish the current Metro checkout to Maven Local and verify it in an external consumer or reproducer.

  • Works in 4 steps: Read AGENTS.md in Metro and the… → Record Metro's current commit and… → Locate the downstream project's Metro… → …
  • Testing an unreleased Metro compiler
  • SKILL.md covers Verify the baseline, Publish a unique local version, Point the consumer at Maven… and Run the same downstream check, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Test Metro Locally is an agent skill from ZacSweers/metro. Publish the current Metro checkout to Maven Local and verify it in an external consumer or reproducer. Use when testing an unreleased Metro compiler or Gradle plugin change downstream, validating a GitHub issue reproduction, comparing released and local behavior, or when a task mentions metrow publish --local, Maven Local, or local Metro artifacts.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Mobile. It works with Gradle and GitHub. The repository describes itself as: A multiplatform, compile-time dependency injection framework for Kotlin. The licence is Apache-2.0.

When your agent uses it

  • Testing an unreleased Metro compiler
  • Gradle plugin change downstream
  • Validating a GitHub issue reproduction
  • Comparing released and local behavior

Example prompts

  • “/test-metro-locally”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read AGENTS.md in Metro and the downstream project when present.
  2. Record Metro's current commit and worktree state.
  3. Locate the downstream project's Metro version source, plugin repositories, dependency repositories, relevant compiler options, and exact…
  4. Run that task against its current released Metro version before editing the consumer. Capture the exact failure. If the baseline does not…

What it can do on your machine

Read from SKILL.md and the folder at commit ba2f45f. 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 bash).

    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

Test Metro Locally loads about 1.2k tokens when it runs. Until then it costs about 93 tokens; SKILL.md has 557 words of instructions outside code blocks.

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

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 ZacSweers/metro at commit ba2f45f, republished under its Apache-2.0 licence (© ZacSweers). 557 words, ~1,197 tokens.

Download SKILL.mdSave it as .claude/skills/test-metro-locally/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
test-metro-locally
description
Publish the current Metro checkout to Maven Local and verify it in an external consumer or reproducer. Use when testing an unreleased Metro compiler or Gradle plugin change downstream, validating a GitHub issue reproduction, comparing released and local behavior, or when a task mentions `metrow publish --local`, Maven Local, or local Metro artifacts.

Test Metro Locally

Use the downstream project's existing assertion and Gradle task as the source of truth. Keep repro-only edits outside the Metro worktree when practical.

Run publication and test commands only when the user explicitly requests downstream or Maven Local verification; otherwise present the plan and wait for approval as required by Metro's repository instructions.

Verify the baseline

  1. Read AGENTS.md in Metro and the downstream project when present.
  2. Record Metro's current commit and worktree state.
  3. Locate the downstream project's Metro version source, plugin repositories, dependency repositories, relevant compiler options, and exact verification task.
  4. Run that task against its current released Metro version before editing the consumer. Capture the exact failure. If the baseline does not reproduce, diagnose that discrepancy before publishing.

Use a disposable clone for a remote reproducer unless the user supplied a checkout they want edited.

Publish a unique local version

Choose a new version for every publish. Derive it from VERSION_NAME in Metro's gradle.properties and add a task-specific suffix, for example 1.4.0-2587-20260725-LOCAL01.

From the Metro repository root, run:

bash
./metrow publish --local --version 1.4.0-2587-20260725-LOCAL01

Always use metrow; do not call publishToMavenLocal directly. The wrapper supplies Metro's required publishing options, disables release signing, excludes documentation generation, and reruns publication tasks.

Record the commit and worktree state immediately before publishing. If the publish is interrupted or Metro's source changes during it, publish again with another unique version. Do not trust or reuse potentially partial artifacts.

Point the consumer at Maven Local

Make only the configuration changes required to resolve the unique version:

  • Add mavenLocal() before remote repositories in pluginManagement.repositories so Gradle can resolve the Metro plugin marker.
  • Add mavenLocal() before remote dependency repositories at the consumer's actual repository source of truth.
  • Change the Metro plugin version at its existing source, such as a plugins block, version catalog, settings plugin management, or Gradle property.
  • Preserve the reported Kotlin version, compiler options, and unrelated build configuration.

Do not assume adding mavenLocal() to ordinary dependency repositories also affects plugin resolution.

Show full SKILL.md (230 more words)Show less

Run the same downstream check

Rerun the original task from the consumer's wrapper root:

bash
./gradlew <original-task>

Use --rerun-tasks to prevent stale compiled outputs or cached tests from hiding the result ONLY if necessary. Prefer another unique local version over reusing a snapshot; if reuse is unavoidable, also refresh dependencies. Note that if testing an incremental compilation issue, do not use this flag in subsequent runs.

When the issue concerns a Metro mode such as switching providers, contribution providers, FIR/IR class generation, or provider inlining, run the same downstream check once per relevant mode without changing the reproducer's assertions.

Confirm artifact resolution

Do not infer Maven Local usage only from a passing test. Confirm that Gradle selected the exact local version:

bash
./gradlew buildEnvironment --quiet
./gradlew dependencyInsight --dependency dev.zacsweers.metro --configuration compileClasspath --quiet
./gradlew dependencyInsight --dependency dev.zacsweers.metro:compiler --configuration kotlinCompilerPluginClasspathMain --quiet

Adjust the dependency configurations for the target project when compileClasspath or kotlinCompilerPluginClasspathMain is not applicable. Verify the plugin marker and expected Metro compiler, runtime, and interop artifacts all resolve to the unique version.

Report the result

Report:

  • the Metro commit and whether its worktree was dirty;
  • the unique Maven Local version;
  • the baseline version, task, and exact outcome;
  • the local version's outcome for each tested mode;
  • the artifact-resolution evidence;
  • any platform or task not exercised.

Recheck Metro's commit and worktree state after the downstream run. Keep temporary consumer edits out of the Metro change set. Do not delete Maven Local or Gradle caches; the unique version isolates the verification without destructive cleanup.

© ZacSweers, 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

SKILL.md and 1 other file in .agents/skills/test-metro-locally of ZacSweers/metro.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit ba2f45f

Compare with similar skills

Test Metro Locally 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.

Test Metro Locally compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Metro Locally this skillZacSweers/metro1.4k—~1.2kAutomated safety check: PassApache-2.0
Capturing Preview Screenshots In CIskydoves/android-testing-skills334—~4.5kAutomated safety check: NotesApache-2.0
UI Dialogx DialogafkT/DevUtils1.6k—~1.1kAutomated safety check: PassApache-2.0
Setting Up Compose HotswanrosuH/EasyWatermark1.9k1 repos~3kAutomated safety check: PassApache-2.0
Android Cicddavila7/claude-code-templates33k—~2.2kAutomated safety check: PassMIT
Plan ReviewKenjiOhtsuka/harmonica131—~1kAutomated safety check: PassMIT

Similar skills

  • Capturing Preview Screenshots In CI

    skydoves/android-testing-skills

    A skill your agent uses to render every Jetpack Compose @Preview as a screenshot on a real Android device or emulator and publish a browsable HTML catalog from CI.

    334 GitHub stars~4.5k tokensUpdated 4 mo ago
    MobileAuto-check: notes
  • UI Dialogx Dialog

    afkT/DevUtils

    需要对话框、弹窗、菜单、加载等待、轻提示(Toast 替代)、应用内通知、底部弹窗、 上下文菜单、全屏/自定义弹层或操作引导时,默认使用 DialogX (com.github.kongzue.DialogX,本工程已依赖)而非系统 AlertDialog/Toast/PopupMenu。

    1.6k GitHub stars~1.1k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Setting Up Compose Hotswan

    rosuH/EasyWatermark

    A skill your agent uses to install and verify Compose HotSwan end to end so a developer goes from zero to working sub-second hot reload on a real device or emulator in one session.

    1.9k GitHub starsUsed in 1 repo~3k tokens
    MobileAuto-check passed
  • Android Cicd

    davila7/claude-code-templates

    Automated Android CI/CD pipeline to Google Play — supports TWA, React Native, Flutter, and native Android.

    33k GitHub stars~2.2k tokensUpdated yesterday
    MobileAuto-check passed
  • Plan Review

    KenjiOhtsuka/harmonica

    A skill your agent uses when reviewing the Harmonica restart plan against reality — after a phase PR or milestone merges, before proposing the next phase, or when asked "are the specs up to date" /…

    131 GitHub stars~1k tokensUpdated 19 days ago
    DatabasesAuto-check passed
  • Review Dependencies

    tobihagemann/turbo

    Detect package managers and CI action pins, then discover outdated or vulnerable dependencies.

    408 GitHub stars~1.5k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed

More from ZacSweers/metro

  • Analyze Perfetto Trace

    ZacSweers/metro

    Query and analyze Metro's perfetto compiler traces to find real hot spots and untraced time.

    1.4k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Test Metro Ide Locally

    ZacSweers/metro

    Run Metro's IDE plugin from source in a sandboxed local IDE against a consumer project.

    1.4k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Add Compiler Option

    ZacSweers/metro

    Adds a new compiler option to Metro.

    1.4k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Test Metro Locally

What does Test Metro Locally do?

Publish the current Metro checkout to Maven Local and verify it in an external consumer or reproducer. Test Metro Locally is an agent skill from ZacSweers/metro. Publish the current Metro checkout to Maven Local and verify it in an external consumer or reproducer.

When should I use Test Metro Locally?

Test Metro Locally fits situations like: testing an unreleased Metro compiler; gradle plugin change downstream; validating a GitHub issue reproduction; comparing released and local behavior.

How do I install Test Metro Locally in Claude Code?

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

How do I install Test Metro Locally in Codex?

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

Can I use Test Metro Locally 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 ZacSweers/metro --skill test-metro-locally -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-metro-locally, .gemini/skills/test-metro-locally, .github/skills/test-metro-locally and .opencode/skills/test-metro-locally in your project.

What does Test Metro Locally need to run?

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

Does Test Metro Locally 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 Test Metro Locally 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 Test Metro Locally use?

Test Metro Locally 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 Test Metro Locally use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Test Metro Locally?

Skills that share tags, products or a category with Test Metro Locally: Capturing Preview Screenshots In CI (skydoves/android-testing-skills, 334 stars), UI Dialogx Dialog (afkT/DevUtils, 1.6k stars), Setting Up Compose Hotswan (rosuH/EasyWatermark, 1.9k stars) and Android Cicd (davila7/claude-code-templates, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Metro Locally?

ZacSweers (a GitHub user) maintains it in ZacSweers/metro, which has 1,408 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 11, 2026.

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