关于 frappe-router
frappe-router 是面向 Frappe 开发工作的技能路由器,根据任务类型指向对应的专业技能。它还建议先检查项目类型、Frappe 版本和已安装应用,再开始修改代码。
主要功能
- 01按任务类型匹配 Frappe 技能
- 02建议先进行项目分诊
- 03提供复杂工作的技能组合
- 04提示版本、应用与站点风险
适用场景
- 01开始处理未知 Frappe 项目
- 02确定 DocType 或 API 开发技能
- 03规划包含界面和测试的功能
- 04避免使用不兼容的版本模式
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ lubusin/ frappe-skills --skill frappe-router安装后在 Claude Code 中输入/frappe-router确认已加载。
详细介绍
Frappe 路由器
根据你的任务转到相应的 Frappe 技能。
何时使用
- 开始任何 Frappe 相关工作时的第一步
- 确定哪项专用技能适用于你的任务
操作流程
0) 确定任务类型
| 任务 | 技能 |
|---|---|
| 了解项目结构、版本、应用 | → frappe-project-triage |
| 搭建新应用、钩子、架构、后台作业 | → frappe-app-development |
| 创建/修改 DocType、字段、控制器 | → frappe-doctype-development |
| 构建 REST/RPC API、Webhook、集成 | → frappe-api-development |
| 自定义 Desk UI、表单脚本、列表视图、JS API | → frappe-desk-customization |
| 使用 Frappe UI 构建 Vue 3 前端、门户 | → frappe-frontend-development |
| 参考 CRM/Helpdesk/HRMS 的 UI/UX 模式 | → frappe-ui-patterns |
| 创建打印格式、电子邮件模板、Jinja、PDF | → frappe-printing-templates |
| 构建报表(Builder、Query、Script) | → frappe-reports |
| 创建用于收集数据的公共 Web 表单 | → frappe-web-forms |
| 编写或运行测试 | → frappe-testing |
| 使用 Docker/FM 设置开发环境 | → frappe-manager |
| 构建 CRM/Helpdesk/企业系统 | → frappe-enterprise-patterns |
1) 先运行项目排查(推荐)
深入开展工作前,运行 frappe-project-triage 以了解:
- 项目类型(bench/FM/独立项目)
- Frappe 版本
- 已安装的应用
- 可用工具
2) 按需组合技能
复杂任务可能需要多项技能:
- 新建应用 =
frappe-app-development+frappe-doctype-development+frappe-api-development+frappe-testing - 带 UI 的功能 =
frappe-doctype-development+frappe-desk-customization+frappe-api-development - 自定义前端 =
frappe-frontend-development+frappe-api-development - 文档工作流 =
frappe-doctype-development+frappe-printing-templates+frappe-reports - 企业应用 =
frappe-enterprise-patterns+frappe-doctype-development
快速决策树
Is this about understanding the project?
→ frappe-project-triage
Is this about creating a new app or app architecture?
→ frappe-app-development
Is this about data models or DocTypes?
→ frappe-doctype-development
Is this about APIs or external access?
→ frappe-api-development
Is this about Desk UI, form scripts, or client-side JS?
→ frappe-desk-customization
Is this about a Vue 3 frontend or portal?
→ frappe-frontend-development
Is this about UI/UX patterns or app design?
→ frappe-ui-patterns
Is this about print formats, PDFs, or Jinja templates?
→ frappe-printing-templates
Is this about reports or data analysis views?
→ frappe-reports
Is this about public web forms?
→ frappe-web-forms
Is this about testing?
→ frappe-testing
Is this about local dev environment?
→ frappe-manager
Is this a complex enterprise system?
→ frappe-enterprise-patterns
防护措施
- 对未知项目进行代码更改前,始终先运行项目排查
- 推荐功能前检查 Frappe 版本(v13、v14、v15、v16 之间的 API 可用性差异显著)
- 不要假设项目使用 ERPNext——许多项目使用 Frappe Framework,但不使用 ERPNext
- 确认站点上下文——
bench migrate等命令会影响特定站点
常见错误
| 错误 | 失败原因 | 修正方法 |
|---|---|---|
| 跳过项目排查 | 对版本应用了错误的模式 | 始终先运行项目排查 |
| 在仅使用 Frappe 的项目中使用 ERPNext 专属代码 | 出现找不到模块的错误 | 先检查已安装的应用 |
| 任务选错技能 | 实现不完整 | 仔细将任务类型与技能对应 |
| 忽略版本差异 | API 已弃用或缺失 | 在技能参考资料中检查版本兼容性 |
| 操作了错误的站点 | 更改没有显示 | 始终指定 --site 标志 |
| 使用原生 JS/jQuery 构建前端 | 与生态系统不匹配 | 通过 frappe-frontend-development 使用 Frappe UI(Vue 3) |
| 为 CRUD 应用自定义应用外壳 | 用户体验不一致 | 通过 frappe-enterprise-patterns 遵循 CRM/Helpdesk 模式 |
评论
支持 Markdown