fill-form — команда для Claude Code: заполнение PDF
Команда fill-form для Claude Code заполняет поля интерактивной PDF-формы. Агент показывает поля в просмотрщике, помогает определить их назначение и просит подтвердить результат.
Apache-2.0 ★ 36 654 обновлён 2026-10-24
/plugin marketplace add anthropics/knowledge-work-plugins
/plugin install pdf-viewer@knowledge-work-pluginsЧто делает fill-form
Команда помогает заполнить PDF-форму в просмотрщике с визуальной обратной связью. Для простой формы просмотрщик может запросить значения до открытия документа. В сложной форме агент изучает список полей, а для неясных названий делает снимки страницы и сопоставляет поля с подписями на ней.
Значения берутся из контекста разговора или уточняются у пользователя. После заполнения агент показывает снимки готовых страниц для проверки; поля можно редактировать прямо в просмотрщике. Подпись обычно заполняется отдельно командой /pdf-viewer:sign.
Какие задачи решает
- заполнить поля PDF-формы по данным из разговора
- разобраться, каким полям с техническими именами соответствуют подписи на странице
- проверить заполненные поля по снимкам страниц
- исправить значение поля прямо в просмотрщике
Примеры запросов агенту
- Заполни форму в
application.pdfмоими данными из разговора. - Посмотри, что означают поля
Text1иField_7вapplication.pdf, и помоги заполнить их. - Покажи снимки заполненных страниц
application.pdf, чтобы я проверил форму.
Как установить fill-form
1Через маркетплейс плагинов
/plugin marketplace add anthropics/knowledge-work-plugins/plugin install pdf-viewer@knowledge-work-plugins2Вручную: положить файлы
.claude/commands/fill-form.mdВызов — /fill-form. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/fill-form.mdВызов — /prompts:fill-form. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/fill-form.prompt.mdВручную: положить файлы
.gemini/commands/fill-form.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы о fill-form
Как установить fill-form в Claude Code?
Добавь маркетплейс командой /plugin marketplace add anthropics/knowledge-work-plugins, затем установи плагин командой /plugin install pdf-viewer@knowledge-work-plugins. Файл команды находится по пути .claude/commands/fill-form.md.
Что делает fill-form?
Команда помогает заполнить PDF-форму в просмотрщике. Для неясных имён полей агент смотрит на подписи рядом с ними, а после заполнения показывает снимки страниц.
Как fill-form работает с полями без понятных имён?
Агент делает снимки страниц и определяет назначение поля по визуальной подписи рядом с ним. Значение можно взять из контекста разговора или запросить у пользователя.
Исходный текст
fill-form.md · Apache-2.0
---
description: Fill PDF form fields interactively with live visual feedback
argument-hint: "[path-or-url]"
---
> If you need to check which tools are connected, see [CONNECTORS.md](../CONNECTORS.md).
# Fill Form
Help the user complete a fillable PDF form in the live viewer. Unlike
programmatic form tools, this gives the user **direct visual feedback**
on every field as it's filled, with easy undo/edit in the viewer.
## Why use this instead of programmatic form filling
- **Visual confirmation** — the user sees each value land in the right
box, not just a success message
- **Unnamed/unlabeled fields** — many real-world PDFs have fields with
machine names like `Text1`, `Field_7`, or no name at all. The label
("Date of Birth", "SSN") is printed **next to** the field on the
rendered page, not in the field metadata. Use `get_screenshot` to
see what each field actually is, then fill by name.
- **Easy correction** — the user can edit or clear any field directly
in the viewer, or ask you to `fill_form` again with new values
## Two approaches
### User-driven (simple, well-labeled forms)
Call `display_pdf` with `elicit_form_inputs: true`. The server detects
form fields and prompts the user to enter values **before** the viewer
opens. The filled PDF is then displayed.
### AI-assisted (complex forms, unnamed fields, or when you have context)
1. `display_pdf` (without elicit) — inspect returned `formFields`
(name, type, page, bounding box)
2. If field names are cryptic (`Text1`, `Field_7`), use `interact` →
`get_screenshot` of each page with fields. Look at the visual
labels next to each bounding box to understand what each field is.
3. For each field, either:
- Infer the value from conversation context (name, date, email)
- Ask the user, describing the field by its **visual** label
("the 'Date of Birth' box on page 1")
4. `interact` → `fill_form` with `fields: [{name, value}, ...]`
5. `interact` → `get_screenshot` of each filled page
6. Show the user, ask them to confirm or edit
## Example
> **User:** Help me fill out this W-9
>
> *You:* `display_pdf` → formFields: `f1_1`, `f1_2`, `f1_3`, `c1_1`, ...
> (cryptic names)
>
> *You:* `interact` → `get_screenshot` page 1 → see `f1_1` is next to
> "Name", `f1_2` is "Business name", `c1_1` is the "Individual" checkbox
>
> *You:* "I can see Name, Business name, Address, TIN, and tax
> classification checkboxes. I'll fill Name and Date from what I
> know — what's your TIN and business address?"
>
> *After answers:* `interact` → `fill_form` + `get_screenshot`
>
> *You:* "Here's the filled form [screenshot]. The signature line is
> still blank — want to add your signature with `/pdf-viewer:sign`?"
## Notes
- Signature fields are usually separate — fill text first, then hand
off to `/pdf-viewer:sign` for the image
- Checkbox/radio values are `true`/`false` or the option string
- The user can always drag & edit fields directly in the viewer
© Anthropic · Apache-2.0 · anthropics/knowledge-work-plugins