lovstudio-fill-web-form

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

fill-web-form — Fill Web Forms from Local Knowledge Base

fill-web-form — 从本地知识库填充网页表单

Fetch a web form, extract all fields, deep-search the user's local knowledge base for matching information, and output a ready-to-use markdown document.
获取网页表单,提取所有字段,深度搜索用户本地知识库以匹配相关信息,并输出可直接使用的Markdown文档。

When to Use

使用场景

  • User provides a URL to a web form and wants help filling it
  • Conference speaker applications, event registrations, profile forms
  • Any scenario where form fields can be answered from existing local materials
  • 用户提供网页表单的URL并需要协助填写
  • 会议演讲者申请、活动注册、个人资料表单
  • 任何可通过现有本地资料回答表单字段的场景

Workflow (MANDATORY)

工作流程(必须遵守)

Step 1: Fetch and extract form fields

步骤1:获取并提取表单字段

Use
WebFetch
to retrieve the form page and extract ALL fields:
WebFetch(url, prompt="Extract ALL form fields. For each field list: label,
type (text/textarea/select/radio/checkbox/file), required status, options
if applicable, min length constraints. Return structured list.")
If the form has radio/select fields, make a second
WebFetch
call to get the exact option text for each.
使用
WebFetch
获取表单页面并提取所有字段:
WebFetch(url, prompt="Extract ALL form fields. For each field list: label,
type (text/textarea/select/radio/checkbox/file), required status, options
if applicable, min length constraints. Return structured list.")
如果表单包含单选/下拉选择字段,需再次调用
WebFetch
以获取每个字段的确切选项文本。

Step 2: Deep-search local knowledge base

步骤2:深度搜索本地知识库

Launch an
Agent
(subagent_type: Explore, thoroughness: very thorough) to search the user's knowledge base. The agent prompt MUST include:
  1. The complete list of form fields from Step 1
  2. Instructions to search for:
    • Personal/professional bio and profile files
    • Speaking/conference history
    • Project descriptions and achievements
    • Company/organization info
    • Published articles and their topics
    • Awards, credentials, media mentions
  3. Search locations (adapt to user's repo structure):
    • Profile/about files (
      **/profile/**
      ,
      **/about/**
      ,
      **/bio/**
      )
    • CLAUDE.md files for project context
    • Posts and articles directories
    • Project directories
    • Any
      official.md
      ,
      awards.md
      ,
      resume
      files
  4. Also check user memory (MEMORY.md) for cached info
Run this in parallel with any additional
WebFetch
calls from Step 1.
启动一个
Agent
(subagent_type: Explore, thoroughness: very thorough)来搜索用户的知识库。Agent的提示必须包含:
  1. 步骤1中提取的完整表单字段列表
  2. 搜索指令:
    • 个人/职业简介和资料文件
    • 演讲/会议经历
    • 项目描述与成果
    • 公司/组织信息
    • 已发表文章及其主题
    • 奖项、资质、媒体报道
  3. 搜索位置(根据用户仓库结构调整):
    • 个人资料/关于页面文件(
      **/profile/**
      ,
      **/about/**
      ,
      **/bio/**
    • CLAUDE.md文件(用于获取项目上下文)
    • 文章与帖子目录
    • 项目目录
    • 任何
      official.md
      awards.md
      resume
      文件
  4. 同时检查用户记忆(MEMORY.md)中的缓存信息
此步骤可与步骤1中的额外
WebFetch
调用并行执行。

Step 3: Map fields to content

步骤3:字段与内容映射

For each form field, synthesize the best answer from search results:
Field TypeStrategy
Short text (name, company, city)Direct extraction from profile
Bio/introduction (min chars)Compose from official bio, expand to meet minimum
Long-form (case background, solution)Synthesize from articles, projects, talks
Radio/selectPick the best-matching option based on profile
File uploadMark as "needs manual upload" with specs
Private (phone, email)Mark as "needs manual input", suggest if found
针对每个表单字段,从搜索结果中合成最佳答案:
字段类型策略
短文本(姓名、公司、城市)从个人资料中直接提取
个人简介/自我介绍(最低字符数)基于官方简介撰写,扩展至满足最低要求
长文本(案例背景、解决方案)从文章、项目、演讲内容中合成
单选/下拉选择根据个人资料选择最匹配的选项
文件上传标记为“需手动上传”并注明要求
隐私信息(电话、邮箱)标记为“需手动填写”,若找到相关信息可给出建议

Step 4: Generate output document

步骤4:生成输出文档

Write a markdown document with ALL form fields filled. Format:
markdown
---
title: "<Form Name> - 填写内容"
status: draft
---
撰写包含所有已填充字段的Markdown文档,格式如下:
markdown
---
title: "<表单名称> - 填写内容"
status: draft
---

<Form Name>

<表单名称>

表单地址:<URL>

表单地址:<URL>

1. <Field Label>

1. <字段标签>

<Filled content or instruction>
<已填充内容或说明>

2. <Field Label>

2. <字段标签>

...

**Rules:**
- Number every field matching the form order
- For radio/select: prefix chosen option with `**✅ 选择:**`
- For file uploads: use `> ⚠️ 需上传:<specs>`
- For private fields: use `> ⚠️ 需手动填写`(with suggestion if available)
- For textarea fields with min length: ensure content meets or exceeds minimum
- Include a summary table at the end showing field → status (filled/manual)
- **MANDATORY:** Append an "inspected sources" section at the end of the document
  with a tree of all files that were read/searched during knowledge base retrieval:

```markdown
---
...

**规则:**
- 按照表单顺序为每个字段编号
- 单选/下拉选择字段:在选中选项前添加`**✅ 选择:**`
- 文件上传字段:使用`> ⚠️ 需上传:<要求>`
- 隐私字段:使用`> ⚠️ 需手动填写`(若有相关信息可附带建议)
- 有最低长度要求的文本域:确保内容满足或超过最低长度
- 在文档末尾添加汇总表格,展示字段→状态(已填充/需手动)
- **必须遵守:** 在文档末尾添加“检索文件路径”附录,列出知识库检索过程中读取/搜索的所有文件的树形结构:

```markdown
---

附录:检索文件路径

附录:检索文件路径

knowledge-base/
├── profile/
│   └── official.md          ← 个人简介
├── posts/standalone/2025/
│   ├── 07-10-Vol-51...md    ← 演讲经历
│   └── 06-25-comate...md    ← AI工具评测
├── 1-Projects/lovpen/
│   └── ...                  ← 产品信息
└── CLAUDE.md                ← 项目上下文

  This tree helps the user verify source coverage and spot missing materials.

**Output naming:** Follow user's naming convention. Default:
`手工川-<form-topic>-<YYYY-MM-DD>-v0.1.md`
knowledge-base/
├── profile/
│   └── official.md          ← 个人简介
├── posts/standalone/2025/
│   ├── 07-10-Vol-51...md    ← 演讲经历
│   └── 06-25-comate...md    ← AI工具评测
├── 1-Projects/lovpen/
│   └── ...                  ← 产品信息
└── CLAUDE.md                ← 项目上下文

  该树形结构可帮助用户验证资料覆盖范围,发现缺失的材料。

**输出命名:** 遵循用户的命名规范。默认格式:
`手工川-<表单主题>-<YYYY-MM-DD>-v0.1.md`

Step 5: Present summary

步骤5:展示汇总信息

After writing the file, show:
  1. A summary table of all fields with fill status
  2. Count of auto-filled vs needs-manual fields
  3. Remind user which fields need manual action (uploads, private data)
  4. The inspected files tree (same as in the document appendix, for quick review)
生成文件后,展示以下内容:
  1. 包含所有字段填充状态的汇总表格
  2. 自动填充字段与需手动填写字段的数量统计
  3. 提醒用户哪些字段需要手动操作(上传文件、隐私数据)
  4. 检索文件树形结构(与文档附录中的一致,方便快速查看)

Key Principles

核心原则

  1. Pre-fill aggressively — search deeply, compose content, don't leave blanks
  2. Meet all constraints — character minimums, bullet point counts, etc.
  3. Match form tone — conference apps need professional language, registrations can be brief
  4. Respect privacy — never guess phone numbers or passwords, mark for manual input
  5. Cite sources — when composing from knowledge base, the content should be accurate to the user's real experience
  1. 主动预填 — 深度搜索,撰写内容,不留下空白
  2. 满足所有限制 — 字符数下限、项目符号数量等
  3. 匹配表单语气 — 会议申请需使用专业语言,注册表单可简洁明了
  4. 尊重隐私 — 绝不猜测电话号码或密码,标记为需手动填写
  5. 引用来源 — 从知识库撰写内容时,需准确符合用户的真实经历