/bitwild-team-kit:dart-codegenfrom bitwild-team-kit
Use when authoring, modifying, or debugging Dart code generators with build_runner, source_gen, code_builder, build, build_test, or analyzer APIs. Covers generator internals, build.yaml builder definitions, phase ordering, generated annotation APIs, analyzer or type inspection inside generators, and generator test failures. Do not use for ordinary Dart or Flutter app code, or when only consuming an existing generator unless the task is to debug the generator itself.
Ships in bitwild-team-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Implement and debug Dart generators using the builder and package versions in the target repository. Generator APIs change frequently, so inspect the installed build, source_gen, analyzer, code_builder, and dart_style versions before choosing exact APIs.
Dart's macros experiment was discontinued. For package-integrated source generation, use the current build_runner/build ecosystem unless the user has chosen a different generation mechanism.
Before implementing, determine:
Do not choose a two-package layout, SharedPartBuilder, or code_builder merely as a default. Select them when the output contract or package distribution requires them.
| Required output | Typical choice |
|---|---|
Contributions combined into .g.dart | SharedPartBuilder with one or more Generators |
| Dedicated part file | PartBuilder |
| Standalone Dart library with its own imports | LibraryBuilder |
| Aggregated or non-Dart output | A raw Builder, often with a synthetic input |
| Post-build transformation | PostProcessBuilder |
Part output shares the source library's imports and can access private declarations. A standalone library owns its imports but cannot access private declarations from another library.
buildExtensions.InvalidGenerationSource with an element or node when invalid annotated source should produce a source-located diagnostic. Returning no output can be correct when the element simply does not apply.TypeChecker.typeNamed or typeNamedLiterally for normal type matching. TypeChecker.fromRuntime was removed, and fromUrl is a brittle fallback for cases that intentionally depend on a specific library URI.SharedPartBuilder, PartBuilder, and LibraryBuilder, account for the version's built-in output formatting before adding another formatting pass. Current source_gen builders format with the input library's effective language version by default.DartEmitter.scoped() for a standalone Library when automatic imports are required. For part output, do not emit import directives; the owning library must make referenced types available.code_builder when the generated structure or import allocation is sufficiently dynamic to justify its fluent model.pubspec.yaml, build.yaml, the builder factory, existing generated files, and generator tests.buildExtensions and relevant build.yaml configuration.Use the repository's build command. A common smoke test is:
dart run build_runner build --delete-conflicting-outputs
Use --delete-conflicting-outputs only when generated outputs are expected to be replaced; report conflicts rather than deleting user-authored files of uncertain ownership.
Read only what the task needs:
TypeCheckerbuild_test and resolver-based testsbuildExtensions and build.yaml agree with every written asset.evals/evals.json (opens in a new tab)evals/trigger_queries.json (opens in a new tab)references/analyzer_api.md (opens in a new tab)references/architecture.md (opens in a new tab)references/build_yaml.md (opens in a new tab)references/code_builder.md (opens in a new tab)references/dependencies.md (opens in a new tab)references/practical_patterns.md (opens in a new tab)references/real_world.md (opens in a new tab)references/testing.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)references/worked_example.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub btwld/agent-plugins --plugin bitwild-team-kit40 skills in this plugin
/accessibility-reviewUse when checking an interface against accessibility criteria with explicit scope and evidence. Use relevant browser, native, or design tools to inspect behavior; a screenshot-only review cannot establish full conformance./ackUse when a Dart or Flutter project uses package:ack and needs to validate untrusted input, define a schema or bidirectional codec, generate an Ack model, import or export JSON Schema, or migrate between Ack versions. Also use when the user explicitly asks to adopt Ack for one of these tasks./architectureUse when choosing, evaluating, or remembering a technical design decision: technology selection, component boundaries, data ownership, or a chosen API contract. Give a concise recommendation and its reason, main trade-off, and conditions for reconsideration. Use clean-sheet-review to reopen an existing solution's whole framing, deep-code-review for code defects, and ordinary execution for an approved implementation.