Frappe App Dev

frappe/skills/skills/frappe-app-dev

作者 frappe0bef982e933705c30706efc1db3bc3bc5e7aca62无许可证收录于 2026年10月9日更新于 2026年10月9日

Builds full-stack Frappe Framework applications end-to-end. Use this skill any time the user mentions: creating or modifying a DocType, writing a controller or lifecycle hook, adding a whitelisted API, setting up a new Frappe app or bench site, building a desk form or list view, creating portal pages, writing background jobs or scheduled tasks, managing permissions or roles, writing Frappe tests, or working with frappe.db / frappe.qb. Also applies when the user says things like "how do I hook into save", "add a field to a DocType", "create a REST endpoint in Frappe", "run bench migrate", or "install an app on a site" — even if they don't explicitly say "Frappe".

AI 生成的概览

指导构建全栈 Frappe Framework 应用,涵盖 DocType、控制器、API、钩子、权限、前端与 bench 操作。

功能
该技能提供端到端构建和扩展 Frappe Framework 应用的说明。它会将代理引导至相应参考文件,涵盖新应用或现有应用,以及 DocType、控制器、白名单 API、数据库访问、缓存、实时通信、后台任务、钩子、权限、测试、前端和 bench 命令等主题。它产出的是指导与命令,而不是文件或脚本。
适用场景
适用于创建或修改 DocType、控制器、生命周期钩子、白名单 API、desk 或门户页面、后台任务、权限规则或 Frappe 测试。也适用于搭建新的 Frappe 应用或 bench 站点,以及关于 frappe.db、frappe.qb 或 bench 命令的问题。
运行要求
不附带脚本,仅为说明性内容。它假定已有 Frappe bench 环境,包含 bench CLI 和站点,并要求命令针对明确的站点执行。

Frappe Full-Stack App Builder

Global Rules

  • Use bare bench. Not ./env/bin/bench. Not a full path.
  • Do not run which bench, bench --version, bench --help, or check frappe version. No discovery commands.
  • Do not delegate bench detection to a subagent. Run ls apps/ sites/ Procfile yourself.
  • Do not create DocType folders with mkdir. Frappe creates them via bench migrate.
  • Run bench start in a background process only.
  • Before running bench start, check if it's already running in an existing terminal. Do not start a second instance.
  • Always pass --site <site> explicitly to bench commands. Never run bare bench migrate.

Flow Selection

Determine which flow applies, then read ONLY the relevant file:

Creating a brand new app

Read new-app.md — covers bench setup, app scaffolding, site creation, and installation.

Working on an existing app

Read existing-app.md — covers finding the bench, locating the app, confirming site, and extending features.

Feature References

Load ONLY the references needed for the current task:

TopicWhen to loadFile
Site managementFinding/creating/managing sitessite-management.md
DocTypesCreating/modifying DocTypes, fields, namingdoctypes.md
ControllersDocument lifecycle, server logiccontrollers.md
Whitelisted APIsREST endpoints, @frappe.whitelist()api.md
Database & ORMfrappe.db, queries, raw SQLdatabase.md
CachingRedis, frappe.cachecaching.md
RealtimeWebSocket, publish_realtimerealtime.md
Background jobsfrappe.enqueue, scheduled jobsbackground-jobs.md
Hookshooks.py patternshooks.md
PermissionsRoles, DocType permissions, has_permissionpermissions.md
TestingWriting & running teststesting.md
Frontend & UIDesk UI, Vue SPA, portal pagesfrontend.md (router → 3 sub-files)
Bench CLIAll bench commands referencebench-operations.md

来源与署名

来源:frappe/skills位于skills/frappe-app-dev提交0bef982

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架