Frappe Impl Customapp logo

Frappe Impl Customapp

Organization
Impertio-Studio
frappe-impl-customapp

Use when building a custom Frappe app from scratch. Covers bench new-app walkthrough, app structure decisions, adding DocTypes, hooks, patches, fixtures management, development workflow (bench migrate, build, clear-cache), testing, packaging, installing on another site, version management, and app dependencies for v14/v15/v16. Keywords: create custom app, new frappe app, bench new-app, app structure, module creation, doctype creation, fixtures, patches, deployment, packaging, data migration, patch file, patches.txt, migrate data between DocTypes, create new app from scratch.

Overview

PublisherImpertio-Studio
RepositoryFrappe_Claude_Skill_Package
Skill namefrappe-impl-customapp
Stars
180
Forks
53
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Impertio-Studio on GitHub. Read the source before you install it.

Installation

Install the Frappe Impl Customapp AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package.git /tmp/Frappe_Claude_Skill_Package
mkdir -p .claude/skills
cp -r /tmp/Frappe_Claude_Skill_Package/skills/source/impl/frappe-impl-customapp .claude/skills/frappe-impl-customapp
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Frappe Impl Customapp in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Frappe Impl Customapp on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Frappe Impl Customapp is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Frappe Custom App - Implementation

Workflow for building a custom Frappe app from scratch. For exact syntax, see frappe-syntax-customapp.

Version: v14/v15/v16 compatible


Main Decision: Do You Need a Custom App?

WHAT CHANGES DO YOU NEED?
|
+-- Add fields to existing DocType?
|   +-- NO APP NEEDED: Custom Field + Property Setter
|
+-- Simple automation/validation (<50 lines)?
|   +-- NO APP NEEDED: Server Script or Client Script
|
+-- Complex business logic, new DocTypes, or Python code?
|   +-- YES: Create custom app
|
+-- Integration with external system (needs imports)?
|   +-- YES: Custom app REQUIRED (Server Scripts block imports)
|
+-- Custom reports with complex queries?
|   +-- Script Report (no app) vs Query Report (app optional)

Rule: ALWAYS start with the simplest solution. Server Scripts + Custom Fields solve 70% of needs without a custom app.


Step 1: Create App Structure

bash
cd ~/frappe-bench
bench new-app my_app
# Prompts: Title, Description, Publisher, Email, License

ALWAYS verify immediately:

python
# my_app/my_app/__init__.py MUST have:
__version__ = "0.0.1"

Step 2: Configure pyproject.toml (v15+)

toml
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "my_app"
authors = [{ name = "Your Company", email = "dev@example.com" }]
description = "Your app description"
requires-python = ">=3.10"
readme = "README.md"
dynamic = ["version"]
dependencies = [
    "requests>=2.28.0"   # Only PyPI packages here
]

[tool.bench.frappe-dependencies]
frappe = ">=15.0.0,<16.0.0"
# erpnext = ">=15.0.0,<16.0.0"  # Only if needed

Rule: NEVER put frappe or erpnext in [project].dependencies -- they are NOT on PyPI.


Step 3: Configure hooks.py

python
app_name = "my_app"
app_title = "My App"
app_publisher = "Your Company"
app_description = "Description"
app_email = "dev@example.com"
app_license = "MIT"

required_apps = ["frappe"]  # Or ["frappe", "erpnext"]

fixtures = []  # Configured later

Rule: ALWAYS declare required_apps with all dependencies.


Step 4: Define Modules

text
# my_app/my_app/modules.txt
My App
App SizeModule Strategy
1-5 DocTypesONE module with app name
6-15 DocTypes2-4 modules by functional area
15+ DocTypesModules by business domain

Rule: Each DocType belongs to EXACTLY one module. Module name in modules.txt maps to directory: My Custom App --> my_custom_app/.

Adding a Module

bash
mkdir -p my_app/my_app/new_module/doctype
touch my_app/my_app/new_module/__init__.py
# Add "New Module" to modules.txt
bench --site mysite migrate

Step 5: Install and Create DocTypes

bash
# Install app on site
bench --site mysite install-app my_app

