What problem does it solve?
This Skill prevents production-breaking Frappe database mistakes by guiding Claude to use the right ORM/database APIs, safe query patterns, and correct transaction behavior for ERPNext/Frappe v14–v16.
Core Features & Use Cases
- Choose the right data access layer: Use frappe.get_doc and frappe.db.get_value for reads, frappe.db.get_list for permission-aware lists, and frappe.delete_doc/frappe.db.delete for safe deletion paths.
- Prevent SQL injection and query bugs: Enforce parameterized SQL for frappe.db.sql and prefer frappe.qb for complex queries that need joins/aggregation.
- Avoid common anti-patterns: Stop the top issues like committing inside hooks, using get_doc in existence checks, missing tab prefixes, doing SELECT * and forgetting pagination, and running N+1 queries.
- Use v14–v16 compatible performance patterns: Apply caching correctly (frappe.get_cached_doc, frappe.db.get_value cache=True, Redis cache guidance) and use transaction hooks where available (v15+).
Quick Start
Ask Claude: "Generate Frappe v16 code to read a Sales Invoice by name, return only specific fields with permission-aware listing when needed, and include safe parameterized SQL or the Query Builder where appropriate."