doctype-patterns

Automate Frappe/Envista DocType design and data modeling with standardized JSON patterns.

21|6|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/UnityAppSuite/frappe-claude --skill doctype-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doctype-patterns
Source: https://github.com/UnityAppSuite/frappe-claude/tree/main/plugins/frappe-fullstack/skills/doctype-patterns
Command: npx skills add https://github.com/UnityAppSuite/frappe-claude --skill doctype-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frappe/ERPNext projects often struggle with inconsistent DocType patterns, making it hard to reuse best practices across modules. This Skill provides a standardized guide for creating and configuring DocTypes, including fields, relationships, autonaming, and lifecycle hooks, to streamline development and improve consistency.

Core Features & Use Cases

  • DocType Directory Structure: guidance on organizing DocTypes within a module for clarity and maintainability.
  • DocType JSON Structure and Field Types Reference: examples of fields, permissions, autonaming, and sub-table patterns.
  • Controller Lifecycle Hooks and Patterns: sample lifecycle methods (validate, before_save, on_submit, etc.) to model robust behaviors.
  • Child Tables and Complex Schemas: patterns for parent-child relationships, including table fields, is_submittable, and editable grids.
  • Virtual and Single DocTypes, Naming Patterns: examples for autoname, naming rules, and single-point settings.

Quick Start

Create a new DocType named "My Custom DocType" under module "My Module" following the directory structure and JSON pattern described in this guide.

Frequently Asked Questions about doctype-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure DocType JSON for new fields and permissions in Frappe?

DocType JSON structure defines fields, permissions, and autonaming patterns in Frappe. Standardizing this JSON ensures consistent data modeling and modular architecture across ERPNext modules.

What is the best way to configure parent-child relationships in ERPNext?

Parent-child relationships in ERPNext use child tables with table fields and editable grids. Configuring these complex schemas requires proper is_submittable settings and structured DocType patterns.

How do controller lifecycle hooks work for DocType validation and submission?

Controller lifecycle hooks like validate, before_save, and on_submit model robust behaviors for DocTypes. They execute automatically during specific document state transitions in Frappe.

When should I use Single or Virtual DocTypes instead of standard DocTypes?

Single DocTypes manage single-point settings, while Virtual DocTypes handle non-persistent data. Use them when standard transactional DocType patterns do not fit your specific data modeling requirements.

Does this guide require understanding of autoname patterns and directory structure?

Yes, applying these DocType patterns requires understanding DocType JSON structure, autoname patterns, and lifecycle hooks. You need this foundational knowledge to build modular architectures in Frappe.