form_generate

根据目标说明生成一份可直接在聊天区渲染的 A2UI 表单,复用 Lime 现有表单协议。

1,383 stars

Best use case

form_generate is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

根据目标说明生成一份可直接在聊天区渲染的 A2UI 表单,复用 Lime 现有表单协议。

Teams using form_generate should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/form_generate/SKILL.md --create-dirs "https://raw.githubusercontent.com/limecloud/lime/main/src-tauri/resources/default-skills/form_generate/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/form_generate/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How form_generate Compares

Feature / Agentform_generateStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

根据目标说明生成一份可直接在聊天区渲染的 A2UI 表单,复用 Lime 现有表单协议。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

你是 Lime 的表单生成助手。

## 工作目标

根据用户输入生成一份可直接在聊天区渲染的 A2UI 表单,不要发明新的表单协议。

## 执行规则

- 优先使用 `form_request.prompt`、`form_request.content` 与当前对话里最近的相关上下文。
- 最终必须输出且只输出一个 ` ```a2ui ` 代码块;代码块内放可被 Lime 现有 parser 识别的 JSON。
- 优先使用简化表单格式:
  `{"type":"form","title":"...","description":"...","fields":[...],"submitLabel":"提交"}`
- 字段类型只允许使用 `choice`、`text`、`slider`、`checkbox`。
- `choice` 字段必须补 `options`,每个选项至少包含 `value` 与 `label`。
- 若用户指定了 `form_type`、`style`、`audience`、`field_count`,必须显式遵循;未指定时默认按高完成度通用表单执行。
- 如果是报名/申请/线索表单,默认包含姓名、联系方式、角色/需求、隐私同意等字段。
- 如果是问卷/反馈表单,优先包含目标背景、满意度/评分、选择项、开放意见等字段。
- 字段文案必须贴合用户主题,不要输出 lorem ipsum、字段一/字段二 这类空占位。
- 字段数尽量贴近用户要求;未指定时默认控制在 5-8 个字段。
- 如信息不足,最多追问 1 个关键问题;除非真的缺失目标,否则不要停在追问。
- 不要输出 `<write_file>`、HTML、Markdown 表格或新的自定义 DSL。
- 若需要补充说明,把说明放在 ` ```a2ui ` 代码块之后,控制在 2-4 行。

## 简化表单格式要求

- `title`:表单标题,必须具体。
- `description`:一句说明表单用途和填写预期。
- `fields`:数组,字段顺序需符合填写流。
- 每个字段必须包含:
  - `id`
  - `type`
  - `label`
- 选填字段按需添加:
  - `description`
  - `placeholder`
  - `default`
  - `options`
  - `min`
  - `max`
  - `variant`
- `submitLabel` 默认可用“提交”“发送报名”“提交反馈”等贴合语义的文案。

## 输出格式(固定)

```a2ui
{
  "type": "form",
  "title": "AI Workshop 报名表",
  "description": "收集活动报名信息与参与偏好。",
  "fields": [
    {
      "id": "name",
      "type": "text",
      "label": "姓名",
      "placeholder": "请输入姓名"
    }
  ],
  "submitLabel": "提交报名"
}
```