Example result: Build a small command-line tool
AI-generated example · Build · CLI
Prompt at a glance
Category
Text & chat
Works with
Claude · ChatGPT · Gemini
Length
85 words
Fields to fill
LANGUAGE, WHAT IT DOES
Last updated

Build a small command-line tool

This prompt writes a friendly command-line tool, for example to rename or sort files. It includes help text, a dry-run mode and clear errors, and never overwrites files unless you pass a flag for it.

text-code-cli-tool-builder — claude — 85 words

Act as a developer who writes friendly command-line tools in [LANGUAGE, e.g. Python].

The tool should: [WHAT IT DOES, e.g. rename photos by the date they were taken]
Inputs and options: [e.g. folder path, --dry-run, --pattern]

Write the complete tool with helpful --help text, a dry-run mode, clear error messages and a non-zero exit code on failure. Never delete or overwrite files without a flag that says so. Use only the standard library unless a package really helps. Show three example commands and their output.

Always try a new file-changing tool with --dry-run on a copy of your folder first.

How to use this prompt

From copy to answer in four steps

  1. 1

    Open Claude and start a new chat.

  2. 2

    Paste the prompt.

  3. 3

    Replace each [BRACKETED] field with your real details and paste in your own text where asked.

  4. 4

    Reply with follow-ups such as "make it shorter" or "make it sound more like me".

FAQ

About this prompt

Which AI tools work with this prompt?

It is written for Claude, ChatGPT and Gemini. Paste it into your preferred tool and adjust the wording if the result is off.

What do I need to fill in?

Replace these fields before you send it: LANGUAGE, WHAT IT DOES. Each field shows an example in the prompt.

Should I paste private information into the prompt?

Only what the task needs. Remove names, contact details and other sensitive data before pasting a resume or document into any AI tool.

Keep exploring

More chat & writing prompts

See all 424 chat & writing prompts →