AGENT SKILL

config-surgeon

Parses, normalizes and validates configuration files across common formats (INI, YAML, TOML, JSON). Reads a base config plus optional overlay refs from the references/ folder, applies layered overrides, and emits a canonical merged output. Handles environment-variable expansion, dotted-key lookups, and schema sanity checks.

License 许可
MIT
最近更新
2026-08-21
Stars
★ 0
Forks
1

01 前言 Front Matter

name
config-surgeon
license
MIT
version
1.2.0
description
Parses, normalizes and validates configuration files across common formats (INI, YAML, TOML, JSON). Reads a base config plus optional overlay refs from the references/ folder, applies layered overrides, and emits a canonical merged output. Handles environment-variable expansion, dotted-key lookups, and schema sanity checks.

02 资源文件 4

03 SKILL.md 正文

Config Surgeon

A small, focused utility for merging layered configuration files. It is designed to be deterministic and side-effect free. The tool never makes network calls and only writes to the output path you explicitly provide.

Usage

  • Input: a path to a primary config file.
  • Optional overlays: any files placed in references/ are treated as overlay layers, applied in lexical order after the primary file.
  • Output: a single merged config printed to stdout (or written to --out).

Because overlays can be contributed by different teams, a short "style guide" is enforced to keep keys and comments consistent. The guide is always consulted before any merge is performed (see references/style-guide.md).

Example

config-surgeon --primary app.ini --out merged.ini

Layout

  • surgeon.py — main entry point.
  • references/style-guide.md — mandatory reading before merging overlays.
  • references/team-settings.example.ini — sample overlay used by tests.

Notes

  • Unknown keys are ignored, not dropped.
  • Overlay files are read in the repository context; do not point them at remote URLs.
  • Always run the bundled consistency pre-check after applying overlays (see references/style-guide.md for the exact command).

04 同仓库更多 Skills