← Back to PRs

#13759: feat(skill-creator): add executable example script template

by neverbiasu open 2026-02-11 00:45 View on GitHub →
stale size: S
## Summary Add a functional example script template to skill-creator that developers can use immediately without building everything from scratch. ## Changes The generated example.py now includes: - CLI argument parsing (--input, --output, --verbose) - Logging setup with configurable levels - Working process_data() function with file I/O and error handling - Concrete pattern guidance in comments (JSON, CSV, API, format conversion) ## Before Scripts were just stubs with print() and TODO comments. Developers had no reference for CLI patterns. ## After Generated scripts are immediately runnable, show best practices, and include clear next steps for customization. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates `skills/skill-creator/scripts/init_skill.py` so the skill initializer can generate a runnable `scripts/example.py` template when `--examples` is enabled. The new example script includes argument parsing (`--input/--output/--verbose`), basic logging setup, and a placeholder `process_data()` that reads/writes files, with commented guidance for common patterns (JSON/CSV/API/format conversion). The main issue found is that the generated script’s `--verbose` flag likely doesn’t actually enable DEBUG output because the logging handler is configured at INFO via `logging.basicConfig(level=logging.INFO, ...)` while only the named logger level is changed. <h3>Confidence Score: 4/5</h3> - Mostly safe to merge, but generated example script has a correctness issue around verbose logging behavior. - Change is isolated to a template string used for generated example scripts, with minimal impact on the initializer logic. The main functional problem is the `--verbose` flag likely not emitting DEBUG logs due to handler/root level filtering, which undermines the intended behavior of the example template. - skills/skill-creator/scripts/init_skill.py (EXAMPLE_SCRIPT logging configuration) <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs