frappe-data-migration-generator
Generate data migration scripts for Frappe. Use when migrating data from legacy systems, transforming data structures, or importing large datasets.
frappe-app-scaffold
Canonical folder structure produced by `bench new-app` for modern Frappe (v14/v15+). Use this as the ground truth for any Frappe app file tree — includes pyproject.toml and module management.
Full skill instructions
This is the exact folder structure for modern Frappe apps (v14, v15, and v16+). Any Frappe app MUST follow this layout. Modern apps have transitioned from setup.py to pyproject.toml.
modules.txtEvery Frappe app is organized into Modules. A module is a logical grouping of DocTypes.
modules.txt: This file MUST list every module name in the app, one per line. If a module is not in modules.txt, its DocTypes may not be recognized or appear in the Desk.__init__.py and a doctype/ directory.invoicing/ # App root
├── pyproject.toml # Modern Python packaging (Replaces setup.py)
├── invoicing/ # Inner package (same name as app)
│ ├── __init__.py
│ ├── hooks.py # App hooks (scheduler, doc_events, fixtures, etc.)
│ ├── modules.txt # CRITICAL: List of all module names
│ ├── patches.txt # Migration patches
│ ├── config/
│ │ ├── __init__.py
│ │ └── desktop.py # Module icon for desk sidebar
│ ├── <module_name>/ # Folder for each module in modules.txt
│ │ ├── __init__.py
│ │ └── doctype/
│ │ ├── __init__.py
│ │ └── <doctype_name>/ # One folder per DocType
│ │ ├── __init__.py
│ │ ├── <doctype_name>.json # DocType definition
│ │ ├── <doctype_name>.py # Python controller
│ │ ├── <doctype_name>.js # Client-side form script
│ │ └── test_<doctype_name>.py # Unit tests
├── requirements.txt # Python dependencies
├── MANIFEST.in
├── license.txt
└── README.md
pyproject.toml Example (v15+)[project]
name = "invoicing"
authors = [
{ name = "Your Company", email = "[email protected]" }
]
description = "A Frappe app for invoicing"
requires-python = ">=3.10"
dynamic = ["version"]
dependencies = [
"frappe>=15.0.0"
]
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[tool.bench]
app-name = "invoicing"
app-title = "Invoicing"
app-publisher = "Your Company"
app-description = "A Frappe app for invoicing"
app-email = "[email protected]"
app-license = "MIT"
modules.txt: When creating a new module folder, immediately add its name to modules.txt.modules.txt (e.g., Sales Management) but the folder name should be snake_case (e.g., sales_management).models/, controllers/, or views/.invoicing/modules.txt:
Billing
Folder Structure:
invoicing/
├── invoicing/
│ ├── modules.txt
│ ├── billing/ # Folder for "Billing" module
│ │ ├── __init__.py
│ │ └── doctype/
│ │ ├── __init__.py
│ │ └── sales_invoice/
│ │ ├── ...
setup.py (Deprecated in favor of pyproject.toml)setup.cfg (Deprecated)models/ directoryviews/ directoryRemember: This skill is the "blueprint" for any new Frappe app. Follow it strictly to ensure compatibility with bench and the Frappe Framework.
Generate data migration scripts for Frappe. Use when migrating data from legacy systems, transforming data structures, or importing large datasets.
Generate API documentation, user guides, and technical documentation for Frappe apps. Use when documenting APIs, creating user guides, or generating OpenAPI specs.
Generate Containerfile for Frappe apps using the official frappe/erpnext images with Gunicorn. The recommended pattern copies app source into the bench layout and runs Gunicorn directly.
Enforce the Iron Law of TDD for Frappe apps. Red-Green-Refactor cycle for DocTypes and Controllers.
Generate Frappe-style DocType controllers with lifecycle methods for microservices.
Generate whitelisted API methods and REST endpoints for standard Frappe and microservices.
Validate code follows frappe-microservice-lib patterns, security best practices, and framework conventions.
Generate tenant-isolated database queries using TenantAwareDB to prevent cross-tenant access.
Generate secure, tenant-aware API endpoints with authentication and tenant isolation.
Generate Frappe Web Forms for public-facing forms. Use when creating customer portals, registration forms, surveys, or public data collection forms.
Generate comprehensive unit tests for Frappe DocTypes, controllers, and API methods. Use when creating test files, writing test cases, or setting up test infrastructure for Frappe/ERPNext applications.
Generate integration tests for multi-DocType workflows and distributed services in Frappe.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience