What problem does it solve?
This Skill helps developers convert existing or new Python scripts into a robust dual-mode module that can run as a CLI tool and be imported as a library, enabling stable, maintainable data processing pipelines.
Core Features & Use Cases
- Dual-mode architecture: A single module that works both as a library and as a standalone CLI.
- Structured interface: Exposes a run(...) function with explicit, fully overridable inputs.
- Safe, parameterized operations: All hard-coded paths and environment dependencies are avoided in favor of configurable arguments.
- Use Case: Convert a long-running ETL script into a reusable module that can be integrated into job schedulers and used by other projects via import.
Quick Start
To begin, place your Python script into the project, run the scaffolder to generate the dual-mode module, and then execute or import the resulting module. Example: python -m dual_mode_wrapper --input input.py --output output_module