[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AWJYWW5PP5HW4472D70YC1":3,"skill-same:01M7AWJYWW5PP5HW4472D70YC1":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7AWJYWW5PP5HW4472D70YC1","pdf-fill",null,"Fill out fillable PDF forms (government, legal, tax, healthcare, insurance) using PyMuPDF (fitz). Triggered when user provides a PDF and asks to fill it out, complete it, populate fields, or auto-fill data. Covers AcroForm and XFA forms, text fields, radio buttons, checkboxes, and signature fields. Enforces fabrication prevention, visual verification, and multi-section form correctness (don't check boxes you don't qualify for).","barkleesanders\u002Fclaude-code-starter","barkleesanders","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F30680901?v=4","01M7AW019CGBYWDA8MFJEN1JXC","Barklee Sanders","01M7AW01A5H994ASJ2QZPW67AV",4,"MIT","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fpdf-fill\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pdf-fill\ndescription: Fill out fillable PDF forms (government, legal, tax, healthcare, insurance) using PyMuPDF (fitz). Triggered when user provides a PDF and asks to fill it out, complete it, populate fields, or auto-fill data. Covers AcroForm and XFA forms, text fields, radio buttons, checkboxes, and signature fields. Enforces fabrication prevention, visual verification, and multi-section form correctness (don't check boxes you don't qualify for).\n---\n\n# pdf-fill — Reliable Form Filling with PyMuPDF\n\n## When to use\n\n- User uploads a fillable PDF and says: \"fill this out\", \"complete this form\", \"populate the fields\", \"auto-fill from my data\"\n- Government forms (IRS, FTB, state SOS, USCIS, VA, DMV)\n- Legal forms (court filings, sworn declarations)\n- Tax forms (1040, 1023, 990, FTB 3500A, state returns)\n- Healthcare and insurance forms\n\n## When NOT to use\n\n- Flat PDFs (no form fields). Use `image` or `image-editor` skills instead.\n- Forms that require integration with a portal API (e.g. VA.gov 21-526EZ via API). Use the dedicated skill (if one exists) if it exists.\n- Documents that need wet-ink signatures only — those have no fillable widgets.\n\n## Hard rules (NEVER violate)\n\n### Rule 1 — Fabrication prevention\n\n**Every value you fill MUST come from a verified source.** Do not invent EINs, SSNs, dates, addresses, names, dollar amounts, IRS classifications, or any other fact.\n\nSource priority:\n1. Documents the user just provided in this turn\n2. Documents in user's Drive\u002Femail\u002Flocal filesystem (verify by fetching + reading)\n3. User's prior statements in this conversation\n4. **Ask the user** if you can't find it. Never guess.\n\nApply the CLAUDE.md Document Fabrication Prevention rule: every phone number, citation, date, name must trace to a source document.\n\n### Rule 2 — Visual verification (MANDATORY)\n\nAfter filling, you **must** render the saved PDF as PNG and `Read` it as an image to confirm:\n- Text appears in the right boxes (font may render but be invisible if widget appearance stream isn't regenerated)\n- Radio buttons show their selected state with a visible mark\n- Checkboxes show ☒ not ☐ when intended\n- No fields are missing, overflowing, or rendered with garbled characters\n\n```python\nimport fitz\ndoc = fitz.open(filled_path)\nfor i, page in enumerate(doc):\n    pix = page.get_pixmap(dpi=180)\n    pix.save(f'\u002Ftmp\u002Ffilled-p{i+1}.png')\n```\n\nThen call `Read(file_path='\u002Ftmp\u002Ffilled-p1.png')` for each page. **You only see what's rendered, not what's in the PDF dict.**\n\n### Rule 3 — Multi-section forms: only fill the sections that apply\n\nMany government forms have multiple parallel sections (e.g. FTB 3500A has Part III with 6 sections — one per IRC subsection: 501(c)(3), (4), (5), (6), (7), (19); USCIS forms often have \"Section A: Petitioner \u002F Section B: Beneficiary\").\n\n**Read each section header carefully.** Headers like *\"Exemption based on IRC Section 501(c)(X) Federal Determination Letter — Check the organization's primary purpose and activity\"* are **conditional**: only fill if your entity has THAT classification. Checking boxes for a classification you don't hold is FALSE under the form's penalty-of-perjury declaration.\n\nFor multi-purpose forms (one form, many subsection users), the form header usually says \"...sections X, Y, Z, **or** A...\" — the \"or\" tells you you pick ONE.\n\n### Rule 4 — Save to a different path (avoid mutation traps)\n\n```python\ndoc = fitz.open('\u002Fpath\u002Fto\u002Fsource.pdf')\n# ... fill ...\ndoc.save('\u002Fpath\u002Fto\u002Fsource-FILLED.pdf', deflate=True)  # different filename\ndoc.close()\n```\n\nSaving back to the source path requires `incremental=True` (extra constraint) and risks data loss if filling fails halfway. Always save to a new path.\n\n### Rule 5 — Single iteration per page (weak-ref GC trap)\n\nPyMuPDF (`fitz`) widgets are weakly referenced. If you call `page.widgets()` twice and operate on widgets from the first iteration after starting the second, you get `RuntimeError: Annot is not bound to a page`.\n\n**Pattern**:\n```python\nfor page in doc:\n    for w in page.widgets():       # ONE iteration\n        if w.field_name in text_data:\n            w.field_value = text_data[w.field_name]\n            w.update()\n        elif w.field_name in radio_targets:\n            target = radio_targets[w.field_name]\n            if w.on_state() == target:\n                w.field_value = target\n                w.update()\n```\n\nAnti-pattern (will GC-crash):\n```python\nws1 = list(page.widgets())       # iteration A\nfor w in ws1: ...                # OK so far\nfor w in page.widgets():         # iteration B starts\n    ...\nws1[0].field_value = \"x\"; ws1[0].update()  # ❌ RuntimeError: not bound to a page\n```\n\n## The fill workflow (six phases)\n\n### Phase 1 — Inspect\n\nDump every widget's name, type, position, and current value. This is the field map.\n\n```python\nimport fitz\ndoc = fitz.open('\u002Fpath\u002Fto\u002Fform.pdf')\nfor i, page in enumerate(doc):\n    print(f\"=== Page {i+1}: {len(list(page.widgets()))} widgets ===\")\n    for w in page.widgets():\n        r = w.rect\n        kind = {2:\"CB\", 3:\"RB\", 4:\"TXT\", 5:\"LB\", 7:\"SIG\"}.get(w.field_type, str(w.field_type))\n        print(f\"  y={round(r.y0):4} x={round(r.x0):4} w={round(r.x1-r.x0):3} [{kind:3}] {w.field_name!r}\")\n```\n\nNote: many government forms label widgets by ordinal (`Form 1001`, `Form 1002`...) not by semantic name. You'll need Phase 2 to map them.\n\n### Phase 2 — Render the blank form + map fields to labels\n\nGovernment PDF widgets often have meaningless names. To map widget → form label:\n\n```python\nfor i, page in enumerate(doc):\n    pix = page.get_pixmap(dpi=200)\n    pix.save(f'\u002Ftmp\u002Fform-p{i+1}.png')\n```\n\nThen `Read(file_path='\u002Ftmp\u002Fform-p1.png')` and visually correlate each widget's `(y, x)` position with the printed label on that page. Cross-check with `doc[i].get_text()` to get the label text in reading order.\n\nThe widget at the highest y-coordinate near a labeled blank is your match.\n\n### Phase 3 — Gather verified data\n\nBuild a dict mapping `field_name -> value`. **Every value must have a source.**\n\nIf you don't have a value for a field:\n- For optional fields (phone, fax) → leave blank\n- For required fields → ask the user. Never invent.\n- For date-of-signature → leave blank (wet-sign on paper)\n\n### Phase 4 — Fill (single pass per page)\n\n```python\ndoc = fitz.open(src)\ntext_data = { 'Form 1001': 'C4752548', 'Form 1003': 'Example Nonprofit Inc.', ... }\nradio_targets = { 'Form 1021 RB': '1' }   # 'on_state' value of chosen radio\n\nfor page in doc:\n    for w in page.widgets():\n        if w.field_name in text_data:\n            w.field_value = text_data[w.field_name]\n            w.update()\n        elif w.field_name in radio_targets:\n            target = radio_targets[w.field_name]\n            if w.on_state() == target:\n                w.field_value = target\n                w.update()\n        # checkboxes: set field_value to 'Yes' or the on-state from w.button_states()\ndoc.save(dst, deflate=True)\ndoc.close()\n```\n\n### Phase 5 — Verify in the dict\n\nRe-open and confirm every intended field is non-empty \u002F non-Off:\n\n```python\ndoc2 = fitz.open(dst)\nfor pg in range(len(doc2)):\n    for w in doc2[pg].widgets():\n        v = w.field_value\n        if v and v != 'Off':\n            print(f\"  p{pg+1} {w.field_name!r:30} = {v!r}\")\n```\n\n### Phase 6 — Visual verification (MANDATORY)\n\nRender every page as PNG and Read it back:\n\n```python\nfor i, page in enumerate(doc2):\n    pix = page.get_pixmap(dpi=180)\n    pix.save(f'\u002Ftmp\u002Ffilled-p{i+1}.png')\n```\n\nThen `Read(file_path='\u002Ftmp\u002Ffilled-p1.png')` for each page. Confirm text is visible, checkboxes are checked, no overflow, no garbled glyphs.\n\n**Why this is mandatory**: `widget.update()` writes the value to the PDF's form dictionary BUT does not always regenerate the visible \"appearance stream\" on government XFA forms. The form data is there; the print rendering may not show it. This trap broke a VA disability filing in 2026-04 — only visual rendering catches it.\n\nIf the rendered PNG shows blank where a value should be:\n- Force appearance regeneration: set `w.field_value`, call `w.update()`, then explicitly call `w.button_states()` once to trigger the recompute, OR\n- Use `pikepdf` to flatten + regenerate, OR\n- Fall back to overlay: draw text on top of the widget's `rect` with `page.insert_text()`\n\n## Radio button & checkbox API reference\n\n`fitz` represents radio groups oddly:\n\n- Each radio **option** is a separate widget. They all share the same `field_name` (e.g. `\"Form 1021 RB\"`).\n- Each widget has a unique `on_state()` method that returns a **string** like `'0'`, `'1'`, `'2'` — the export value when THAT specific option is selected.\n- To select an option: find the widget whose `on_state() == target_string` and set `field_value = target_string`.\n- Setting one option to its on-state automatically deselects the others (radio group semantics enforced by `rb_parent`).\n- Inspect available options via `widget.button_states()`:\n  ```\n  {'normal': ['1'], 'down': ['1', 'Off']}\n  ```\n\nFor Yes\u002FNo questions, you usually have two widgets sharing one `field_name`:\n- Widget A: `on_state() == '0'`, at the left position (typically \"Yes\")\n- Widget B: `on_state() == '1'`, at the right position (typically \"No\")\n\nConfirm by checking widget `rect.x0` against the visual layout — `x0=506` is left column, `x0=547` is right column on FTB 3500A.\n\n**Checkboxes** (single, independent) work the same way: get `w.button_states()['normal']`, pick the non-`'Off'` value, set `w.field_value = that_value`.\n\n## Common traps catalog\n\n| Trap | Symptom | Fix |\n|---|---|---|\n| `RuntimeError: Annot is not bound to a page` | Crash on `w.update()` | Single iteration per page; don't reuse widget references across `page.widgets()` calls |\n| `ValueError: save to original must be incremental` | Save fails | Save to a different path, not the source |\n| Text fills but PDF renders blank | Visual check fails | Appearance stream not regenerated; use overlay fallback or `pikepdf` flatten |\n| Radio button stays \"Off\" after setting `field_value=1` | Numeric vs string | `on_state()` returns string; set `field_value='1'` not `1` |\n| Wrong field gets filled | Widget names are meaningless ordinals | Render + map by `(y, x)` position before assigning |\n| Form filled correctly but multi-section \"incomplete\" complaint from user | Multi-purpose form | Explain Rule 3 — only fill sections matching your classification |\n| EIN\u002Fdate\u002Fcitation comes from \"memory\" | Fabrication risk | Always trace to a source document; ask if unverified |\n| Save succeeds but next open shows no fills | `incremental` save without flush | Use `doc.save(path, deflate=True)` then `doc.close()` |\n| User reports field overflow | Long values in narrow widgets | Check `w.rect` width; abbreviate or use multi-line field if available |\n| Two widgets same `field_name`, both filled | Tried to fill both halves of a radio | Only set the WIDGET WHOSE on_state matches your choice |\n\n## Multi-section perjury check\n\nBefore declaring done on any government form with parallel sections:\n\n1. Identify the form's main classification (e.g. \"this is a 501(c)(3) filing\")\n2. For each multi-section block, identify which sections are conditional on classifications you DO hold\n3. Only fill those sections\n4. Leave the other sections blank\n5. When a user says \"you missed filling section X\" — verify which classification section X conditions on. If user doesn't hold it, explain the perjury risk; do NOT fill on user instruction without that verification.\n\n## File outputs\n\n- Always save filled PDF to `~\u002FDownloads\u002F\u003Coriginal-name>-FILLED.pdf` (or user-specified path)\n- Render verification PNGs to `\u002Ftmp\u002F\u003Cform>-FILLED-p\u003CN>.png` (ephemeral)\n- After verification, `open \u003Cpath>` the filled PDF so user can preview before signing\n- Tell user explicitly what's filled, what's blank, and why\n\n## Reference incident (2026-05-26 — FTB 3500A for Example Nonprofit Inc.)\n\n- 96 widgets, 32 fields needed filling\n- Verified every value from source: IRS determination letter (OCR'd from Drive), governance package, tax-return prep README\n- Skipped Part III sections 2-6 (501(c)(4)–(c)(19)) because Example Org is a 501(c)(3) only — checking those would be perjury\n- User initially asked \"why didn't you fill sections 2-6?\" — answered with form text quote: \"Exemption based on IRC Section 501(c)(X) Federal Determination Letter — Check the organization's primary purpose and activity\" is conditional on holding subsection X\n- Visual verification caught the radio buttons rendering with proper marks; text widgets all rendered correctly\n\n## Related skills\n\n- `docuseal-cli` — for e-signature workflows (when applicable, but most gov forms require wet ink)\n- `image` — for non-fillable PDFs that need annotation overlays\n","# pdf-fill — Reliable Form Filling with PyMuPDF\n\n## When to use\n\n- User uploads a fillable PDF and says: \"fill this out\", \"complete this form\", \"populate the fields\", \"auto-fill from my data\"\n- Government forms (IRS, FTB, state SOS, USCIS, VA, DMV)\n- Legal forms (court filings, sworn declarations)\n- Tax forms (1040, 1023, 990, FTB 3500A, state returns)\n- Healthcare and insurance forms\n\n## When NOT to use\n\n- Flat PDFs (no form fields). Use `image` or `image-editor` skills instead.\n- Forms that require integration with a portal API (e.g. VA.gov 21-526EZ via API). Use the dedicated skill (if one exists) if it exists.\n- Documents that need wet-ink signatures only — those have no fillable widgets.\n\n## Hard rules (NEVER violate)\n\n### Rule 1 — Fabrication prevention\n\n**Every value you fill MUST come from a verified source.** Do not invent EINs, SSNs, dates, addresses, names, dollar amounts, IRS classifications, or any other fact.\n\nSource priority:\n1. Documents the user just provided in this turn\n2. Documents in user's Drive\u002Femail\u002Flocal filesystem (verify by fetching + reading)\n3. User's prior statements in this conversation\n4. **Ask the user** if you can't find it. Never guess.\n\nApply the CLAUDE.md Document Fabrication Prevention rule: every phone number, citation, date, name must trace to a source document.\n\n### Rule 2 — Visual verification (MANDATORY)\n\nAfter filling, you **must** render the saved PDF as PNG and `Read` it as an image to confirm:\n- Text appears in the right boxes (font may render but be invisible if widget appearance stream isn't regenerated)\n- Radio buttons show their selected state with a visible mark\n- Checkboxes show ☒ not ☐ when intended\n- No fields are missing, overflowing, or rendered with garbled characters\n\n```python\nimport fitz\ndoc = fitz.open(filled_path)\nfor i, page in enumerate(doc):\n    pix = page.get_pixmap(dpi=180)\n    pix.save(f'\u002Ftmp\u002Ffilled-p{i+1}.png')\n```\n\nThen call `Read(file_path='\u002Ftmp\u002Ffilled-p1.png')` for each page. **You only see what's rendered, not what's in the PDF dict.**\n\n### Rule 3 — Multi-section forms: only fill the sections that apply\n\nMany government forms have multiple parallel sections (e.g. FTB 3500A has Part III with 6 sections — one per IRC subsection: 501(c)(3), (4), (5), (6), (7), (19); USCIS forms often have \"Section A: Petitioner \u002F Section B: Beneficiary\").\n\n**Read each section header carefully.** Headers like *\"Exemption based on IRC Section 501(c)(X) Federal Determination Letter — Check the organization's primary purpose and activity\"* are **conditional**: only fill if your entity has THAT classification. Checking boxes for a classification you don't hold is FALSE under the form's penalty-of-perjury declaration.\n\nFor multi-purpose forms (one form, many subsection users), the form header usually says \"...sections X, Y, Z, **or** A...\" — the \"or\" tells you you pick ONE.\n\n### Rule 4 — Save to a different path (avoid mutation traps)\n\n```python\ndoc = fitz.open('\u002Fpath\u002Fto\u002Fsource.pdf')\n# ... fill ...\ndoc.save('\u002Fpath\u002Fto\u002Fsource-FILLED.pdf', deflate=True)  # different filename\ndoc.close()\n```\n\nSaving back to the source path requires `incremental=True` (extra constraint) and risks data loss if filling fails halfway. Always save to a new path.\n\n### Rule 5 — Single iteration per page (weak-ref GC trap)\n\nPyMuPDF (`fitz`) widgets are weakly referenced. If you call `page.widgets()` twice and operate on widgets from the first iteration after starting the second, you get `RuntimeError: Annot is not bound to a page`.\n\n**Pattern**:\n```python\nfor page in doc:\n    for w in page.widgets():       # ONE iteration\n        if w.field_name in text_data:\n            w.field_value = text_data[w.field_name]\n            w.update()\n        elif w.field_name in radio_targets:\n            target = radio_targets[w.field_name]\n            if w.on_state() == target:\n                w.field_value = target\n                w.update()\n```\n\nAnti-pattern (will GC-crash):\n```python\nws1 = list(page.widgets())       # iteration A\nfor w in ws1: ...                # OK so far\nfor w in page.widgets():         # iteration B starts\n    ...\nws1[0].field_value = \"x\"; ws1[0].update()  # ❌ RuntimeError: not bound to a page\n```\n\n## The fill workflow (six phases)\n\n### Phase 1 — Inspect\n\nDump every widget's name, type, position, and current value. This is the field map.\n\n```python\nimport fitz\ndoc = fitz.open('\u002Fpath\u002Fto\u002Fform.pdf')\nfor i, page in enumerate(doc):\n    print(f\"=== Page {i+1}: {len(list(page.widgets()))} widgets ===\")\n    for w in page.widgets():\n        r = w.rect\n        kind = {2:\"CB\", 3:\"RB\", 4:\"TXT\", 5:\"LB\", 7:\"SIG\"}.get(w.field_type, str(w.field_type))\n        print(f\"  y={round(r.y0):4} x={round(r.x0):4} w={round(r.x1-r.x0):3} [{kind:3}] {w.field_name!r}\")\n```\n\nNote: many government forms label widgets by ordinal (`Form 1001`, `Form 1002`...) not by semantic name. You'll need Phase 2 to map them.\n\n### Phase 2 — Render the blank form + map fields to labels\n\nGovernment PDF widgets often have meaningless names. To map widget → form label:\n\n```python\nfor i, page in enumerate(doc):\n    pix = page.get_pixmap(dpi=200)\n    pix.save(f'\u002Ftmp\u002Fform-p{i+1}.png')\n```\n\nThen `Read(file_path='\u002Ftmp\u002Fform-p1.png')` and visually correlate each widget's `(y, x)` position with the printed label on that page. Cross-check with `doc[i].get_text()` to get the label text in reading order.\n\nThe widget at the highest y-coordinate near a labeled blank is your match.\n\n### Phase 3 — Gather verified data\n\nBuild a dict mapping `field_name -> value`. **Every value must have a source.**\n\nIf you don't have a value for a field:\n- For optional fields (phone, fax) → leave blank\n- For required fields → ask the user. Never invent.\n- For date-of-signature → leave blank (wet-sign on paper)\n\n### Phase 4 — Fill (single pass per page)\n\n```python\ndoc = fitz.open(src)\ntext_data = { 'Form 1001': 'C4752548', 'Form 1003': 'Example Nonprofit Inc.', ... }\nradio_targets = { 'Form 1021 RB': '1' }   # 'on_state' value of chosen radio\n\nfor page in doc:\n    for w in page.widgets():\n        if w.field_name in text_data:\n            w.field_value = text_data[w.field_name]\n            w.update()\n        elif w.field_name in radio_targets:\n            target = radio_targets[w.field_name]\n            if w.on_state() == target:\n                w.field_value = target\n                w.update()\n        # checkboxes: set field_value to 'Yes' or the on-state from w.button_states()\ndoc.save(dst, deflate=True)\ndoc.close()\n```\n\n### Phase 5 — Verify in the dict\n\nRe-open and confirm every intended field is non-empty \u002F non-Off:\n\n```python\ndoc2 = fitz.open(dst)\nfor pg in range(len(doc2)):\n    for w in doc2[pg].widgets():\n        v = w.field_value\n        if v and v != 'Off':\n            print(f\"  p{pg+1} {w.field_name!r:30} = {v!r}\")\n```\n\n### Phase 6 — Visual verification (MANDATORY)\n\nRender every page as PNG and Read it back:\n\n```python\nfor i, page in enumerate(doc2):\n    pix = page.get_pixmap(dpi=180)\n    pix.save(f'\u002Ftmp\u002Ffilled-p{i+1}.png')\n```\n\nThen `Read(file_path='\u002Ftmp\u002Ffilled-p1.png')` for each page. Confirm text is visible, checkboxes are checked, no overflow, no garbled glyphs.\n\n**Why this is mandatory**: `widget.update()` writes the value to the PDF's form dictionary BUT does not always regenerate the visible \"appearance stream\" on government XFA forms. The form data is there; the print rendering may not show it. This trap broke a VA disability filing in 2026-04 — only visual rendering catches it.\n\nIf the rendered PNG shows blank where a value should be:\n- Force appearance regeneration: set `w.field_value`, call `w.update()`, then explicitly call `w.button_states()` once to trigger the recompute, OR\n- Use `pikepdf` to flatten + regenerate, OR\n- Fall back to overlay: draw text on top of the widget's `rect` with `page.insert_text()`\n\n## Radio button & checkbox API reference\n\n`fitz` represents radio groups oddly:\n\n- Each radio **option** is a separate widget. They all share the same `field_name` (e.g. `\"Form 1021 RB\"`).\n- Each widget has a unique `on_state()` method that returns a **string** like `'0'`, `'1'`, `'2'` — the export value when THAT specific option is selected.\n- To select an option: find the widget whose `on_state() == target_string` and set `field_value = target_string`.\n- Setting one option to its on-state automatically deselects the others (radio group semantics enforced by `rb_parent`).\n- Inspect available options via `widget.button_states()`:\n  ```\n  {'normal': ['1'], 'down': ['1', 'Off']}\n  ```\n\nFor Yes\u002FNo questions, you usually have two widgets sharing one `field_name`:\n- Widget A: `on_state() == '0'`, at the left position (typically \"Yes\")\n- Widget B: `on_state() == '1'`, at the right position (typically \"No\")\n\nConfirm by checking widget `rect.x0` against the visual layout — `x0=506` is left column, `x0=547` is right column on FTB 3500A.\n\n**Checkboxes** (single, independent) work the same way: get `w.button_states()['normal']`, pick the non-`'Off'` value, set `w.field_value = that_value`.\n\n## Common traps catalog\n\n| Trap | Symptom | Fix |\n|---|---|---|\n| `RuntimeError: Annot is not bound to a page` | Crash on `w.update()` | Single iteration per page; don't reuse widget references across `page.widgets()` calls |\n| `ValueError: save to original must be incremental` | Save fails | Save to a different path, not the source |\n| Text fills but PDF renders blank | Visual check fails | Appearance stream not regenerated; use overlay fallback or `pikepdf` flatten |\n| Radio button stays \"Off\" after setting `field_value=1` | Numeric vs string | `on_state()` returns string; set `field_value='1'` not `1` |\n| Wrong field gets filled | Widget names are meaningless ordinals | Render + map by `(y, x)` position before assigning |\n| Form filled correctly but multi-section \"incomplete\" complaint from user | Multi-purpose form | Explain Rule 3 — only fill sections matching your classification |\n| EIN\u002Fdate\u002Fcitation comes from \"memory\" | Fabrication risk | Always trace to a source document; ask if unverified |\n| Save succeeds but next open shows no fills | `incremental` save without flush | Use `doc.save(path, deflate=True)` then `doc.close()` |\n| User reports field overflow | Long values in narrow widgets | Check `w.rect` width; abbreviate or use multi-line field if available |\n| Two widgets same `field_name`, both filled | Tried to fill both halves of a radio | Only set the WIDGET WHOSE on_state matches your choice |\n\n## Multi-section perjury check\n\nBefore declaring done on any government form with parallel sections:\n\n1. Identify the form's main classification (e.g. \"this is a 501(c)(3) filing\")\n2. For each multi-section block, identify which sections are conditional on classifications you DO hold\n3. Only fill those sections\n4. Leave the other sections blank\n5. When a user says \"you missed filling section X\" — verify which classification section X conditions on. If user doesn't hold it, explain the perjury risk; do NOT fill on user instruction without that verification.\n\n## File outputs\n\n- Always save filled PDF to `~\u002FDownloads\u002F\u003Coriginal-name>-FILLED.pdf` (or user-specified path)\n- Render verification PNGs to `\u002Ftmp\u002F\u003Cform>-FILLED-p\u003CN>.png` (ephemeral)\n- After verification, `open \u003Cpath>` the filled PDF so user can preview before signing\n- Tell user explicitly what's filled, what's blank, and why\n\n## Reference incident (2026-05-26 — FTB 3500A for Example Nonprofit Inc.)\n\n- 96 widgets, 32 fields needed filling\n- Verified every value from source: IRS determination letter (OCR'd from Drive), governance package, tax-return prep README\n- Skipped Part III sections 2-6 (501(c)(4)–(c)(19)) because Example Org is a 501(c)(3) only — checking those would be perjury\n- User initially asked \"why didn't you fill sections 2-6?\" — answered with form text quote: \"Exemption based on IRC Section 501(c)(X) Federal Determination Letter — Check the organization's primary purpose and activity\" is conditional on holding subsection X\n- Visual verification caught the radio buttons rendering with proper marks; text widgets all rendered correctly\n\n## Related skills\n\n- `docuseal-cli` — for e-signature workflows (when applicable, but most gov forms require wet ink)\n- `image` — for non-fillable PDFs that need annotation overlays\n",{"name":5,"description":7},"main","e7b39d448c7d905feed2b044d3ccdf60822596ab","skills\u002Fpdf-fill",0,"https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter","https:\u002F\u002Fgithub.com\u002Fbarkleesanders","barkleesanders.com","Stay Hungry, Stay Foolish","2026-11-06 08:47:06",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add barkleesanders\u002Fclaude-code-starter --skill pdf-fill",{"tool":39,"command":40},"bunx","bunx skills add barkleesanders\u002Fclaude-code-starter --skill pdf-fill",{"tool":42,"command":43},"pnpm","pnpm dlx skills add barkleesanders\u002Fclaude-code-starter --skill pdf-fill","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fpdf-fill\u002FSKILL.md",true,[],[48,54,61,68,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7AWV75B37B6YKG7ZKGZ783F","zi-search","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fzi-search\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7AWTZA3JGK1T7V1HS543FG7","visualise","Render inline interactive visuals — SVG diagrams, HTML widgets, charts, and explainers — directly in the conversation. Use this skill whenever the user asks to visualize, diagram, chart, illustrate, or explain something visually, or when an explanation would genuinely benefit from a spatial\u002Finteractive diagram rather than text. Also triggers for: flowcharts, architecture diagrams, data visualizations, interactive explainers, comparison layouts, UI mockups, and any request containing 'show me', 'draw', 'map out', 'visualize', or 'diagram'. Even when the user doesn't explicitly ask for a visual, use this skill proactively when the topic has spatial, sequential, or systemic relationships that a diagram would clarify better than prose.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvisualise\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7AWTR056C3P9R3VS8YVM2WX","video","When the user wants to create, generate, or produce video content using AI tools or programmatic frameworks. Also use when the user mentions 'video production,' 'AI video,' 'Remotion,' 'Hyperframes,' 'HeyGen,' 'Synthesia,' 'Veo,' 'Runway,' 'Kling,' 'Pika,' 'video generation,' 'AI avatar,' 'talking head video,' 'programmatic video,' 'video template,' 'explainer video,' 'product demo video,' 'video pipeline,' or 'make me a video.' Use this for video creation, generation, and production workflows. For video content strategy and what to post, see social-content. For paid video ad creative, see ad-creative.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7AWTHTWBMTYZPMHHEYX3TTG","manim-video","Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric\u002Fmathematical content.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002Fskills\u002Fmanim-video\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7AWTCXDJ9NWFQW51ENM8A2Z","video-use","Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7AWTA1D5FP895S33GHSA2G5","ui-improver","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fui-improver\u002FSKILL.md",[],[]]