Prompts that build command-line tools.
23votes
2answers
2.9kviews

Prompt for a log-tailing CLI that parses, filters, and summarizes without loading the whole file

I wanted a small tool to slice gigabyte-sized JSON-lines logs by level and time range and print a summary, but the first version the model gave me did open(f).read() and json.loads on the whole thing,
18votes
2answers
3.1kviews

Prompt for a production-grade Python CLI with argparse, exit codes, and a self-check

Every weekend project starts with me asking a model for "a Python script that does X" and getting back a 20-line toy: no argument parsing, prints stack traces at users, returns 0 even when it failed.
19votes
1answers
2.7kviews

Getting the model to write actually safe bash instead of a footgun with set -e

I kept getting shell scripts that looked fine and then nuked a directory because an unset variable expanded to empty and rm -rf "$DIR/" became rm -rf /. Adding set -e alone is a trap: it silently does
12votes
1answers
1.4kviews

Prompt for a bulk file-rename CLI with a regex, a dry-run, and collision detection

Batch renaming is exactly the kind of task where a model gives you a confident three-liner that renames files in a loop and, halfway through, renames a.txt to b.txt on top of an existing b.txt, or ren