Building a Tax Form Helper with Claude Code in Under an Hour

A working demonstration: in under an hour, a non-developer can build a 1040 reference tool that beats most paid tax-help services for personal use. Caveats included.

· 7 min read

A practical build log: in 50 minutes, I built a 1040 reference tool that I'd genuinely use for my own tax return. Total cost: about $0.40 in API tokens. The point isn't the specific tool — it's that the gap between "I wish this existed" and "I've built this" is now an hour.

What the tool does

You ask plain-English questions about Form 1040 and Schedule A. The tool answers using a curated knowledge base I built (the IRS instructions for 1040 and Schedule A, an FAQ I wrote myself, and a list of common preparer gotchas). It cites which line of the instructions its answer is based on and refuses to answer questions outside the scope.

Example interaction:

Q: "If I sold stock at a loss can I deduct the full loss?"
A: "Capital losses offset capital gains first. If your net capital loss exceeds your gains, you can deduct up to $3,000 against ordinary income per year ($1,500 if married filing separately). Excess losses carry forward indefinitely. Source: 2024 Form 1040 Schedule D instructions, line 21."

The build, step by step

Step 1 (5 min) — Project setup

I asked Claude Code: "Create a folder called tax-helper. Set up a Python project with a virtual environment and the anthropic, chromadb, and streamlit dependencies. Make a knowledge/ subfolder for source documents."

Done. I now have an empty project skeleton.

Step 2 (15 min) — Knowledge base

I dropped two PDFs into knowledge/: 1040 instructions and Schedule A instructions, both downloaded from IRS.gov. I also wrote a 15-question FAQ in plain text.

Prompt: "Write a Python script that loads the PDFs and FAQ from the knowledge folder, splits them into 500-token chunks, embeds them with Anthropic's embedding model, and stores them in a Chroma vector database."

Claude Code wrote it, ran it, and embedded the documents. About a minute of API calls.

Step 3 (15 min) — The Q&A logic

Prompt: "Now write the query function. Take a user question, retrieve the top 5 most relevant chunks from the knowledge base, and ask Claude to answer using only those chunks. The answer must cite which document and section it came from. If the answer isn't in the chunks, the tool should say 'I don't have a confident answer for that — check IRS.gov.' Don't let it answer from general knowledge."

This is the key prompt — the constraint that the tool only answers from the knowledge base, with citations, is what makes it safer than just asking Claude directly.

Step 4 (10 min) — The Streamlit UI

Prompt: "Wrap the query function in a Streamlit app with a text input, a submit button, and a result area showing the answer and the source citations. Add a disclaimer at the bottom that the tool is for educational use only and not professional tax advice."

Claude Code generated the UI. I ran streamlit run app.py and had a working web interface.

Step 5 (5 min) — Smoke test and tightening

I asked it ten questions across the basics: standard deduction amounts, capital loss limits, what counts as charitable contribution. All answered correctly with proper citations. I asked one out-of-scope question (about state taxes) and got the correct refusal.

What this isn't

  • Not a substitute for a tax preparer. The tool answers reference questions; it doesn't prepare a return.
  • Not safe for client work. The IRS expects PTIN-holders to use sanctioned software for client returns. This is personal-use only.
  • Not current beyond Claude's training data. Late-year tax law changes won't be reflected. For procedural questions, always cross-check IRS.gov.
  • Not auditable in a professional sense. If a question yields a wrong answer, you have no remediation path beyond fixing the prompt.

What it is

It's a demonstration that the kinds of "I wish this existed" tools accountants have always wanted are now buildable in an afternoon by people who couldn't code last year. The economic impact across the profession is going to be enormous, and the early adopters are going to look like wizards to colleagues who haven't spent the afternoon learning the loop.

This site has a few live demo tools built with the same approach. They're educational, not professional-use — but they're a sketch of what an AI-fluent accountant can ship.

Frequently asked questions

Should I use a homemade AI tool to prepare actual tax returns?

For your own personal taxes, with caution and verification, yes — many CPAs do exactly this. For client returns under a paid engagement, no — your firm's professional liability and software-assurance policies require sanctioned tools. The line is who's signing the return.

Where does the tool get its tax knowledge?

From Claude's training data, which is current up to its knowledge cutoff (early 2026 in this generation). For anything involving recent tax law changes — late-year legislation, procedural changes — supplement with the IRS website. The tool is best at structural tax questions (what does this line mean) and worst at edge cases involving recent changes.

Is it legal to use an AI tool to prepare taxes?

Yes, for your own returns. For paid preparation of others' returns, you're subject to PTIN rules and state preparer laws, neither of which prohibit AI assistance — but professional liability and IRS Circular 230 still apply, meaning you're personally responsible for accuracy regardless of tool used.

Related articles