frappe-syntax-serverscripts

Enforce sandboxed Frappe Server Script patterns across v14–v16 events.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package --skill frappe-syntax-serverscripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-syntax-serverscripts
Source: https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package/tree/main/skills/source/syntax/frappe-syntax-serverscripts
Command: npx skills add https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package --skill frappe-syntax-serverscripts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This guide helps developers write ERPNext/Frappe Server Scripts safely by enforcing the sandbox rules that block import statements and ensure code runs with the pre-loaded frappe namespace.

Core Features & Use Cases

  • Provides a clear model for Document Events, API endpoints, Scheduler Events, and Permission Queries.
  • Explains event name mappings and ensures syntax compatibility across Frappe v14–v16.
  • Includes best-practice patterns and examples to prevent common mistakes and security issues.

Quick Start

Write a Server Script in the Frappe UI using the built-in sandbox, referencing the pre-loaded frappe namespace and avoiding any imports so the script runs safely.

Frequently Asked Questions about frappe-syntax-serverscripts

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

FAQPage Schema
How do I write Frappe Server Scripts without import blocking errors?

To write Frappe Server Scripts safely without import blocking errors, you must use the pre-loaded frappe namespace and avoid all import statements. The sandboxed environment blocks imports to ensure secure execution across Document Events and API endpoints.

What Frappe event mappings do I need for Server Scripts?

Frappe Server Scripts require correct event name mappings for Document Events, Scheduler Events, and Permission Queries. Using the proper event mappings ensures your script triggers execute correctly and maintains syntax compatibility across Frappe v14 through v16.

Can I use Python imports in ERPNext Server Scripts?

No, you cannot use Python imports in ERPNext Server Scripts because the sandbox environment strictly blocks import statements. You must rely entirely on the pre-loaded frappe namespace and its sandbox-safe utilities to execute business logic.

Which Frappe versions support sandboxed Server Scripts?

Sandboxed Server Scripts are supported across Frappe versions 14, 15, and 16. This compatibility ensures that your event mappings, API endpoints, and permission queries maintain consistent syntax and behavior throughout the Frappe v14–v16 lifecycle.

What are the limitations of the Frappe Server Script sandbox?

The Frappe Server Script sandbox prohibits import statements and restricts execution to the pre-loaded frappe namespace. This limitation prevents unauthorized access and ensures scripts only use sandbox-safe utilities for Document Events and Scheduler Events.

How do I call Frappe API endpoints safely from a Server Script?

To call Frappe API endpoints safely from a Server Script, reference the pre-loaded frappe namespace directly without importing external modules. This approach adheres to sandbox rules and ensures secure, compliant API endpoint execution.