agentleFS
junhjangjunhjang/claude-harness/.claude/skills/configuration/SKILL.md

configuration

Skill0 starsChanged 7 months agoMITView on GitHub

Adding a new config file, adding a field, or wiring a config consumer. Enforces schema validation at startup (no permissive defaults), env-var indirection for secrets, layered config (defaults / per-env / operator-override), hot-reload explicit per field.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Schema validation at startup — fail loud, fail fast: Every config deserialized into a typed struct, then validated.

    line 10
  2. Very specific:

    Hot-reload explicit per field, never default-on: Default: restart-only. Whitelist exceptions are declared per field.

    line 13
  3. Very specific:

    Schema versioning: Every file declares schema_version: <N>.

    line 16
  4. Distinctive:

    If a new field is mandatory in prod, default rejection is the right answer.

    line 19

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Apply under config/ or when wiring a config consumer.

  1. Schema validation at startup — fail loud, fail fast. Every config deserialized into a typed struct, then validated. Missing required keys / malformed values / out-of-range numbers → process-abort. Forbidden: unwrap_or(Default::default()) on required fields, Option<T> for production-mandatory fields, permissive defaults that mask misconfiguration, lazy first-use loading.
  2. Env-var indirection for secrets — never inline. API keys, signing secrets, private keys via secret_env: "FOO_SECRET"; loader reads at startup. Missing/empty → ConfigError::MissingEnvVar / EmptyEnvVar startup abort.
  3. Layered config: defaults → per-env → operator-override. config/defaults/, config/<env>/, config/<env>/operator-override.yaml (gitignored). Deepest wins. Cross-env references rejected.
  4. Hot-reload explicit per field, never default-on. Default: restart-only. Whitelist exceptions are declared per field; uses an atomic snapshot (ArcSwap or equivalent) so consumers see a consistent view. Failed validation on reload → keep previous version + alert.
  5. Torn-read prevention. Multi-field config consumed via a single atomic snapshot, not field-by-field.
  6. Config-drift detection. Loader emits a sha256 fingerprint per file (log + metric). Unexpected reload (mtime change without operator action) → alert. Multi-machine deploys verify the same hash everywhere.
  7. Schema versioning. Every file declares schema_version: <N>. Unrecognized → UnsupportedSchemaVersion. Migrations in versioned scripts (config/migrations/v2_to_v3.py), never inline if schema_version < N in the loader.
  8. Per-instance runtime data lives in config files, never hardcoded. match on identifier strings inside source is forbidden — drive the mapping from config.

If a new field is mandatory in prod, default rejection is the right answer.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.