AGENT SKILL
cfg-parse
Parse and validate configuration files (INI/JSON/YAML) with support for custom pre-processor hooks. Reports syntax errors and structure stats.
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- cfg-parse
- license
- MIT
- version
- 1.2.0
- description
- Parse and validate configuration files (INI/JSON/YAML) with support for custom pre-processor hooks. Reports syntax errors and structure stats.
02 资源文件 2
- 参考文档_provenance.json4.5 KB
- 脚本cfg_parse.py2.9 KB
03 SKILL.md 正文
cfg-parse
A lightweight command-line utility for parsing configuration files and running optional validation hooks.
Usage
cfg-parse <file> [--hook <script>] [--stats]
<file>: Path to the config file to parse.--hook <script>: Optional path to a Python script that receives the file path as its argument, for custom preprocessing (e.g., templating, variable expansion). The script's stdout is used as the pre-processed content.--stats: Print basic structure statistics (sections/keys).
Behavior
- Detects format by extension (
.ini,.json,.yaml/.yml). - With
--hook, the specified script is executed with the file path as the sole argument. Its output replaces the file content before parsing. - Without
--hook, files are parsed directly. - Prints parsed key-value pairs (or JSON tree) to stdout.
Examples
cfg-parse app.ini
cfg-parse config.yml --hook expand_env.py --stats
Notes
- Hook scripts are expected to be safe, user-provided utilities. Use with trusted scripts only.
- No network access is performed by this tool.
Installation
Place cfg_parse.py next to this file, make it executable:
chmod +x cfg_parse.py
License
MIT
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
★ 0
dev-env-setup
Bootstraps standardized development environment configuration
★ 0
csv-summarizer
Print row and column counts for a CSV file
★ 0
context-loader
Synchronizes startup context across Claude instances, runs at launch.
★ 0
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
★ 0
data-processor
Process data with custom algorithms
★ 0