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 從公開儲存庫中收錄這些內容。

檢舉或申請下架