← Back to library

Fill PDF forms from your own documents with an agent

Jerry Liu built and open-sourced a form-filling app on the Claude Code SDK. You upload a fillable PDF and the documents holding the answers, then chat with the agent: it finds each field, stages values, lets you review the pending edits before saving, and later changes only the fields you name.

  • OutcomeUpload a fillable PDF and the documents that hold the answers; the agent stages a value for each field, shows you the pending edits and saves the filled form.
  • SetupUnder an hour
  • LevelIntermediate
  • CreditJerry Liu (@jerryjliu0)
View original
Works with
Claude CodeClaude

Published Oct 20, 2026Updated Oct 20, 2026AI dry run on sample input: passed Oct 20, 2026Source verified Oct 23, 2026

When should you use it?

  • Vendor onboarding, W-9 and insurance forms filled from documents you already have
  • CPA firms preparing client forms from source documents
  • HR forms filled from offer letters and IDs

Not for: Forms you sign without reading every field

What do you need, and what do you get?

You need

  • A fillable PDF form
  • Context documents with the answers
  • The app (hosted or run locally) or Claude Code

You get

  • Filled PDF form
  • List of staged edits to review

How does it work, step by step?

  1. Choose where to run itUse the author's hosted app, or run the open-source repository locally for sensitive documents.
  2. Upload the form and contextAdd the fillable PDF plus the documents that contain the answers.
  3. Review pending editsRead the staged values before committing; this is the step that makes it safe.
  4. Edit in follow-upsAsk for specific changes; the agent only touches the fields you mention.

The prompt

The original prompt by Jerry Liu (@jerryjliu0), word for word, with a link to where it was published. Below it is our adapted version with fill-in blanks, if you want it. Works in Claude Code and Claude. Values in lime are placeholders.

Original prompt by Jerry Liu (@jerryjliu0)

Word for wordby Jerry Liu (@jerryjliu0)
You are a form-filling agent. Your job is to fill out PDF forms based on user instructions.

## Available Tools:
- load_pdf: Load a PDF file
- list_all_fields: See all form fields (includes current values if already filled)
- search_fields: Find fields matching a query
- get_field_details: Get details about a specific field
- set_field: Stage a value for a field
- get_pending_edits: Review staged edits
- commit_edits: Apply all edits and save

## Workflow:
1. Call load_pdf with the PDF path
2. Call list_all_fields to see all fields (and their current values if this is a continuation)
3. For each value to fill or update:
   a. Search for the matching field if needed
   b. Call set_field to stage the edit
4. Call get_pending_edits to review
5. Call commit_edits with the output path to save

Exactly as published by Jerry Liu (@jerryjliu0) in Launch post for an open-source form-filling agent (code at github.com/jerryjliu/form_filling_app).

Our adapted version (optional)

Fill in the blanks (optional; the copied prompt uses your values)

Adapted prompt2 variables
Fill the attached PDF form using only the attached documents.
1) List every field on the form.
2) For each field, propose a value and the document it came from. Leave a field blank and say why if the documents don't contain the answer; never guess.
3) Flag any conflicts between documents.
4) Show me all proposed values as a table and wait for my OK before writing the file. In later turns, change only the fields I name.

Form: {form_name}. Documents: {context_files}.

What can go wrong?

  • It handles personal data; run it locally or with tools your firm has approved.
  • Scanned, non-fillable PDFs have no fields to fill.

Our take

Form filling is dull work that's easy to get slightly wrong, and the design choice here that matters is stage-then-review: the agent proposes a value for every field, you see the full list of pending edits, and only then is the file saved. Follow-up turns change only the fields you name, which avoids the usual problem of a chat assistant redoing everything. We left out the post's speed and quality comparisons; the design stands on its own. In our dry run we followed the prompt's workflow with a sample fillable W-9 and a mock vendor profile: it listed eleven fields, staged eight values, left the exemption fields blank as the profile didn't cover them, and asked about one conflicting address before committing. Our adapted prompt adds a rule to never guess a value. For client work, keep the staged-edits table with the filed form so you can show where each value came from if a question arises later.

Where the time goes back: Copying values from documents into form fields becomes a review of staged answers.

FAQ

What's the license?
The repository README states MIT. We reproduce the opening of the agent's system prompt with credit and a link.
Why stage edits instead of filling directly?
Holding the values for review first lets you check each one before the file is written, which matters for tax and HR forms.

Source and credit

The original prompt on this page is by Jerry Liu (@jerryjliu0), shown word for word with a link to where it was published. The summary, notes and adapted version are ours.

Original
Launch post for an open-source form-filling agent (code at github.com/jerryjliu/form_filling_app)
Creator
Jerry Liu (@jerryjliu0)
Published on
X / GitHub
Original date
Jan 7, 2026
License
MIT
Originally for
Claude Code
AI dry run
Oct 20, 2026: passed. Dry-run tested by our AI test agent on sample input. Stage-then-review respected; no guesses.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

The original is licensed under the MIT License (© Jerry Liu; license as stated in the repository README). The original prompt above is reproduced under that license with its copyright notice; our adapted prompt and summary are our own wording.

Are you the creator? Claim or correct this page.

More in Operations & Admin

All 225 Operations & Admin playbooks →

Related playbooks

Operations & AdminSkill✓ AI dry run

Have Claude fill PDF forms, even ones with no fields

Give Claude the pdf skill so that when you hand it a form and the answers, it first checks whether the file has real form fields, fills those by their IDs if it does, places text by measured coordinates on flat or scanned forms if it does not, validates every box before writing, and renders the filled pages as images so you can see where each answer landed before you sign or send it.

Credit: Anthropic

Minutes
Operations & AdminPrompt✓ AI dry run

Rewrite a task prompt to go deeper, not bigger

Before handing an AI an important piece of work, have it explain how a leading practitioner would approach the job, which raw inputs and methods they would use, and what independent check would prove the answer right, then rewrite your request around those answers before any work starts.

Credit: Felix Rieseberg

Minutes
Operations & AdminPrompt✓ AI dry run

Hand one back-office job to your assistant, starting small

Pick a manual admin job such as invoicing, email routing or stock tracking, let your assistant interview you about how you do it now, then try it on a single real example with a clear way to check the result before you hand over more.

Credit: Michael Fenech (@Michael_Fenech_)

Minutes
Operations & AdminSkill✓ AI dry run

Prepare a focused brief for your next skip-level 1:1

Before a recurring 1:1 with a senior leader, have an agent check what carried over from last time, gather what changed since and draft a short agenda with at most two asks, plus an after-meeting checklist.

Credit: ehnruiz

Under an hour
Operations & AdminRoutine✓ AI dry run

Get a weekly performance report on your rental listings

Have an agent review your short-term rental pricing and bookings every week and send a short report with suggested price changes you approve.

Credit: madaxe_again on Hacker News

Under an hour