Use Claude Code to build a small command-line tool from a written spec, then document it so the next session already knows how it works. This pulls together everything you have practiced: driving the console, granting file edits, reviewing what the agent writes, and saving project memory.
Run this to drop the project folder and its spec at /root/wordcount/:
curl -fsSL https://raw.githubusercontent.com/Esc-Bash/project-init-scripts/main/claude-code/project-1/init.sh | bash
Read /root/wordcount/README.md first. It describes the tool you are going
to build. There is no solution in there, only the spec.
Build the tool the README describes and land these exact files:
/root/wordcount/wc.sh - a bash script that takes a file path as its one
argument, reads that file, and prints the word count and the line count,
each with a clear label. It must be executable./root/wordcount/CLAUDE.md - project memory that explains what the tool
does, how to run it, and anything worth remembering next time.Start the console in the project folder and let Claude do the first draft:
cd /root/wordcount
claude
Then ask for the tool, for example:
Read README.md, then create wc.sh exactly to that spec. Keep it plain bash.
Review the script, make it executable, and try it on a file of your own:
chmod +x /root/wordcount/wc.sh
echo "the quick brown fox" > /root/wordcount/sample.txt
/root/wordcount/wc.sh /root/wordcount/sample.txt
When you are happy with it, have Claude document the tool. Running /init in
the console writes a CLAUDE.md for you, or just ask it to write one.
A working wc.sh you can run on any file to get word and line counts, plus a
CLAUDE.md that captures how it works. The checks confirm the spec is present,
the script is executable, it prints numbers when run on a file, and the
documentation is not empty.
Press Submit once wc.sh runs and prints counts and CLAUDE.md describes
the tool.
Your lab setup
This VM comes with Claude Code preinstalled and signed in - just run claude to start.
Start the lab on the right to run checks.