mcpField
F
form-builder

form-builder

github.com/claude-office-skills文档处理5454.6k 次安装39 周前更新
代码仓库

关于 form-builder

form-builder 是用于生成 docassemble 访谈 YAML 的技能,可创建引导式表单和文档。适合设计带条件逻辑的问卷,包括客户登记和文档生成流程。

主要功能

  1. 01生成 docassemble 访谈 YAML
  2. 02构建依回答变化的问题
  3. 03配置常见字段类型
  4. 04根据访谈答案组装文档

适用场景

  1. 01创建客户登记问卷
  2. 02设计带条件逻辑的法律表单
  3. 03构建多步骤合同生成表单

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/claude-office-skills/skills --skill form-builder

安装后在 Claude Code 中输入/form-builder确认已加载。

详细介绍

表单构建器技能

概述

此技能可使用 docassemble 创建智能文档表单。docassemble 是一个用于开展引导式访谈并生成文档的平台。创建可根据回答动态调整的问题表单。

使用方法

  1. 描述你需要的表单或文档
  2. 指明条件逻辑要求
  3. 我将创建 docassemble 访谈 YAML

提示词示例:

  • “为新客户创建一份信息登记表”
  • “为法律文档构建一份条件式问卷”
  • “生成一份用于生成合同的多步骤表单”
  • “设计一份交互式文档组装表单”

领域知识

访谈结构
metadata:
  title: Client Intake Form
  short title: Intake

---
question: |
  What is your name?
fields:
  - First Name: first_name
  - Last Name: last_name

---
question: |
  What type of service do you need?
field: service_type
choices:
  - Contract Review
  - Document Drafting
  - Consultation

---
mandatory: True
question: |
  Thank you, ${ first_name }!
subquestion: |
  We will contact you about your ${ service_type } request.
条件逻辑
---
question: |
  Are you a business or individual?
field: client_type
choices:
  - Business
  - Individual

---
if: client_type == "Business"
question: |
  What is your company name?
fields:
  - Company: company_name
  - EIN: ein
    required: False

---
if: client_type == "Individual"
question: |
  What is your date of birth?
fields:
  - Birthdate: birthdate
    datatype: date
字段类型
fields:
  # Text
  - Name: name
  
  # Email
  - Email: email
    datatype: email
  
  # Number
  - Age: age
    datatype: integer
  
  # Currency
  - Amount: amount
    datatype: currency
  
  # Date
  - Start Date: start_date
    datatype: date
  
  # Yes/No
  - Agree to terms?: agrees
    datatype: yesno
  
  # Multiple choice
  - Color: color
    choices:
      - Red
      - Blue
      - Green
  
  # Checkboxes
  - Select options: options
    datatype: checkboxes
    choices:
      - Option A
      - Option B
  
  # File upload
  - Upload document: document
    datatype: file
文档生成
---
mandatory: True
question: |
  Your document is ready.
attachment:
  name: Contract
  filename: contract
  content: |
    # Service Agreement
    
    This agreement is between **${ client_name }**
    and **Service Provider**.
    
    ## Services
    ${ service_description }
    
    ## Payment
    Total amount: ${ currency(amount) }
    
    Date: ${ today() }

示例:客户信息登记

metadata:
  title: Legal Client Intake
  short title: Intake

---
objects:
  - client: Individual

---
question: |
  Welcome to our intake form.
subquestion: |
  Please answer the following questions.
continue button field: intro_screen

---
question: |
  What is your name?
fields:
  - First Name: client.name.first
  - Last Name: client.name.last
  - Email: client.email
    datatype: email
  - Phone: client.phone
    required: False

---
question: |
  What type of matter is this?
field: matter_type
choices:
  - Contract: contract
  - Dispute: dispute
  - Advisory: advisory

---
if: matter_type == "contract"
question: |
  Contract Details
fields:
  - Contract Type: contract_type
    choices:
      - Employment
      - Service Agreement
      - NDA
  - Other Party: other_party
  - Estimated Value: contract_value
    datatype: currency

---
mandatory: True
question: |
  Thank you, ${ client.name.first }!
subquestion: |
  **Summary:**
  
  - Name: ${ client.name }
  - Email: ${ client.email }
  - Matter: ${ matter_type }
  
  We will contact you within 24 hours.

资源

评论

支持 Markdown