Pdf form filler

From Krusty84/SKILL.md-Inspector · View interactive version

Pdf form filler is an AI agent skill from the GitHub repository Krusty84/SKILL.md-Inspector. Fill interactive PDF forms (AcroForm) with user-provided data, verify every field, and deliver a flattened copy. Use when the user asks to fill in, complete, or populate a PDF form, provides data alongside a fillable PDF, or mentions PDF form fields, checkboxes, or dropdowns. Do not use for creating

How to use this skill

Skill file

PDF Form Filler

Fill AcroForm PDFs programmatically and prove the result is correct before

handing it over. The failure mode to design against: a form that looks filled

in one viewer but shows empty fields in another.

Quick start

python scripts/fill_form.py --list form.pdf              # discover fields
python scripts/fill_form.py form.pdf data.json out.pdf   # fill + flatten

Workflow

1. Inspect the form

Run scripts/fill_form.py --list to dump every field with its type, current

value, and (for choices) allowed options.

not attempt to overlay text at guessed coordinates.

the page number and nearby label text; see

references/field-types.md for how each field

type reports its label.

2. Map user data to fields

Build a JSON object of field_name: value. Rules that prevent the common bugs:

custom) — true does not work. --list prints the export value.

user's value is not in the list, ask — do not pick the "closest" option.

If any required data is missing or ambiguous (e.g. two date fields, one date

provided), ask the user before filling.

3. Fill and flatten

Run the fill script. It sets NeedAppearances, writes values, and flattens so

the values render everywhere. Flattening makes fields read-only — if the user

wants the form to stay editable, pass --no-flatten and warn them some viewers

may not show the values.

4. Verify (mandatory)

  1. Re-open the output and dump field values (or text, if flattened); confirm

every value you set is present and correct.

  1. Render page 1 to an image and look at it: values must sit inside their

boxes, not truncated, checkboxes visibly ticked.

  1. Confirm page count and non-form content are unchanged from the input.

Any mismatch → fix the mapping and repeat. Do not deliver unverified output.

5. Deliver

Send the output file plus a short table of field → value that was filled, and

list any fields intentionally left blank.

Edge cases

protection.

say so explicitly rather than producing a file that only works in Acrobat.

hinted format exactly.

flattened truncation is invisible to them otherwise.

Files

| File | When to read it |

|---|---|

| references/field-types.md | Field-type quirks: export values, radio hierarchies, rich-text fields |

| scripts/fill_form.py | The fill/list/flatten implementation (pypdf) |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.