← Back to lessons

Build a Real Tool

Create a command-line tool that solves a problem you actually have. Something you will use tomorrow.

01

Pick a Problem

You have built a website. Now build something useful.

A command-line tool is a program you run in your terminal. It takes input, does something, and produces output. No browser, no interface, just function. The best tools solve a specific problem you have right now.

What to build

Pick one of these, or invent your own:

  • A bookmark organizer. Give it a URL and a tag, it saves them to a file. Run it with --list to see all bookmarks. Run it with --search cooking to find bookmarks tagged “cooking.”
  • A daily journal. Run it, type your entry, it appends the entry with today’s date to a text file. Run it with --read to see past entries.
  • A file renamer. Give it a folder and a pattern, it renames files. Turn IMG_4521.jpg into vacation-001.jpg.
  • A quick note tool. Run note add "buy milk", see notes with note list, remove with note done 3.

The specifics do not matter. What matters is that you pick something you would actually use tomorrow. A tool you use is a tool you understand. A tool you never touch is a tutorial exercise.

Set up the workspace

Create a new folder and open Claude Code:

mkdir my-tool
cd my-tool
claude

Fresh folder. Clean start. Just like building your website.

02

Build the Tool

You have a problem and an empty folder. Describe the tool to Claude Code.

The prompt

Be specific about what the tool does and how you want to use it. Here is an example for the quick note tool:

Build me a command-line note-taking tool in Node.js. It should:

- `node notes.js add "buy milk"` adds a note
- `node notes.js list` shows all notes with numbers
- `node notes.js done 3` removes note number 3
- Store notes in a notes.json file in the current directory
- Show a timestamp next to each note

Keep it simple. One file. No external dependencies.

Notice the details: the language (Node.js), the commands, the storage format, the constraint (one file, no dependencies). The more specific you are about the outcome, the less guessing Claude Code has to do.

Watch it build

Claude Code will:

  1. Create the file (one permission prompt)
  2. Maybe create a test file or sample data
  3. Possibly run it once to verify it works

Approve each step. Watch the tool calls. You are seeing software get built in real time.

Test it immediately

Once Claude Code finishes, test the tool yourself:

node notes.js add "Learn Claude Code"
node notes.js add "Build something cool"
node notes.js list
node notes.js done 1
node notes.js list

If something does not work, tell Claude Code what went wrong:

When I run `node notes.js list` it shows an error: "Cannot read file notes.json". Fix it so it creates the file if it does not exist.

Claude Code will read the error, read the file, and make a targeted fix.

03

Improve It

The first version works. Now make it better.

This is where building with Claude Code becomes genuinely powerful. You do not need to understand the code to improve it. You describe what you want, and Claude Code handles the implementation.

Add features

Try prompts like these (adapted to your tool):

Add color to the output. Notes should be yellow, done confirmations green, errors red.
Add a "search" command that finds notes containing a keyword.
Show how long ago each note was created, like "2 hours ago" instead of a raw timestamp.

Each prompt is a new feature. Each feature takes seconds. In traditional development, adding colored terminal output means researching a library, installing it, importing it, learning the API. With Claude Code, you describe the result and move on.

Fix edge cases

Think about what could go wrong:

What happens if I run `node notes.js done 99` when there are only 3 notes? Make it show a helpful error instead of crashing.
What if someone adds an empty note? It should reject empty strings with a message.

Claude Code handles defensive programming the same way it handles features: you describe the behavior, it implements it.

Make it yours

The tool is on your computer. The code is in your folder. You can keep adding features forever. There is no subscription, no rate limit on changes, no approval process. You describe, Claude Code builds, you test, you iterate.

This is the rhythm: describe, build, test, improve. It works for a note tool. It works for a full application. The complexity of the project changes. The workflow stays the same.

04

What You Learned

Step back and look at what you just did.

You built a working command-line tool from a conversation. It runs on your computer. It does something useful. You can keep improving it. You did not follow a tutorial, copy example code, or study a programming language first.

The tools you used

Every tool Claude Code has was involved in this lesson:

  • Read examined the code after each change
  • Write created the initial file
  • Edit made precise modifications for each new feature
  • Bash ran the tool to test it
  • Grep searched the code when fixing bugs
  • Glob found files when the project grew

You did not invoke these tools. You described outcomes. Claude Code chose the right tools for each step.

What this means

You can build software. Not because you learned JavaScript or Python. Because you learned how to describe what you want, verify the result, and iterate. The programming language is an implementation detail that Claude Code handles.

This does not make you a programmer in the traditional sense. It makes you something the industry does not have a word for yet: someone who can build real, working software by directing an AI. That is a genuinely new capability.

What’s next

Your tool works, but only on your computer. Your website works, but only in your browser. In the next lesson, you will learn how to make Claude Code work the way you want it to: your preferences, your rules, your workflow. Then in the final lesson, you will put your project on the internet.