building-reusable-cli-tools
Installation
SKILL.md
Building Reusable CLI Tools
Overview
Do not write overly complex, hardcoded single-purpose scripts if you will need to reuse them. When designing scripts that must be highly configurable, use argparse or sys.argv to create simple CLI utilities. Do not use heavy external dependencies like click unless explicitly requested. Always prefer a simple 1-line script if it solves the immediate problem.
When to Use
- Writing scripts to analyze data (JSON, CSV, logs).
- Performing multi-step file or data manipulation tasks.
- When tempted to create multiple incremental scripts (e.g.,
step1.py,step2.py). - When a script requires configurable parameters (inputs, thresholds, categories).