add-config-flag

add-config-flag is a skill for Claude Code, Codex from anoopsg/agent_rules. It costs 55 tokens per session (673 once invoked), scanned A, original, MIT.

A workflow for adding compile-time configuration switches to a Dart application. These switches control fixed feature choices or per-build values such as a base URL, API key, or mock setting, and require a rebuild when changed.

In plain words
What is it for?
Use it to add a feature flag, environment value, API base URL, API key setting, or mock-API switch for different build variants.
Why use it?
It keeps configuration in a consistent place and makes clear which values are fixed at build time rather than changeable while the app runs. It avoids scattering feature-switch logic across the codebase.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add a feature flag, environment value, API base URL, API key setting, or mock-API switch for different build variants.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anoopsg/agent_rules/add-config-flag
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add anoopsg/agent_rules --skill add-config-flag
Clone the repo
git clone --depth 1 https://github.com/anoopsg/agent_rules

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-config-flag

README.md
[![agentmods](https://agentmods.dev/badge/skills/anoopsg/agent_rules/add-config-flag/github.svg)](https://agentmods.dev/skills/anoopsg/agent_rules/add-config-flag)
Your own site
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/add-config-flag"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/add-config-flag/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-config-flag

Your own site · 80×15
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/add-config-flag"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/add-config-flag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 673 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.00673
Opus 5.5 $0.00022 $0.00269
Sonnet 5.5 $0.00011 $0.00135
Haiku 4.5 $0.00006 $0.00067

Measured 22d ago against content hash b9e9a3869871, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-config-flag scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/exclusive/skills/add-config-flag/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Config Flag Skill

This skill defines the process for adding a compile-time switch, so that "is this on, and what is it set to?" is always a one-file answer.

1. Pick the Kind

Need Kind Lives in
A product toggle, the same for every flavor FeatureFlags constant lib/src/system/feature_flags.dart
A value that differs per flavor, or a secret (URL, key, mock switch) Environment define lib/src/system/environment.dart

Both are compile-time constants: changing one means rebuilding the app. There is no runtime or remote config; stop and ask if the user needs a value that changes without a release.

2. Add a Feature Flag

  1. Add static const bool <name>Enabled = <default>; to FeatureFlags, with a doc comment. Name it as a statement (onboardingEnabled, not onboarding).
  2. Read it at the single point that owns the behavior (a repository getter, a guard or one widget), never in several features, so its effect stays in one place. See how existing flags are read: grep -rn "FeatureFlags\." lib/src/features.
  3. If docs/architecture/feature-flags.md exists, add the flag and its effect when false to its table.

3. Add an Environment Define

  1. Add static const <Type> <name> = <Type>.fromEnvironment('<KEY>'); to Environment, with a doc comment (String, bool or int). Read it only as Environment.<name>, never by calling fromEnvironment elsewhere. Existing defines: grep -n "fromEnvironment" lib/src/system/environment.dart.
  2. Make the default (key missing) safe for a release build: off, empty or production. A build that forgets the key must not ship test data or crash.
  3. Add the key to env/sample.json, the committed template, with a placeholder, never a real secret. Add it to your local per-flavor env files too (they are gitignored).

4. Testing

A const can't be changed from a test. Either write the expectation in terms of the flag, so it holds whichever way it is set (expect(result, !FeatureFlags.<name>Enabled)), or inject the value into the class that owns the behavior and test both values.

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago First seen · 60 lines · 55 tokens per session scan A b9e9a3869871

Subscribe to this mod's changes

add-config-flag is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 23d ago), licensed MIT. It adds 55 tokens to every session and 673 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-08.

Related

add-config-flag compared with skills from other repositories

add-config-flag next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-config-flaganoopsg/agent_rulesSkill223d agoMITA55Claude Code, Codex
orca-emulator-androidstablyai/orcaSkill145ktodayMITA102Claude Code, Codex
glance-canonical-layoutsandroid/skillsSkill11k7d agoApache-2.0A56Claude Code
android-tombstone-symbolicationdotnet/skillsSkill6.4ktodayMITA176Claude Code
dogfoodcallstack/agent-deviceSkill5.6ktodayMITA55Claude Code
winapp-mauimicrosoft/winappCliSkill1.4ktodayMITA68Claude Code
flutter-devMiniMax-AI/skillsSkill14k20d agoMITA83Claude Code