prime-holding/rx_bloc/add-feature-flag
Claude Code and agent skill by prime-holding/rx_bloc
- community
Checking that the SKILL.md file is still in the repository.
Add a new boolean feature flag to the rx_bloc_cli — touches CreateCommandArguments, configurations, GeneratorArguments, BundleGenerator, CreateCommand, and optionally processors and generate_test_project.sh
Install
npx vskill@latest install prime-holding/rx_bloc/add-feature-flagSKILL.md
Add a New Feature Flag
This skill guides adding a complete new boolean feature flag to rx_bloc_cli, from CLI argument definition through to template generation.
Inputs Required
- Flag name — the snake_case flag identifier (e.g.,
enable_my_feature) - CLI arg name — the
--kebab-caseargument (e.g.,--enable-my-feature) - Which configuration group — one of:
ProjectConfiguration,AuthConfiguration,FeatureConfiguration,ShowcaseConfiguration - Associated mason brick name — e.g.,
feature_my_feature(or an existing brick to extend) - Default value —
trueorfalse - Whether platform processors are needed — does it require changes to AndroidManifest, plist, podfile, or gradle?
- Whether it has hard dependencies on other features — e.g., if
enable_my_featureis true,realtime_communicationmust also be included for the generated project to compile.
Checklist — Touch Every File Below
1. lib/src/models/command_arguments/create_command_arguments.dart
Add an enum case to CreateCommandArguments:
2. lib/src/models/configurations/<group>_configuration.dart
Add the field to the appropriate configuration class:
Add it to the constructor and implement in the interface.
3. lib/src/models/generator_arguments.dart
Delegate to the configuration:
4. lib/src/models/generator_arguments_provider.dart
Read and pass the new argument:
Then pass it when constructing the relevant configuration object.
5. lib/src/models/bundle_generator.dart
Import and conditionally include the brick bundle:
5a. Declare and enforce feature dependencies
If your feature depends on another feature being present, enforce this before wiring the bundle.
Pattern 1 — derived property (preferred for auth-style deps): Add a derived getter to the relevant *Configuration class or GeneratorArguments:
This ensures lib_auth (or another shared brick) is always included when your feature is on.
Pattern 2 — explicit guard in BundleGenerator:
Canonical example — `feature_in_app_notifications` → `realtime_communication`: feature_in_app_notifications creates an EventBloc that uses SseService from lib_realtime_communication. If someone enables in-app notifications without enabling realtime communication, the generated project will fail to compile. The correct fix is to include lib_realtime_communication whenever inAppNotificationsEnabled is true (via a derived property or explicit guard).
Soft dependencies (no enforcement needed): If your feature optionally enriches another feature via {{#my_feature}}...{{/my_feature}} conditionals in Mustache templates, no Dart-side enforcement is needed — the templates handle the conditional rendering automatically.
6. lib/src/commands/create_command.dart
Add to the vars dict:
Add to _usingLog:
7. Platform Processors (if needed)
If the feature requires native permission declarations or configuration:
- Android:
lib/src/processors/android/android_manifest_processor.dart - iOS permission:
lib/src/processors/ios/info_plist_processor.dart - iOS pod:
lib/src/processors/ios/podfile_processor.dart
8. Mason Brick
Create mason_templates/bricks/feature_my_feature/__brick__/ with all template files. Then compile:
Add to bin/compile_bundles.sh:
9. bin/generate_test_project.sh
Add --enable-my-feature to the all_enabled config and --no-enable-my-feature to the all_disabled config.
10. mason_templates/bricks/rx_bloc_base/__brick__/.cursor/rules/project-structure.mdc
Add a conditional entry for the new directories using mason syntax. This file describes the generated project's structure to the AI agent.
Verification
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/rx_bloc_cli/.agents/skills/add_feature_flag/SKILL.md
Popularity
- Repository stars
- 67
- Repository forks
- 20
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/prime-holding/rx_bloc/add-feature-flag)