mcpField
R
router

router

github.com/lubusinAgent 工作流68102 次安装13 周前更新
代码仓库

关于 router

router 是面向 Frappe 开发任务的技能路由指南,根据任务类型指向相应的专用技能。它还强调先检查项目和 Frappe 版本,再进行代码修改。

主要功能

  1. 01按任务类型选择专用技能
  2. 02建议先进行项目分诊
  3. 03提供多技能组合建议
  4. 04提示版本与站点检查要点

适用场景

  1. 01开始处理未知的 Frappe 项目
  2. 02判断 DocType、API 或界面任务所需技能
  3. 03规划涉及多个开发领域的功能

安装

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

$npx skills add https://github.com/lubusin/frappe-skills --skill router

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

详细介绍

Frappe 路由器

根据任务将其路由到合适的 Frappe 技能。

何时使用

  • 开始任何 Frappe 相关工作时的第一步
  • 确定哪项专门技能适用于你的任务

流程

0) 确定任务类型
任务技能
了解项目结构、版本、应用→ project-triage
搭建新应用、配置 hooks、架构、后台任务→ app-development
创建/修改 DocType、字段、控制器→ doctype-development
构建 REST/RPC API、webhook、集成→ api-development
自定义 Desk UI、表单脚本、列表视图、JS API→ desk-customization
使用 Frappe UI 构建 Vue 3 前端、门户→ frontend-development
CRM/Helpdesk/HRMS 的 UI/UX 模式→ ui-patterns
创建打印格式、邮件模板、Jinja、PDF→ printing-templates
构建报表(Builder、Query、Script)→ reports
创建用于收集数据的公开网页表单→ web-forms
编写或运行测试→ testing
使用 Docker/FM 配置开发环境→ frappe-manager
构建 CRM/Helpdesk/企业系统→ enterprise-patterns
1) 先进行初步评估(建议)

在深入工作前,运行 project-triage 以了解:

  • 项目类型(bench/FM/standalone)
  • Frappe 版本
  • 已安装的应用
  • 可用工具
2) 按需组合技能

复杂任务可能需要多项技能:

  • 新应用 = app-development + doctype-development + api-development + testing
  • 带 UI 的功能 = doctype-development + desk-customization + api-development
  • 自定义前端 = frontend-development + api-development
  • 文档工作流 = doctype-development + printing-templates + reports
  • 企业应用 = enterprise-patterns + doctype-development

快速决策树

Is this about understanding the project?
  → project-triage

Is this about creating a new app or app architecture?
  → app-development

Is this about data models or DocTypes?
  → doctype-development

Is this about APIs or external access?
  → api-development

Is this about Desk UI, form scripts, or client-side JS?
  → desk-customization

Is this about a Vue 3 frontend or portal?
  → frontend-development

Is this about UI/UX patterns or app design?
  → ui-patterns

Is this about print formats, PDFs, or Jinja templates?
  → printing-templates

Is this about reports or data analysis views?
  → reports

Is this about public web forms?
  → web-forms

Is this about testing?
  → testing

Is this about local dev environment?
  → frappe-manager

Is this a complex enterprise system?
  → enterprise-patterns

护栏

  • 始终先进行初步评估,再对未知项目进行代码更改
  • 推荐功能前检查 Frappe 版本(API 可用性在 v13、v14、v15、v16 之间差异显著)
  • 不要假定项目使用 ERPNext——许多项目使用的是不含 ERPNext 的 Frappe Framework
  • 确认站点上下文——bench migrate 等命令会影响特定站点

常见错误

错误失败原因修正方法
跳过项目初步评估使用了不适用于该版本的模式始终先进行初步评估
在仅使用 Frappe 的项目中使用 ERPNext 专属代码出现找不到模块的错误先检查已安装的应用
任务选错技能实现不完整仔细将任务类型与技能匹配
忽略版本差异API 已弃用或缺失查看技能参考资料中的版本兼容性
在错误的站点上操作更改不会显示始终指定 --site 标志
前端使用原生 JS/jQuery与生态不匹配通过 frontend-development 使用 Frappe UI(Vue 3)
为 CRUD 应用自建应用外壳UX 不一致通过 enterprise-patterns 遵循 CRM/Helpdesk 模式

评论

支持 Markdown