# Create DocType (via UI recommended, or CLI)
bench --site mysite new-doctype "My Document" --module "My App"

This creates:

my_app/my_app/doctype/my_document/
+-- my_document.json    # DocType definition
+-- my_document.py      # Controller
+-- my_document.js      # Client script
+-- test_my_document.py # Tests

Step 6: Add Hooks

doc_events (v14/v15/v16)

python
doc_events = {
    "Sales Invoice": {
        "validate": "my_app.events.sales_invoice.validate",
        "on_submit": "my_app.events.sales_invoice.on_submit"
    }
}

extend_doctype_class (v16 ONLY -- preferred)

python
extend_doctype_class = {
    "Sales Invoice": "my_app.overrides.sales_invoice.CustomSalesInvoice"
}

Rule: ALWAYS call super().method() when overriding lifecycle methods in v16.

Scheduler Events

python
scheduler_events = {
    "daily": ["my_app.tasks.daily_cleanup"],
    "cron": {"0 9 * * 1-5": ["my_app.tasks.morning_report"]}
}

See frappe-impl-hooks and frappe-impl-scheduler for complete patterns.


Step 7: Add Patches

Create Patch File

bash
mkdir -p my_app/my_app/patches/v1_0
touch my_app/my_app/patches/__init__.py
touch my_app/my_app/patches/v1_0/__init__.py
python
# my_app/my_app/patches/v1_0/populate_defaults.py
import frappe

def execute():
    if not frappe.db.has_column("My DocType", "target_field"):
        return  # Skip if not applicable

    batch_size = 1000
    offset = 0
    while True:
        records = frappe.get_all("My DocType",
            limit_page_length=batch_size, limit_start=offset)
        if not records:
            break
        for r in records:
            frappe.db.set_value("My DocType", r.name,
                "target_field", "default", update_modified=False)
        frappe.db.commit()
        offset += batch_size

Register in patches.txt

ini
[pre_model_sync]
# Patches that run BEFORE schema changes (backup data from deleted fields)

[post_model_sync]
# Patches that run AFTER schema changes (populate new fields)
my_app.patches.v1_0.populate_defaults

Rules:

  • ALWAYS check if patch is needed (guard clause)
  • ALWAYS batch process 1000+ records
  • ALWAYS commit after each batch
  • NEVER run untested patches on production

Step 8: Fixtures Management

Configure in hooks.py

python
fixtures = [
    {"dt": "Custom Field", "filters": [["module", "=", "My App"]]},
    {"dt": "Property Setter", "filters": [["module", "=", "My App"]]},
    {"dt": "Role", "filters": [["name", "in", ["My App User", "My App Manager"]]]},
    {"dt": "Workflow", "filters": [["document_type", "=", "My DocType"]]},
    "My Category",  # All records of your own config DocType
]

Export and Verify

bash
bench --site mysite export-fixtures --app my_app
ls my_app/my_app/fixtures/
# custom_field.json, property_setter.json, etc.

Rules:

  • ALWAYS filter fixtures to YOUR app's customizations
  • NEVER include transactional data (invoices, orders)
  • NEVER export without filters for shared DocTypes (Custom Field, Workflow)
  • Fixtures auto-import during bench migrate

Step 9: Development Workflow

Essential Commands

bash
# After schema changes (DocType fields, hooks.py, patches)
bench --site mysite migrate

# After JS/CSS changes
bench build --app my_app

# After Python changes (controllers, events)
bench --site mysite clear-cache

# Full restart (production)
bench restart

# Watch mode (development)
bench watch  # Auto-rebuilds on file changes

Development Cycle

1. Edit code/DocType
2. bench --site mysite migrate (if schema changed)
3. bench build --app my_app (if JS/CSS changed)
4. bench --site mysite clear-cache (if Python changed)
5. Test in browser
6. Repeat

Step 10: Testing the App

bash
# Run all tests
bench --site mysite run-tests --app my_app

# Run specific test
bench --site mysite run-tests --module my_app.my_module.doctype.my_doctype.test_my_doctype

# Run with verbose output
bench --site mysite run-tests --app my_app -v

See frappe-testing-unit for writing test cases.


Step 11: Packaging for Distribution

