name: auto-fill summary: Fill Word and Excel forms from reusable reference files using exact, fuzzy, and LLM-assisted semantic matching while preserving formatting and leaving unsupported fields blank. description: Fill, autofill, complete, or populate Word and Excel forms from reusable reference data. Use when the user asks to fill a .docx, .doc, .xlsx, .xlsm, or .xls form, extract references from old filled forms, bootstrap a user profile, create fill_plan.json, or complete office forms without inventing missing values. argument-hint: "[target-form] [reference-folder] [output-folder]" allowed-tools: "Read, Write, Edit, Bash(python *), Bash(python3 *), Bash(mkdir *), Bash(cp *), Bash(ls *), Bash(cat *), Bash(pwd), Bash(realpath *), Bash(soffice *), Bash(libreoffice *)"
Intelligent Office Auto-Fill Skill
Purpose
This skill fills Word and Excel forms using reusable reference documents supplied by the user.
It is designed for forms that vary in:
- layout
- language
- labels
- spacing
- merged cells
- checkboxes
- tables
- placeholders
- Word content controls
- Excel cells and tables
The skill must fill information only when it is explicitly present in the provided references or explicitly provided by the user in the current task.
Missing, ambiguous, conflicting, unclear, or unsupported fields must remain blank.
Prime directive
Never invent values.
Never infer unsupported information.
Fill a field only when the value is explicitly present in the reference files or explicitly provided by the user in the current task.
Leave fields blank when information is:
- missing
- ambiguous
- conflicting
- unsupported
- unclear
- not safely mapped to the target field
Do not directly edit Office files by hand. Always create and validate fill_plan.json first, then apply the validated plan through the project scripts.
Supported files
Target forms:
- Word:
.docx,.doc - Excel:
.xlsx,.xlsm,.xls
Reference files:
- YAML
- JSON
- CSV
- TXT
- Markdown
.docx- modern Excel files when extractable
- a directory containing multiple reference files
Legacy .doc and .xls files should be returned in the same legacy extension whenever possible.
If conversion is used, report it clearly.
If legacy conversion validation fails, keep the safest produced modern file and report that manual review is required.
Skill directory rule
This skill should run project scripts from the skill directory.
Before running project commands, resolve all user-provided paths to absolute paths.
Then run one of these commands depending on the shell:
Linux/macOS/Git Bash:
cd "$CLAUDE_SKILL_DIR"
Windows PowerShell:
cd "$env:CLAUDE_SKILL_DIR"
When copying multi-line commands, use \ only in Linux/macOS/Git Bash. In Windows PowerShell, use the backtick line-continuation character or run the command as one line.
Use absolute paths for:
- target form
- reference folder or reference files
- output directory
- bootstrap blank forms
- bootstrap filled forms
If the user does not provide an output directory, create one next to the target form named:
autofill_output
Do not store private reference data inside the skill folder unless the user explicitly asks.
Prefer user reference data outside the skill folder, for example:
~/autofill_refs/user_profile
Two workflows
There are two separate workflows:
- One-time reference bootstrap
- Normal future filling
Do not confuse them.
The bootstrap workflow is for creating reusable reference data from old filled forms.
The normal filling workflow is for filling new blank forms using existing reference data.
Workflow 1: One-time reference bootstrap
Use this workflow when the user does not yet have a personal reference database and has old blank forms plus matching old filled forms.
This is a setup step only and is separate from normal filling.
The bootstrap workflow may compare blank and filled versions of forms to identify the user-provided content.
It should extract general reusable facts such as:
- personal information
- education
- contact details
- bank account details
- study status
- awards
- publications
- patents
- projects
- employment information
- structured application facts
- other reusable structured facts
The bootstrap workflow must not store form-specific cell IDs as the main reference data.
It may keep cell IDs only as evidence in raw extraction logs.
Long narrative fields are excluded by default unless the user explicitly asks to include them.
Examples of long narrative fields:
- personal statements
- application reasons
- self-evaluations
- research plans
- future plans
- cover letters
- recommendation letters
- essays
Prefer a temporary review output folder first, not the final profile folder, because bootstrap output can overwrite existing YAML files.
Example command for Linux/macOS/Git Bash:
cd "$CLAUDE_SKILL_DIR"
python scripts/bootstrap_references_from_filled_forms.py \
--before "<ABSOLUTE_BLANK_FORM_1>" "<ABSOLUTE_BLANK_FORM_2>" "<ABSOLUTE_BLANK_FORM_3>" \
--after "<ABSOLUTE_FILLED_FORM_1>" "<ABSOLUTE_FILLED_FORM_2>" "<ABSOLUTE_FILLED_FORM_3>" \
--output-dir "<ABSOLUTE_BOOTSTRAP_REVIEW_DIR>" \
--exclude-long-text-fields
Example command for Windows PowerShell:
cd "$env:CLAUDE_SKILL_DIR"
python .\scripts\bootstrap_references_from_filled_forms.py `
--before "<ABSOLUTE_BLANK_FORM_1>" "<ABSOLUTE_BLANK_FORM_2>" "<ABSOLUTE_BLANK_FORM_3>" `
--after "<ABSOLUTE_FILLED_FORM_1>" "<ABSOLUTE_FILLED_FORM_2>" "<ABSOLUTE_FILLED_FORM_3>" `
--output-dir "<ABSOLUTE_BOOTSTRAP_REVIEW_DIR>" `
--exclude-long-text-fields
The order of --before and --after must match:
blank1 <-> filled1
blank2 <-> filled2
blank3 <-> filled3
After bootstrapping, inspect:
<bootstrap-dir>/extraction_report.md
<bootstrap-dir>/conflicts_for_review.md
If conflicts_for_review.md contains conflicts, do not automatically merge them into the final reference profile.
Ask the user to review conflicts or keep the conflicting fields out.
Only after review should reusable facts be copied into the final reference folder.
Workflow 2: Normal future filling
Use this workflow when the user already has reference data and wants to fill a new blank form.
For future forms, use the extracted reference files and the newly supplied target form.
Do not require the previously filled forms.
The normal workflow is:
- Extract fillable fields from the target form.
- Extract reusable facts from reference files.
- Generate deterministic exact and fuzzy match candidates.
- Use LLM or Claude Code intelligence to create a strict
fill_plan.jsonwhen semantic judgment is needed. - Validate the fill plan before writing anything.
- Apply the validated fill plan while preserving formatting.
- Return the filled file and detailed audit report.
Step 1: Prepare intermediate files
Linux/macOS/Git Bash:
cd "$CLAUDE_SKILL_DIR"
python scripts/intelligent_autofill.py \
--target "<ABSOLUTE_TARGET_FORM>" \
--refs "<ABSOLUTE_REFERENCE_PATH>" \
--output-dir "<ABSOLUTE_OUTPUT_DIR>" \
--mode claude-code
Windows PowerShell:
cd "$env:CLAUDE_SKILL_DIR"
python .\scripts\intelligent_autofill.py `
--target "<ABSOLUTE_TARGET_FORM>" `
--refs "<ABSOLUTE_REFERENCE_PATH>" `
--output-dir "<ABSOLUTE_OUTPUT_DIR>" `
--mode claude-code
This creates:
<output-dir>/work/form_fields.json
<output-dir>/work/reference_facts.json
<output-dir>/work/candidate_matches.json
<output-dir>/work/fill_plan_instructions.md
At this stage, the form is not filled yet.
Step 2: Create the fill plan
Read:
<output-dir>/work/fill_plan_instructions.md
<output-dir>/work/form_fields.json
<output-dir>/work/reference_facts.json
<output-dir>/work/candidate_matches.json
schemas/fill_plan.schema.json
assets/prompts/fill_plan_prompt.md
Create:
<output-dir>/work/fill_plan.json
Fill-plan rules:
- Use only values supported by
reference_facts.json. - Every filled field must cite valid
source_fact_ids. - Treat fuzzy candidates as suggestions, not truth.
- Skip ambiguous fields.
- Skip missing fields.
- Skip unsupported fields.
- Skip fields with conflicting source facts.
- Do not infer missing information.
- Do not use outside knowledge.
- Do not fill long narrative text unless a matching long-text reference fact is explicitly provided.
- Follow the schema in
schemas/fill_plan.schema.json.
Step 3: Validate and apply the plan
Linux/macOS/Git Bash:
cd "$CLAUDE_SKILL_DIR"
python scripts/intelligent_autofill.py \
--target "<ABSOLUTE_TARGET_FORM>" \
--refs "<ABSOLUTE_REFERENCE_PATH>" \
--output-dir "<ABSOLUTE_OUTPUT_DIR>" \
--mode claude-code \
--apply-existing-plan
Windows PowerShell:
cd "$env:CLAUDE_SKILL_DIR"
python .\scripts\intelligent_autofill.py `
--target "<ABSOLUTE_TARGET_FORM>" `
--refs "<ABSOLUTE_REFERENCE_PATH>" `
--output-dir "<ABSOLUTE_OUTPUT_DIR>" `
--mode claude-code `
--apply-existing-plan
If validation fails, fix fill_plan.json and validate again before applying.
Do not write into the Office file until validation passes.
Step 4: Report results
Return:
<output-dir>/<filled-file>
<output-dir>/filling_report.md
<output-dir>/filling_report.json
Summarize:
- whether filling succeeded
- filled file path
- report path
- number of fields filled
- number of fields skipped
- important skipped fields
- validation errors, if any
- whether conversion was used
- whether manual review is required
Do not claim the form is ready for submission without recommending manual review.
Intelligence model
The scripts are responsible for reliable file operations:
- extracting form structure
- extracting reference facts
- generating candidate matches
- validating fill plans
- writing Word and Excel files safely
- converting legacy files when needed
- producing audit reports
The LLM or Claude Code is responsible for semantic judgment:
- understanding field labels and context
- deciding whether a fuzzy candidate really matches a field
- detecting ambiguity
- selecting source-backed values only
- creating
fill_plan.json
A static alias file must not be treated as the main intelligence.
Field hints may help candidate generation, but they must not override source evidence or LLM judgment.
Matching policy
Use the following matching levels:
- Exact raw match.
- Exact normalized match.
- Deterministic fuzzy candidate generation.
- LLM semantic decision using label, context, table headers, nearby text, field type, and reference facts.
- Strict validation before writing.
The system may automatically fill high-confidence exact matches in deterministic mode.
Fuzzy or semantic matches should be written only when the fill plan includes source facts and passes validation.
Deterministic fallback
Use deterministic mode only when the user asks for a safer automatic fill without Claude semantic planning.
Linux/macOS/Git Bash:
cd "$CLAUDE_SKILL_DIR"
python scripts/intelligent_autofill.py \
--target "<ABSOLUTE_TARGET_FORM>" \
--refs "<ABSOLUTE_REFERENCE_PATH>" \
--output-dir "<ABSOLUTE_OUTPUT_DIR>" \
--mode deterministic
Windows PowerShell:
cd "$env:CLAUDE_SKILL_DIR"
python .\scripts\intelligent_autofill.py `
--target "<ABSOLUTE_TARGET_FORM>" `
--refs "<ABSOLUTE_REFERENCE_PATH>" `
--output-dir "<ABSOLUTE_OUTPUT_DIR>" `
--mode deterministic
This fills only high-confidence exact or near-exact matches and skips ambiguous fields.
Formatting preservation
Inserted text must match the original document as closely as possible:
- same font family
- same East Asian font when applicable
- same font size
- same bold status
- same italic status
- same underline status
- same alignment
- same paragraph style
- same table style and borders
- same cell style and number format in spreadsheets
Do not damage:
- formulas
- merged cells
- headers
- footers
- page layout
- hidden sheets
- comments
- dropdowns
- validation rules
- document protection
- workbook protection
- worksheet protection
- existing non-empty user data
Never overwrite non-empty user data unless overwrite is explicitly allowed.
Filling rules
- Do not invent information.
- Do not infer facts that are not explicitly provided.
- Do not overwrite non-empty user data unless overwrite is explicitly allowed.
- Leave fields blank when the correct value is missing.
- Leave fields blank when multiple conflicting values are available.
- Leave fields blank when the field meaning is unclear.
- Every filled value must cite one or more source fact IDs in the fill plan and report.
- Do not fill long narrative text unless a matching long-text reference fact is explicitly provided.
- Awards must be sorted by descending date in the reference database and when filling repeatable award tables, unless the target form explicitly specifies another order.
- Publications should use the provided formatted citation when available. If assembled from parts, use the requested IEEE-style format and never invent missing citation metadata.
- Award-winning experience should use:
Date, Award Name, Awarding Organizationwhen a single-cell format is needed. - Leave unclear fields blank.
- Leave unsupported fields blank.
- Leave conflicting fields blank.
- If the form cannot be safely filled, explain what is missing and leave the file unchanged.
Required outputs
For every filling task, return:
- The filled file.
filling_report.md.filling_report.json.- Any intermediate review file if ambiguous fields require human decision.
The report must include:
- target file and output file
- original and output extension
- whether conversion was used
- fields filled
- fields skipped
- source fact IDs
- match type
- confidence
- validation result
- formatting action
- remaining empty fields and reasons
- legacy conversion notes, if any
- conflicts detected, if any
- manual review requirements, if any
Expected final response
After completing the workflow, tell the user:
- whether filling succeeded
- where the filled file is
- where the reports are
- which fields were skipped
- whether conflicts were found
- whether conversion was used
- whether manual review is required
Do not claim the form is ready for submission without recommending manual review.
Task Prioritizer
Productivity
Prioritizes your tasks using Eisenhower, ICE, and RICE frameworks.
Weekly Status Report Generator
Productivity
Generate structured and concise weekly status reports.
Daily Standup Report
Productivity
Generates structured and concise daily standup reports.