Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ZacSweers/metro --skill add-compiler-option명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
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.
Query and analyze Metro's perfetto compiler traces to find real hot spots and untraced time. Use whenever the user asks about metro compile-time perf, where time is going in a trace, or shares a perfetto screenshot.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | add-compiler-option |
| description | Adds a new compiler option to Metro. |
When adding a new option, you need to update these files in order:
compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.ktAdd the option in four places:
MetroOptionMY_NEW_OPTION(
RawMetroOption.boolean( // or RawMetroOption() for non-boolean types
name = "my-new-option", // kebab-case name used in CLI
defaultValue = false,
valueDescription = "<true | false>",
description = "Description of what this option does.",
required = false,
allowMultipleOccurrences = false,
)
),
For non-boolean options, use the full RawMetroOption constructor with a valueMapper:
MY_INT_OPTION(
RawMetroOption(
name = "my-int-option",
defaultValue = 10,
valueDescription = "<count>",
description = "Description here",
required = false,
allowMultipleOccurrences = false,
valueMapper = { it.toInt() },
)
),
MetroOptions data classpublic val myNewOption: Boolean = MetroOption.MY_NEW_OPTION.raw.defaultValue.expectAs(),
MetroOptions.Builderpublic var myNewOption: Boolean = base.myNewOption
Builder.build() functionmyNewOption = myNewOption,
MetroOptions.Companion.load() functionMY_NEW_OPTION -> myNewOption = configuration.getAsBoolean(entry)
For non-boolean types, use the appropriate helper:
configuration.getAsString(entry) for Stringconfiguration.getAsInt(entry) for Intconfiguration.getAsSet(entry) for Set typesgradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/MetroPluginExtension.ktAdd a Gradle DSL property:
/**
* KDoc description of what this option does.
*
* Disabled by default.
*/
public val myNewOption: Property<Boolean> =
objects.booleanProperty("metro.myNewOption", false)
For options that should support Gradle properties:
objects.booleanProperty("metro.propertyName", defaultValue)
For options without Gradle property support:
objects.property(Boolean::class.java).convention(false)
gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/MetroGradleSubplugin.ktIn applyToCompilation, add to the options list:
add(lazyOption("my-new-option", extension.myNewOption))
Note: The option name here must match the name in RawMetroOption.
compiler/src/test/kotlin/dev/zacsweers/metro/compiler/MetroCompilerTest.ktIn toPluginOptions(), add handling for the new option:
MetroOption.MY_NEW_OPTION -> {
processor.option(entry.raw.cliOption, myNewOption)
}
compiler-tests/src/test/kotlin/dev/zacsweers/metro/compiler/MetroDirectives.ktOnly needed if the option should be controllable from test directives:
val MY_NEW_OPTION by
valueDirective("Description of the directive.") { it.toBoolean() }
Or for simple on/off directives:
val MY_NEW_OPTION by directive("Description of the directive.")
RawMetroOption.boolean() helperRawMetroOption() with valueMapper = { it.toInt() }RawMetroOption() with valueMapper = { it }RawMetroOption() with valueMapper = { it } and parse in load()RawMetroOption() with valueMapper = { it.splitToSequence(':').mapToSet { ClassId.fromString(it, false) } }SCREAMING_SNAKE_CASEkebab-casecamelCasemetro.camelCase@DelicateMetroGradleApi for experimental options@Deprecated for options that will be removed