
Fill government, vendor, or contract PDFs accurately without guessing field coordinates or skipping validation steps.
Overview
pdf is an agent skill most often used in Build (also Operate, Validate) that walks agents through detecting fillable PDF fields and filling forms with scripted field metadata instead of ad-hoc placement.
Install
npx skills add https://github.com/ailabs-393/ai-labs-claude-skills --skill pdfWhat is this skill?
- Mandatory ordered workflow: detect fillable vs non-fillable PDFs before any coding
- check_fillable_fields and extract_form_field_info.py scripts emit field_id, page, rect, and type metadata
- Supports text, checkbox, radio_group, and choice field types with checked/unchecked values
- Separate playbooks for fillable AcroForms vs raster/non-fillable pages
- PDF coordinate guidance (y=0 bottom) for correct placement on non-fillable flows
- Ordered CRITICAL steps before any form-fill code
- Field types: text, checkbox, radio_group, choice
Adoption & trust: 747 installs on skills.sh; 399 GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need a completed PDF form but the agent keeps writing code blindly and misaligns fields or ignores checkboxes and radio groups.
Who is it for?
Solo builders automating repeatable PDF paperwork (contracts, applications, compliance forms) with AcroForm or clearly mapped non-fillable pages.
Skip if: Heavy PDF redesign, bulk OCR of scanned forms without a mapping step, or teams that need a licensed visual PDF studio instead of an agent runbook.
When should I use this skill?
User needs to fill out a PDF form or asks about fillable fields, AcroForm extraction, or PDF checkbox/radio placement.
What do I get? / Deliverables
You get a correctly filled PDF after field detection, structured field_info.json, and branch-specific filling steps without skipped prerequisites.
- Filled PDF output
- field_info.json for fillable forms
- Validated fillable vs non-fillable branch decision
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Document output and automation live in Build; PDF forms are a concrete docs deliverable agents produce or complete. Docs subphase covers structured files agents generate or edit; AcroForm filling is specialized document work.
Where it fits
Generate a vendor onboarding packet and fill the signed PDF annex before handoff.
Complete a grant or accelerator application PDF with the correct checkbox and choice fields.
Refresh an annual compliance PDF template with updated field values without misaligned text.
How it compares
Use this procedural skill instead of asking the agent to "just fill the PDF" in freeform chat without field inspection.
Common Questions / FAQ
Who is pdf for?
Indie and solo builders who ship with coding agents and need reliable PDF form completion for business, legal, or onboarding documents.
When should I use pdf?
Use it in Build when generating or completing doc deliverables, in Validate when filing prototype or application PDFs, and in Operate when updating recurring compliance or vendor forms—always after running the fillable-field check.
Is pdf safe to install?
Review the Security Audits panel on this Prism page before installing; the skill runs local Python scripts on your filesystem and expects you to point them at your own PDF paths.
SKILL.md
READMESKILL.md - Pdf
**CRITICAL: You MUST complete these steps in order. Do not skip ahead to writing code.** If you need to fill out a PDF form, first check to see if the PDF has fillable form fields. Run this script from this file's directory: `python scripts/check_fillable_fields <file.pdf>`, and depending on the result go to either the "Fillable fields" or "Non-fillable fields" and follow those instructions. # Fillable fields If the PDF has fillable form fields: - Run this script from this file's directory: `python scripts/extract_form_field_info.py <input.pdf> <field_info.json>`. It will create a JSON file with a list of fields in this format: ``` [ { "field_id": (unique ID for the field), "page": (page number, 1-based), "rect": ([left, bottom, right, top] bounding box in PDF coordinates, y=0 is the bottom of the page), "type": ("text", "checkbox", "radio_group", or "choice"), }, // Checkboxes have "checked_value" and "unchecked_value" properties: { "field_id": (unique ID for the field), "page": (page number, 1-based), "type": "checkbox", "checked_value": (Set the field to this value to check the checkbox), "unchecked_value": (Set the field to this value to uncheck the checkbox), }, // Radio groups have a "radio_options" list with the possible choices. { "field_id": (unique ID for the field), "page": (page number, 1-based), "type": "radio_group", "radio_options": [ { "value": (set the field to this value to select this radio option), "rect": (bounding box for the radio button for this option) }, // Other radio options ] }, // Multiple choice fields have a "choice_options" list with the possible choices: { "field_id": (unique ID for the field), "page": (page number, 1-based), "type": "choice", "choice_options": [ { "value": (set the field to this value to select this option), "text": (display text of the option) }, // Other choice options ], } ] ``` - Convert the PDF to PNGs (one image for each page) with this script (run from this file's directory): `python scripts/convert_pdf_to_images.py <file.pdf> <output_directory>` Then analyze the images to determine the purpose of each form field (make sure to convert the bounding box PDF coordinates to image coordinates). - Create a `field_values.json` file in this format with the values to be entered for each field: ``` [ { "field_id": "last_name", // Must match the field_id from `extract_form_field_info.py` "description": "The user's last name", "page": 1, // Must match the "page" value in field_info.json "value": "Simpson" }, { "field_id": "Checkbox12", "description": "Checkbox to be checked if the user is 18 or over", "page": 1, "value": "/On" // If this is a checkbox, use its "checked_value" value to check it. If it's a radio button group, use one of the "value" values in "radio_options". }, // more fields ] ``` - Run the `fill_fillable_fields.py` script from this file's directory to create a filled-in PDF: `python scripts/fill_fillable_fields.py <input pdf> <field_values.json> <output pdf>` This script will verify that the field IDs and values you provide are valid; if it prints error messages, correct the appropriate fields and try again. # Non-fillable fields If the PDF doesn't have fillable form fields, you'll need to visually determine where the data should be added and create text annotations. Follow the below steps *exactly*. You MUST perform all of these steps to ensure that the the form is accurately completed. Details for each step are below. - Convert the PDF to PNG images and determine field bounding boxes. - Create a JSON file with field information and validation images showing the bounding boxes. - Validate the the bounding boxes. - Use the bounding boxes to fill in the form. ## Step 1: Visual Analysis (REQUIRED) - Convert the PDF to PNG images. Run this script from this f