用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/BrowserWorks/waterfox --skill android-new-module命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Structured performance opportunity investigation for SpiderMonkey (the Firefox JavaScript engine). Use this skill when the user wants to investigate JS engine performance, profile SpiderMonkey, find optimization opportunities, write performance patches, or evaluate benchmark regressions. Trigger on mentions of: profiling JS, SpiderMonkey performance, JIT optimization, benchmark regression analysis, shell benchmarking, or any request to make JS workloads faster. The methodolgy is described mostly for the JS shell but can be adapted to browser investigation.
Analyze Firefox performance profiles using the profiler-cli CLI tool. Trigger when given a profiler.firefox.com or share.firefox.dev link, a local profile path, or when the user wants to investigate an issue in a Firefox profile. Always use this skill instead of WebFetch for Firefox profiler URLs; WebFetch only retrieves the profiler UI's HTML shell and cannot access profile data, whereas profiler-cli downloads and parses the actual profile into a local daemon that supports structured queries over stacks, markers, threads, and samples.
Manage Redash queries and dashboards on Mozilla's STMO (sql.telemetry.mozilla.org) using stmo-cli. Use when the user wants to explore telemetry data on STMO, write, deploy, or execute Redash queries, manage dashboards, or discover data sources. Also trigger on mentions of STMO, Redash, sql.telemetry.mozilla.org, or when the user wants to query Mozilla telemetry data (as opposed to probe/metric discovery, which is mozdata territory).
| name | android-new-module |
| description | Guide for creating new Android gradle modules in the android-components project. |
This skill helps you create new Android gradle modules following Mozilla's conventions and structure. Components are organized into categories: browser, concept, feature, lib, service, support, ui, and compose.
Create a plan to execute the steps. The plan should include all nine steps below.
Ask the user:
my-component)publish: true, examples are publish: false)mkdir -p mobile/android/android-components/components/{category}/{name}/src/main/java/mozilla/components/{category}/{name}
mkdir -p mobile/android/android-components/components/{category}/{name}/src/test/java/mozilla/components/{category}/{name}
mkdir -p mobile/android/android-components/components/{category}/{name}/src/test/resources
Reference the example at mobile/android/android-components/components/feature/example/build.gradle for the standard structure.
Key elements:
com.android.library and kotlin-androidmozilla.components.{category}.{name}androidx.core.ktx, kotlinx.coroutinesjunit.bom, junit4, robolectric, kotlinx.coroutines.testAdd dependencies as needed:
implementation project(':components:support-base')libs.androidx.lifecycle.runtimeplatform(libs.androidx.compose.bom) and compose dependenciesimplementation project(':components:lib-state')implementation project(':components:browser-state')implementation project(':components:{category}:{component-name}')File: src/main/AndroidManifest.xml
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<manifest />
File: src/main/java/mozilla/components/{category}/{name}/{ComponentName}.kt
Reference the example at mobile/android/android-components/components/feature/example/src/main/java/mozilla/components/feature/example/ExampleFeature.kt.
Key elements for a feature component:
mozilla.components.{category}.{name}LifecycleAwareFeature for lifecycle-aware featuresCoroutineDispatcher)start(), stop())For simpler library components, a basic class with the necessary methods is sufficient.
File: src/test/java/mozilla/components/{category}/{name}/{ComponentName}Test.kt
Reference the example at mobile/android/android-components/components/feature/example/src/test/java/mozilla/components/feature/example/ExampleFeatureTest.kt.
Key elements:
StandardTestDispatcher from kotlinx.coroutines.test for testing coroutinesrunTest(testDispatcher) to run tests with coroutine supporttestDispatcher.scheduler.advanceUntilIdle() to advance virtual time`start triggers onUpdate callback`)File: src/test/resources/robolectric.properties
sdk=35
This configures Robolectric to use Android SDK 35 for unit tests.
File: README.md
Reference the example at mobile/android/android-components/components/feature/example/README.md.
Key elements:
# [android-components](../../../README.md) > {Category} > {Name}Add the component to .buildconfig.yml in alphabetical order within its category:
components:{category}-{name}:
description: {Brief description}
path: components/{category}/{name}
publish: true
Find the correct insertion point by searching for the category (e.g., components:feature- for feature modules) and inserting in alphabetical order.
Then update the upstream_dependencies for the new buildconfig with this mach command:
./mach android update-buildconfig android-components
Also update taskcluster/config.yml to add the new module's display name to treeherder.group-names. Without this step, CI will fail with a buildconfig mismatch error.
mozilla.components.{category}.{name}mozilla.components.feature.examplemy-component → MyComponentapi - For interfaces and contracts (concept modules)implementation - For internal dependenciestestImplementation - For testing dependenciesandroidTestImplementation - For instrumented tests@VisibleForTesting for test-only visibilityAfter creating the component, verify it builds with the debug variant:
./mach gradle :components:{category}-{name}:buildDebug
Run tests:
./mach gradle :components:{category}-{name}:testDebug
Format and lint:
./mach lint --fix mobile/android/android-components/components/{category}/{name}
./mach gradle instead of gradlew to ensure the build system is executed in its entirety.publish: false for example/sample components because we do not want them to be distributed through the maven mirrors..buildconfig.yml.基于 SOC 职业分类