minozzzi/dotfiles/consorcio-api-feature-flags
- community
Checking that the SKILL.md file is still in the repository.
How to safely implement feature flags and conditionally omit JSON fields in consorcio-simulations-api without breaking unit tests.
Install
npx vskill@latest install minozzzi/dotfiles/consorcio-api-feature-flagsSKILL.md
Feature Flags in Consórcio Simulations API
When implementing feature flags or new environment-based toggles in the consorcio-simulations-api repository, follow these rules to avoid breaking the unit test suite:
1. Avoid Config.cs for Feature Flags
Do NOT add new feature flags directly to src/Consorcio.Simulations.Infra/Configurations/Config.cs. The static constructor of Config.cs enforces the presence of DOTNET_ENVIRONMENT and other environment variables. Unit tests typically run without these variables. If a mapper or service under test accesses Config.cs, it will trigger a TypeInitializationException and break the test suite.
2. Isolate in a Dedicated Static Class
Create a dedicated configuration class (e.g., FeatureFlagConfig.cs) within the Configurations directory.
3. Omitting Fields from JSON Payloads
If a disabled feature flag requires completely omitting a field from an external request (e.g., to the Bradesco integration) rather than sending a default value:
- Make the property nullable (
string?,bool?,long?, etc.) in the target DTO. - Apply
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]. - In the mapping logic, return
nullif the feature is disabled.
Security
- Security scanPassed, 90 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 repositoryCheckingconfig/skills/consorcio-api-feature-flags/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/minozzzi/dotfiles/consorcio-api-feature-flags)