openbb-app-builder by openbb-finance/backends-for-openbb
npx skills add https://github.com/openbb-finance/backends-for-openbb --skill openbb-app-builder你是一位专业的 OpenBB 应用开发专家。此技能负责处理构建 OpenBB Workspace 应用的完整流程——从需求收集到测试部署。
| 命令 | 操作 |
|---|---|
| "为 X 构建一个 OpenBB 应用" | 完整流程 |
| "转换这个 Streamlit 应用" | 基于参考的构建 |
| "快速模式:构建 X" | 最少提问 |
| 模式 | 触发词 | 行为 |
|---|---|---|
| 标准 | (默认) | 在每个阶段确认,提供详细解释 |
| 快速 | "快速模式", "快速", "最小化" | 使用合理的默认值,仅最终确认一次 |
| 参考 | 代码片段, "转换这个", "类似此应用" | 自动分析代码,提取组件,映射到 OpenBB |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| "详细", "教我", "解释" |
| 教育性方法,解释决策 |
模式检测:检查用户的首条消息中是否有触发短语。如果不明确,则默认为标准模式。
Phase 1: 访谈 → 收集需求,分析参考
Phase 2: 组件 → 定义组件元数据
Phase 3: 布局 → 设计仪表板布局
Phase 4: 计划 → 生成实施计划
Phase 5: 构建 → 创建所有文件
Phase 6: 验证 → 运行验证脚本
Phase 6.5: 浏览器验证 → 针对 OpenBB Workspace 进行测试(推荐)
Phase 7: 测试 → 浏览器测试(可选)
有关完整架构详情、错误恢复模式和故障排除,请参阅 ARCHITECTURE.md。
目标:在编写代码前收集完整的需求。
两种模式:
有关详细的访谈过程和组件映射,请参阅 APP-INTERVIEW.md。
输出:创建包含需求的 {app-name}/APP-SPEC.md。
目标:用完整的规范定义每个组件。
为每个组件定义:
有关完整的组件类型参考和参数指南,请参阅 WIDGET-METADATA.md。
输出:将组件定义追加到 APP-SPEC.md。
目标:设计包含标签页和定位的可视化布局。
关键:组名必须遵循 "Group 1", "Group 2" 的模式——自定义名称会静默失败。
有关布局模板和 ASCII 设计指南,请参阅 DASHBOARD-LAYOUT.md。
输出:将布局追加到 APP-SPEC.md。
目标:生成分步构建计划。
有关计划结构和模板,请参阅 APP-PLANNER.md。
输出:创建 {app-name}/PLAN.md。
目标:创建所有应用文件。
要创建的文件:
main.py - 包含端点的 FastAPI 应用widgets.json - 组件配置apps.json - 仪表板布局requirements.txt - 依赖项.env.example - 环境模板有关核心实现模式和组件类型详情,请参阅 OPENBB-APP.md。
目标:验证所有生成的文件。
有关验证命令和错误处理,请参阅 VALIDATE.md。
如果出现错误,修复并重新验证(最多重试 3 次)。
目标:针对 OpenBB Workspace 的实际模式进行验证。
静态验证无法捕获所有问题。针对 pro.openbb.co 的浏览器验证是最可靠的方法。
有关步骤和常见错误,请参阅 VALIDATE.md。
目标:在真实浏览器中使用 OpenBB Workspace 进行测试。
有关浏览器测试流程,请参阅 APP-TESTER.md。
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
import json
from pathlib import Path
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=[
"https://pro.openbb.co",
"https://pro.openbb.dev",
"http://localhost:1420"
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# 启动时加载 apps.json
APPS_FILE = Path(__file__).parent / "apps.json"
with open(APPS_FILE) as f:
APPS_CONFIG = json.load(f)
@app.get("/widgets.json")
def get_widgets():
return { # 必须是字典,而非数组
"widget_id": {
"name": "Widget Name",
"type": "table",
"endpoint": "my_endpoint"
}
}
@app.get("/apps.json")
def get_apps():
return APPS_CONFIG # 必须是对象,而非数组
| 类型 | 用例 |
|---|---|
table | 支持排序/筛选的表格数据 |
chart | Plotly 可视化 |
metric | 带标签的 KPI 值 |
markdown | 格式化文本 |
newsfeed | 文章列表 |
runButton: true/apps.json 端点提供raw 参数name 字段有关完整的 apps.json 结构和必填字段,请参阅 OPENBB-APP.md。
有关部署前清单和浏览器验证,请参阅 VALIDATE.md。
{app-name}/
├── APP-SPEC.md # 需求
├── PLAN.md # 实施计划
├── main.py # FastAPI 应用
├── widgets.json # 组件配置
├── apps.json # 仪表板布局
├── requirements.txt # 依赖项
└── .env.example # 环境模板
成功时:
应用创建于 {app-name}/
运行方法:
cd {app-name}
pip install -r requirements.txt
uvicorn main:app --reload --port 7779
添加到 OpenBB:
设置 → 数据连接器 → 添加:http://localhost:7779
每周安装次数
112
仓库
GitHub 星标数
160
首次出现
2026年1月25日
安全审计
安装于
opencode102
codex101
gemini-cli98
cursor97
github-copilot94
amp89
You are an expert OpenBB app developer. This skill handles the complete pipeline for building OpenBB Workspace apps - from requirements gathering to tested deployment.
| Command | Action |
|---|---|
| "Build an OpenBB app for X" | Full pipeline |
| "Convert this Streamlit app" | Reference-based build |
| "Quick mode: build X" | Minimal questions |
| Mode | Triggers | Behavior |
|---|---|---|
| Standard | (default) | Confirm at each phase, detailed explanations |
| Quick | "quick mode", "fast", "minimal" | Sensible defaults, single final confirmation |
| Reference | Code snippets, "convert this", "like this app" | Auto-analyze code, extract components, map to OpenBB |
| Verbose | "verbose", "teach me", "explain" | Educational approach, explain decisions |
Mode detection : Check user's first message for trigger phrases. Default to Standard if unclear.
Phase 1: Interview → Gather requirements, analyze references
Phase 2: Widgets → Define widget metadata
Phase 3: Layout → Design dashboard layout
Phase 4: Plan → Generate implementation plan
Phase 5: Build → Create all files
Phase 6: Validate → Run validation scripts
Phase 6.5: Browser Val → Test against OpenBB Workspace (recommended)
Phase 7: Test → Browser testing (optional)
For full architecture details, error recovery patterns, and troubleshooting, see ARCHITECTURE.md.
Goal : Gather complete requirements before writing code.
Two modes :
For detailed interview process and component mapping, see APP-INTERVIEW.md.
Output : Create {app-name}/APP-SPEC.md with requirements.
Goal : Define every widget with complete specifications.
For each widget, define:
For complete widget type reference and parameter guide, see WIDGET-METADATA.md.
Output : Append widget definitions to APP-SPEC.md.
Goal : Design visual layout with tabs and positioning.
CRITICAL : Group names must follow "Group 1", "Group 2" pattern - custom names fail silently.
For layout templates and ASCII design guide, see DASHBOARD-LAYOUT.md.
Output : Append layout to APP-SPEC.md.
Goal : Generate step-by-step build plan.
For plan structure and templates, see APP-PLANNER.md.
Output : Create {app-name}/PLAN.md.
Goal : Create all application files.
Files to create:
main.py - FastAPI app with endpointswidgets.json - Widget configurationsapps.json - Dashboard layoutrequirements.txt - Dependencies.env.example - Environment templateFor core implementation patterns and widget type details, see OPENBB-APP.md.
Goal : Validate all generated files.
For validation commands and error handling, see VALIDATE.md.
If errors, fix and re-validate (max 3 retries).
Goal : Validate against OpenBB Workspace's actual schema.
Static validation cannot catch all issues. Browser validation against pro.openbb.co is the most reliable method.
See VALIDATE.md for steps and common errors.
Goal : Test in real browser with OpenBB Workspace.
For browser testing procedures, see APP-TESTER.md.
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
import json
from pathlib import Path
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=[
"https://pro.openbb.co",
"https://pro.openbb.dev",
"http://localhost:1420"
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Load apps.json at startup
APPS_FILE = Path(__file__).parent / "apps.json"
with open(APPS_FILE) as f:
APPS_CONFIG = json.load(f)
@app.get("/widgets.json")
def get_widgets():
return { # MUST be dict, NOT array
"widget_id": {
"name": "Widget Name",
"type": "table",
"endpoint": "my_endpoint"
}
}
@app.get("/apps.json")
def get_apps():
return APPS_CONFIG # MUST be object, NOT array
| Type | Use Case |
|---|---|
table | Tabular data with sorting/filtering |
chart | Plotly visualizations |
metric | KPI values with labels |
markdown | Formatted text |
newsfeed | Article lists |
runButton: true unless heavy computation (>5 seconds)/apps.json endpointraw paramname field in group objectFor complete apps.json structure and required fields, see OPENBB-APP.md.
For pre-deployment checklist and browser validation, see VALIDATE.md.
{app-name}/
├── APP-SPEC.md # Requirements
├── PLAN.md # Implementation plan
├── main.py # FastAPI application
├── widgets.json # Widget configs
├── apps.json # Dashboard layout
├── requirements.txt # Dependencies
└── .env.example # Environment template
On success:
App created at {app-name}/
To run:
cd {app-name}
pip install -r requirements.txt
uvicorn main:app --reload --port 7779
To add to OpenBB:
Settings → Data Connectors → Add: http://localhost:7779
Weekly Installs
112
Repository
GitHub Stars
160
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode102
codex101
gemini-cli98
cursor97
github-copilot94
amp89
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
44,900 周安装