opendcai/dataflow-webui/prompt-template-builder
Claude Code and agent skill by opendcai/dataflow-webui
- community
Checking that the SKILL.md file is still in the repository.
Build reusable DataFlow prompt_template classes for existing operators with two-round structured intake, two-stage auditable outputs, and static acceptance checks. Trigger when users ask to generate/rewrite/optimize prompt_template or reuse operator logic with new prompt requirements.
Install
npx vskill@latest install opendcai/dataflow-webui/prompt-template-builderSKILL.md
Prompt Template Builder
生成可复用、可审计的 DataFlow prompt_template 初版产物,聚焦“算子复用 + 提示词定制 + 静态验收”。
Goal
当用户给出 Target 与 OP_NAME 时,本 skill 必须:
- 对齐目标算子的真实接口与参数要求。
- 生成符合规范的
prompt_template类代码。 - 输出可审计的两阶段结果(决策 JSON + 完整产物)。
- 使用静态验收清单完成质量门控(不执行子进程自动测试)。
<!-- @if slash_commands==yes -->
Usage
<!-- @endif -->
Scope
In Scope
- 针对已有算子的 prompt_template 新建或改写。
<!-- @if structured_questions==yes -->
- 通过 AskUserQuestion 两轮结构化采集需求。
<!-- @else -->
- 通过结构化提问两轮采集需求。
<!-- @endif -->
- 生成标准化 prompt 类、集成示例、静态验收结果。
- 接收用户反馈并进行定向改写(
revise_with_feedback风格)。
Out of Scope (v1)
- 自动子进程执行测试脚本。
- 自动运行 Gradio UI 或流水线脚本。
- 自动提交代码或发布。
Input Contract (MANDATORY)
按结构化字段接收输入:
详细字段定义见:
references/input-schema.md
Working Modes
<!-- @if structured_questions==yes -->
Mode A: AskUserQuestion Interview (default)
固定两阶段批量提问: <!-- @else -->
Mode A: Structured Interview (default)
固定两阶段提问: <!-- @endif -->
- Round 1: 结构层(目标、算子、输出契约、约束)
- Round 2: 实现层(参数签名、边界样例、验收偏好)
规则:
- 每个问题块提供推荐选项 + 简短理由。
- 只在高影响缺失/冲突时追问。
- 能映射到结构化字段就不提“游离问题”。
<!-- @if structured_questions==no -->
- 直接向用户文字提问,一次性列出所有需要确认的问题。
<!-- @endif -->
详见:
references/askuserquestion-rounds.md
Mode B: Direct Spec
若用户已提供完整 spec,跳过采访,直接进入生成与验收。
Required Workflow
Mandatory Rules
- Operator Interface Alignment
- 不得虚构
OP_NAME的构造参数或run参数。 prompt_template的调用方式必须与算子约定一致(如参数名/含义/类型)。- 当不同文档冲突时,以“目标算子签名说明”作为单一真源。
- Prompt Class Contract
- 若目标算子要求
DIYPromptABC风格模板,则生成类应继承DIYPromptABC。 - 若目标算子要求其他模板类型(例如
FormatStrPrompt),必须按该类型生成并在 Stage 2 标注依据。 - 保留
__all__导出。 - DIY 类名使用
PascalCase + Prompt。 - DIY 模式下
build_prompt必须返回str。
- Output Determinism
- 若用户指定输出格式,Prompt 中必须给出明确强约束(字段名、类型、取值范围)。
- 禁止仅描述“尽量输出 JSON”而不定义 schema。
- Field/Argument Safety
build_prompt中引用的变量必须来自显式参数或常量。- 不允许在模板中引用未声明变量。
- Two-Stage Output (Required)
- 必须先输出 Stage 1 决策 JSON。
- 再输出 Stage 2 完整产物。
- Validation Gate
- Stage 2 必须包含静态验收结果,引用
references/acceptance-checklist.md。
Output Contract (MANDATORY)
详见:
references/output-contract.mdtemplates/decision_json_template.mdtemplates/final_response_template.md
Progressive Disclosure Assets
references/input-schema.md: 输入字段、默认值、归一化规则references/output-contract.md: 两阶段输出规范与失败态references/gotchas.md: 常见失败模式references/acceptance-checklist.md: 静态验收门槛references/askuserquestion-rounds.md: 两轮采访模板templates/prompt_class_template.py.tmpl: prompt类模板examples/: 典型场景走查
Notes
- v1 使用“静态验收 + 示例走查”闭环;后续版本可扩展为自动子进程测试。
- 若用户反馈不满意,执行定向改写并重复 Stage 1/Stage 2 + 静态验收。
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/canonical/prompt-template-builder/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/opendcai/dataflow-webui/prompt-template-builder)