openaec-foundation/frappe_claude_skill_package/frappe-ops-app-lifecycle
Claude Code and agent skill by openaec-foundation/frappe_claude_skill_package
- community
Checking that the SKILL.md file is still in the repository.
Use when scaffolding a new Frappe app, configuring app settings, building assets, running tests, deploying, updating, or publishing to marketplace. Prevents broken app structure from incorrect scaffolding, missing setup.py fields, and failed builds. Covers bench new-app, app directory structure, setup.py/pyproject.toml, hooks.py config, bench build, bench run-tests, app publishing. Keywords: app lifecycle, new-app, scaffolding, setup.py, pyproject.toml, hooks.py, bench build, app publishing, marketplace, create app, publish app, app structure, how to start new app, app directory layout..
Install
npx vskill@latest install openaec-foundation/frappe_claude_skill_package/frappe-ops-app-lifecycleSKILL.md
The same SKILL.md was published earlier as openaec-foundation/frappe_claude_skill_package/frappe-ops-app-lifecycle.
App Lifecycle Management
Quick Reference
| Command | Purpose | When to Use | |
|---|---|---|---|
bench new-app | Scaffold new app | Starting a new project | |
bench get-app URL | Clone from Git | Installing existing app | |
bench --site SITE install-app | Install on site | After get-app or new-app | |
bench --site SITE remove-app | Uninstall from site | Removing app from site | |
bench remove-app | Remove from bench | Removing app entirely | |
bench --site SITE migrate | Run patches + sync | After code changes | |
bench build | Compile assets | After JS/CSS changes | |
bench --site SITE console | Python REPL | Debugging | |
bench start | Start dev server | Development | |
bench setup production | Configure nginx+supervisor | Deploying to production |
1. Scaffolding: bench new-app
Interactive prompts:
- App Title → Human-readable name
- App Description → One-line summary
- App Publisher → Company/author name
- App Email → Contact email
- App Icon → Default:
octicon octicon-file-directory - App Color → Default:
grey - App License → Default:
MIT
Generated Directory Structure
What Each Core File Does
| File | Purpose | NEVER Forget | |
|---|---|---|---|
__init__.py | Defines __version__ | ALWAYS update before release | |
hooks.py | ALL framework integration | Entry point for everything | |
modules.txt | Declares app modules | ALWAYS add new modules here | |
patches.txt | Migration patch registry | ALWAYS add patches in order | |
requirements.txt | Python deps installed on setup | Add pip packages here | |
public/ | Static files served by nginx | Accessible at /assets/app_name/ | |
www/ | Portal pages | Filename = URL path |
2. Development Cycle
Step-by-Step
ALWAYS run bench migrate after modifying DocType JSON files. ALWAYS run bench build after modifying JS/CSS files.
3. Getting Apps from Git
After get-app, ALWAYS install on the target site:
get-app clones to apps/ and adds to apps.txt. install-app creates database tables and runs after_install hooks.
4. Installing and Removing Apps
Installation Order Matters
Apps are installed in order listed in apps.txt. If App B depends on App A, App A MUST be listed first.
App Dependencies (v14+)
Declare in hooks.py:
Frappe ALWAYS checks required_apps during installation and blocks if dependencies are missing.
5. Debugging with bench console
Opens an IPython REPL with Frappe context:
ALWAYS use bench console for debugging — NEVER modify production data with raw SQL.
6. Development Mode vs Production Mode
Development Mode
Development mode enables:
- DocType editing in Desk
- "Is Standard" option for reports/scripts
- Auto-reload on Python file changes
- Detailed error tracebacks in browser
dev-requirements.txtdependencies installed
Production Mode
Production mode:
- Serves via nginx (port 80/443)
- Background workers via supervisor
- Static files served directly by nginx
- Errors logged to files, not browser
- NEVER enable
developer_modeon production sites
7. Asset Building
v15+ (esbuild)
v14 (build.json)
v14 uses build.json in the app root to map source files to bundles:
Asset Include in hooks.py
ALWAYS run bench build after changing JS/CSS files. ALWAYS run bench clear-cache if assets are not updating.
8. App Versioning
Version String in __init__.py
ALWAYS use semantic versioning: MAJOR.MINOR.PATCH
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes
The version is read by bench version, displayed in Desk, and used by the Marketplace.
Checking Versions
9. Patches: Data Migrations
Writing a Patch
Registering in patches.txt
Section timing (v14+):
[pre_model_sync]— Runs BEFORE DocType schema changes are applied[post_model_sync]— Runs AFTER schema changes (new fields available)- No section header — Runs in
[pre_model_sync]by default
Patch Rules
- ALWAYS add new patches at the END of their section
- Patches run ONCE — tracked in
tabPatch Log - To re-run a patch, append a comment:
my_app.patches.v1_2.fix #2025-03-20 - ALWAYS call
frappe.reload_doc()before accessing new/modified DocTypes - ALWAYS use
[post_model_sync]for patches that need new fields - One-liner patches:
execute:frappe.delete_doc("Page", "old-page", ignore_missing=True)
Testing a Patch
10. Publishing to Frappe Marketplace
Prerequisites Checklist
- App hosted on public GitHub repository
setup.pyorpyproject.tomlwith correct metadata- Valid
__version__in__init__.py - README.md with installation instructions
- All tests passing
setup.py (v14)
pyproject.toml (v15+)
Publishing Steps
- Create account at https://frappecloud.com/marketplace
- Add your GitHub repository
- Configure supported versions (v14, v15)
- Submit for review
- After approval, app appears in Marketplace
11. App Update Lifecycle on Client Sites
The bench update command wraps: backup → pull → requirements → migrate → build → restart.
ALWAYS take a backup before running bench update on production. ALWAYS test updates on staging before applying to production.
See Also
- references/examples.md — Complete app scaffolding examples
- references/anti-patterns.md — Common mistakes
- references/workflows.md — Step-by-step workflows
- references/module-workspace-shipping.md — Module Def, modules.txt, and workspace shipping
frappe-syntax-hooks— Complete hooks.py referencefrappe-core-database— Database and migration patternsfrappe-impl-workspace— Workspace builder, components, and customization
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/source/ops/frappe-ops-app-lifecycle/SKILL.md
Popularity
- Repository stars
- 91
- Repository forks
- 26
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openaec-foundation/frappe_claude_skill_package/frappe-ops-app-lifecycle)