DEV Community

OanhDuong
OanhDuong

Posted on

I got tired of wasting AI tokens on Linux commands

I didn’t plan to build another open source project.

I was just too cheap to waste tokens.

While using Claude, I’d ask things like git status, git diff, or docker ps in natural language… then realize my terminal could’ve answered in 20ms. More than once, I hit Ctrl+C halfway through thinking, “Nope, not spending tokens on that.” 😌

That annoyance became a weekend project.

Token ninja: https://github.com/oanhduong/token-ninja

how token-ninja works

Ironically, I learned much more than I expected about Claude Code:

  • UserPromptSubmit enables true zero-token interception before a prompt reaches the model.
  • Good AI tooling isn’t always about adding more AI, it’s often about knowing when not to use it.
  • The hardest part wasn’t executing commands, it was deciding which requests should stay local and which deserved Claude.

I started by trying to save a few tokens.

I ended up learning a lot about Claude Code, prompt hooks, MCP, and where the boundary between deterministic software and LLMs should be.

Sometimes the best learning starts with being annoyed enough to build something.

Open source: https://github.com/oanhduong/token-ninja

Top comments (0)