Config And Flags logo

Config And Flags

Community
adamentwistle
config-and-flags

Treat configuration and feature flags as typed, validated inputs with a lifecycle — read once at startup, parse to types, fail fast on missing or malformed values, no scattered env reads or environment-name branching, flags default safe and get removed. Use when adding or reading an env var, config key, settings file, or feature flag; when behaviour differs per environment; when a value "will be set in prod"; and when reviewing code that calls process.env, os.environ, getenv, or a flag client.

Overview

Publisheradamentwistle
Repositoryfable-skills
Skill nameconfig-and-flags
Stars
98
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by adamentwistle on GitHub. Read the source before you install it.

Installation

Install the Config And Flags AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/adamentwistle/fable-skills/tree/main/config-and-flags
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/adamentwistle/fable-skills.git /tmp/fable-skills
mkdir -p .claude/skills
cp -r /tmp/fable-skills/config-and-flags .claude/skills/config-and-flags
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Config And Flags in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Config And Flags on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Config And Flags is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

config-and-flags

Weak configuration is process.env.TIMEOUT || 30 sprinkled across twelve files, a boolean read as the string "false", and a feature flag from two years ago nobody dares delete. Strong configuration is one place that reads, validates, and types every external value at startup, fails loudly when something is missing, and treats every flag as a temporary branch with an owner and an exit condition.

1. One entry point, read at startup

  • Find where the project already loads config (grep process.env, os.environ, getenv, BaseSettings, dotenv, viper, a config/ dir). Add your key there; never read the environment at the call site.
  • Load and validate at process start, not on first use. A missing value should fail the boot, not the 3am request that first reaches that branch.
  • Every key has a name, a type, required-or-default, and one line saying what it controls. If the project has a schema (zod, pydantic, JSON schema), the key goes in it. If it has .env.example or a config table in the docs, update that in the same diff.

2. Parse to a type, never string-compare

  • Env vars are strings. if (process.env.ENABLED) is true for "false", "0", and "no". Parse explicitly: booleans through an allowlist of spellings, numbers with a range check, URLs by parsing, enums by allowlist, durations with the unit in the name (TIMEOUT_MS, not TIMEOUT).
  • Reject malformed values at load with a message naming the key, the value, and the accepted forms (see error-message-quality). Silent fallback to the default on a typo is the bug that survives to production.
  • Secrets are config but never defaults: no fallback value for a credential, never logged, never in the client bundle (see security-reflexes).

3. Defaults are a decision

  • Default to the least-privileged, least-surprising behaviour: off, small, safe. Requiring an explicit value in production is fine; document that it is required.
  • Never silently default something the operator must set. DATABASE_URL || "sqlite://dev.db" means a misconfigured production server writes to a local file and reports success.
  • Environment-specific values live in per-environment config, not in if (NODE_ENV === "production") inside business logic. Branching on the environment name hides which behaviour the tests exercise; branch on the specific config value.

4. Feature flags have a lifecycle

  • Before adding a flag, name its kind: gradual rollout, kill switch, experiment, or long-lived operator toggle. Only the last is permanent; the others get a removal condition written beside the definition ("remove after 100% for two weeks").
  • Default off. Code behind a flag changes nothing for anyone until the flag is flipped.
  • Evaluate once per request or unit of work and pass the result down. Evaluating inside a loop or in several places lets a mid-request flip produce a mixed state.
  • Both branches are tested: the guarded code runs with the flag on and off, and the off path still passes after the on path was added.
  • Removing a flag deletes the dead branch, the definition, the config entry, and the off-path tests in one commit (see surgical-refactoring).

5. Exercise the config path

Before done, start the process three ways — key unset, key malformed, key set to the intended value — and paste what happened each time. Then confirm the key is reachable everywhere it is needed: CI secrets, deploy manifests, .env.example. A key set locally and nowhere else is "works on my machine" with a delay.

Reporting

List every key added or changed: name, type, required or default, where it is read, and which environments now need it set. List every flag added with its kind and removal condition.

Frequently asked questions

What does the Config And Flags AI skill do?

Treat configuration and feature flags as typed, validated inputs with a lifecycle — read once at startup, parse to types, fail fast on missing or malformed values, no scattered env reads or environment-name branching, flags default safe and get removed. Use when adding or reading an env var, config key, settings file, or feature flag; when behaviour differs per environment; when a value "will be set in prod"; and when reviewing code that calls process.env, os.environ, getenv, or a flag client.

Why use Config And Flags on TypingMind?

Because you install it once and use it with any model. Config And Flags is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Config And Flags in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/adamentwistle/fable-skills/tree/main/config-and-flags. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Config And Flags?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Config And Flags?

As many as you like. As long as a model supports skills, you can use Config And Flags with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Config And Flags AI skill free?

Yes. It is published on GitHub by adamentwistle under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