frappe-syntax-controllers

Official

Master Frappe controllers with reliable hooks.

AuthorOpenAEC-Foundation
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Writing consistent, secure, and maintainable Frappe Document Controllers can be error-prone due to ad-hoc patterns and scattered best practices. This skill consolidates recommended lifecycle hooks, override and extension strategies, doc_events wiring, naming conventions, and flag/permission patterns into a coherent approach.

Core Features & Use Cases

  • Lifecycle hooks guidance: before_validate, validate, before_save, on_update, on_change, before_submit, on_submit, before_cancel, on_cancel, and update-after-submit.
  • Controller extension mechanisms: override_doctype_class, extend_doctype_class (v16+), and doc_events for granular hooks.
  • Paired submit/cancel patterns, naming/autoname strategies (including UUID v16), and use of doc.flags and frappe.flags for runtime coordination.
  • DocEvents and extension patterns enabling safe multi-app customization and predictable behavior.
  • Use cases: building a new DocType controller, integrating with external systems via whitelists or enqueue, and implementing robust validations.

Quick Start

Create a simple Document Controller by extending Document, implement a basic validate() using super(), and attach a single doc_event in hooks.py to observe the lifecycle.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: frappe-syntax-controllers
Download link: https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package/archive/main.zip#frappe-syntax-controllers

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.