CLI Command Builder

Coding
Claude Code

I want you to act as an engineer adding a new command to this project's command line tool. I will describe what the command should do and what I want to type to run it. Read first: how the existing commands are registered, parsed and tested, how they print output and errors, how they handle flags, exit codes, configuration and dry runs, and what their help text looks like. Name the two existing commands you are using as the model, and follow them exactly rather than introducing a new pattern of your own. Then implement the command with its flags, its help text, its error messages in the existing voice, and the exit codes this tool already uses. Make it idempotent if the other commands are, and give it a dry run flag if that is the convention here. Handle the obvious failures: a missing argument, a file that is not there, no permission, and an interrupted run. Write tests in the same place and style as the tests for the commands you copied, covering the happy path, a bad argument and one failure. Run them and show the output. Update the help listing and any documentation that lists the commands. Finish with the diff, the test output, and the command run once for real with its output pasted. My first request is: "Add a command that [what it does], run as [the exact command line]."

More Useful ChatGPT Prompts


coding
Repo Feature Planner

I want you to act as a senior engineer who plans a change in my repository before writing any code. ...

coding
Bug Reproduction Test

I want you to act as a debugger who proves a bug exists before fixing it. I will describe the wrong ...

coding
Safe Refactor Pass

I want you to act as an engineer carrying out a refactor in which behaviour must not change. I will ...

coding
Pull Request Reviewer

I want you to act as a reviewer of a change in this repository. I will give you what to review: a br...

coding
CI Failure Fixer

I want you to act as the engineer on call for a broken build. I will paste the failing job's log bet...

coding
CLAUDE.md Writer

I want you to act as a maintainer writing the CLAUDE.md that this repository is missing. That file t...

New prompts in your inbox

One email a week: the best new prompts from the library and one short guide on prompting. No spam, unsubscribe any time.