Skip to content AI News: Nano Banana 2.1 is out: better edits and text, half the API price per image →
PH-0727 · Code prompt

CLI Command Builder

A Claude Code prompt that adds a command to your CLI in the existing pattern, with flags, help text, error handling and tests that run.

What you get

Adds a command to your CLI in the existing pattern, with flags, help text, error handling and tests that run.

What you need
  • 2 blanks to fill in: what it does the exact command line
Best inClaude CodeAlso works in any coding agent
236 words
Prompt · September 19, 2026
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]."
Coding Claude Code

How to use it

  1. Fill the blanks under «Make it yours» — the prompt updates as you type.
  2. Copy the prompt and paste it into Claude Code.
  3. Not quite right? Reply with what to change — the model keeps the rest.

More Claude Code prompts

PH-0894Coding

Repo Feature Planner

Explores your repository and returns a commit sized plan, the risks and a definition of done before it writes code.

You fill in describe the feature you want…

Claude Code
PH-0708Coding

Bug Reproduction Test

Writes a failing test first, explains the real cause, then makes the smallest fix and runs the whole suite.

You fill in describe the bug, how to…

Claude Code
PH-0908Coding

Safe Refactor Pass

Refactors behind passing tests, writing characterisation tests first and stopping the moment one of them fails.

You fill in file or modulethe reason

Claude Code
PH-0882Coding

Pull Request Reviewer

Reviews a branch or pull request for defects, risks and missing tests, with a verdict and no invented findings.

You fill in branch name, pull request…

Claude Code
PH-0719Coding

CI Failure Fixer

Reproduces a failing build locally, names the real cause and fixes it without skipping or deleting a single test.

You fill in paste the failing log herebranch name

Claude Code
PH-0725Coding

CLAUDE.md Writer

Reads your repository and writes its CLAUDE.md: verified commands, the layout and the conventions the code follows.

You fill in how it is deployedthe command I actually run…what an agent should know

Claude Code
Weekly

New prompts in your inbox

One email a week: the best new prompts and one short guide. Unsubscribe any time. Privacy policy