Via Git (standard method)

bash
cd apps/my_app
git init && git add . && git commit -m "Initial commit"
git remote add origin https://github.com/org/my_app.git
git push -u origin main

Install on Another Site

bash
# On target bench
bench get-app https://github.com/org/my_app.git
bench --site target-site install-app my_app
bench --site target-site migrate

Version Management

python
# my_app/my_app/__init__.py
__version__ = "1.0.0"  # Semantic versioning: MAJOR.MINOR.PATCH
Change TypeVersion BumpExample
Breaking changesMAJOR1.x -> 2.0.0
New featuresMINOR1.1.x -> 1.2.0
Bug fixesPATCH1.2.0 -> 1.2.1

Step 12: App Dependencies

Frappe/ERPNext Dependencies

python
# hooks.py
required_apps = ["frappe", "erpnext"]  # Install order matters
toml
# pyproject.toml
[tool.bench.frappe-dependencies]
frappe = ">=15.0.0,<16.0.0"
erpnext = ">=15.0.0,<16.0.0"

Python Package Dependencies

toml
[project]
dependencies = ["requests>=2.28.0", "pandas>=1.5.0"]

Rule: NEVER create circular dependencies between apps.


Version-Specific Considerations

Aspectv14v15v16
Build configsetup.pypyproject.tomlpyproject.toml
DocType extensiondoc_eventsdoc_eventsextend_doctype_class preferred
Python minimum3.103.103.11
Patch formatINI sectionsINI sectionsINI sections

v16 Breaking Changes to Know

  • extend_doctype_class hook: Cleaner extension via mixins
  • Data masking: Field-level privacy configuration
  • UUID naming: New naming rule option
  • Chrome PDF: wkhtmltopdf deprecated

Critical Rules Summary

ALWAYS

  1. Start with bench new-app - NEVER create structure manually
  2. Define __version__ in __init__.py
  3. Use dynamic = ["version"] in pyproject.toml
  4. Test patches on database copy before production
  5. Filter fixtures to your app's customizations only
  6. Version your patches (v1_0, v2_0 directories)
  7. Test installation on a fresh site

NEVER

  1. Put frappe/erpnext in [project].dependencies
  2. Include transactional data in fixtures
  3. Hardcode site-specific values (use settings DocTypes)
  4. Skip frappe.db.commit() in large patches
  5. Delete fields without backup patch
  6. Modify core ERPNext files directly

Reference Files

FileContents
workflows.md8 step-by-step implementation guides
decision-tree.mdComplete decision flowcharts
examples.md5 complete working app examples
anti-patterns.mdCommon mistakes to avoid

See Also

  • frappe-syntax-customapp - Exact syntax reference
  • frappe-syntax-hooks - Hooks configuration syntax
  • frappe-impl-hooks - Hook implementation patterns
  • frappe-core-database - Database operations for patches
  • frappe-impl-scheduler - Scheduled task implementation
  • frappe-ops-bench - Bench commands reference
  • frappe-ops-app-lifecycle - App versioning and release management
  • frappe-testing-unit - Writing tests for your app
  • frappe-testing-cicd - CI/CD pipeline for app testing

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Frappe Impl Customapp AI skill do?

Use when building a custom Frappe app from scratch. Covers bench new-app walkthrough, app structure decisions, adding DocTypes, hooks, patches, fixtures management, development workflow (bench migrate, build, clear-cache), testing, packaging, installing on another site, version management, and app dependencies for v14/v15/v16. Keywords: create custom app, new frappe app, bench new-app, app structure, module creation, doctype creation, fixtures, patches, deployment, packaging, data migration, patch file, patches.txt, migrate data between DocTypes, create new app from scratch.

Why use Frappe Impl Customapp on TypingMind?

Because you install it once and use it with any model. Frappe Impl Customapp is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Frappe Impl Customapp in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/impl/frappe-impl-customapp. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Frappe Impl Customapp?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Frappe Impl Customapp?

As many as you like. As long as a model supports skills, you can use Frappe Impl Customapp with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Frappe Impl Customapp AI skill free?

Yes. It is published on GitHub by Impertio-Studio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