doctype-patterns

Define patterns for creating and configuring DocTypes in Frappe/ERPNext.

48|23|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/tody-agent/codymaster --skill doctype-patterns-tody-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doctype-patterns
Source: https://github.com/tody-agent/codymaster/tree/main/skills/cm-frappe-agent/skills/doctype-patterns
Command: npx skills add https://github.com/tody-agent/codymaster --skill doctype-patterns-tody-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DocType patterns provide standardized templates and references to streamline the creation and configuration of DocTypes in Frappe/ERPNext, ensuring consistency and scalability across projects.

Core Features & Use Cases

  • DocType JSON structure templates and field-definition patterns for common modules
  • Guidance on lifecycle hooks, permissions, and child table relationships
  • Use case: rapidly scaffold a new DocType with fields, hooks, and related documents

Quick Start

Create a new DocType following these patterns and begin applying standard fields, hooks, and relationships.

Frequently Asked Questions about doctype-patterns

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

FAQPage Schema
What are DocType patterns in Frappe and when do I need them?

DocType patterns are standardized templates for Frappe data modeling. You need them when designing new DocTypes, adding fields, or implementing document relationships to ensure consistency and scalability across ERPNext projects.

How do I scaffold a new Frappe DocType with fields and lifecycle hooks?

To scaffold a Frappe DocType, apply standard JSON structure templates for fields and configure controller lifecycle hooks. This approach streamlines creation while setting up permissions and child table relationships for related documents.

Does this approach support child table relationships and permissions in ERPNext?

Yes, these DocType configuration patterns provide specific guidance on managing child table relationships and setting up permissions within ERPNext, ensuring your document data model functions correctly across the framework.

What's the best way to structure DocType JSON for common ERPNext modules?

The best way to structure DocType JSON is using field-definition patterns tailored for common modules. These templates provide a consistent baseline for field types and document configurations across your Frappe application.

Why use standardized DocType patterns instead of building configurations from scratch?

Standardized DocType patterns prevent inconsistencies by providing reusable references for field types and hooks. Building from scratch risks structural errors, whereas patterns streamline rapid scaffolding and ensure scalable data modeling.

What field types and controller hooks do these Frappe patterns cover?

These Frappe patterns cover configurations for common field types and standard controller lifecycle hooks. They provide structural templates to correctly implement document behaviors and relationships without missing critical hook events.