frappe-syntax-hooks

Centralize Frappe hooks.py configuration for cross-app event hooks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configures and standardizes Frappe hooks.py usage across apps, enabling consistent event handling (before_request, after_request, scheduler_events, and website routing) and cross-version compatibility.

Core Features & Use Cases

  • Centralizes hook definitions across multiple apps to ensure predictable behavior.
  • Covers non-document-event hooks like app metadata, fixtures, boot info, and doctype/class extensions.
  • Use case: when building a multi-app Frappe suite, align before_request logic and scheduler_events across the stack to prevent conflicting hooks.

Quick Start

Edit your hooks.py to include the required hooks, then test by invoking bench migrate and verifying requests are processed through the defined hook stack.

Frequently Asked Questions about frappe-syntax-hooks

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

FAQPage Schema
How do I configure Frappe hooks.py for before_request and after_request events?

Frappe hooks.py centralizes cross-app event orchestration for before_request, after_request, scheduler_events, and doc lifecycle by applying a structured hooks catalog with per-category references to ensure predictable behavior across v14, v15, and v16.

What is the best way to manage scheduler_events across multiple Frappe apps?

The best way to manage scheduler_events across multiple Frappe apps is to centralize hook definitions in a structured hooks catalog, aligning logic across the stack to prevent conflicting hooks and ensure deterministic execution.

Does this Frappe hooks configuration approach work with ERPNext v14, v15, and v16?

Yes, this Frappe hooks configuration approach works with ERPNext v14, v15, and v16, applying cross-version compatibility to standardize app metadata, fixtures, boot info, and doctype extensions across your entire project stack.

How do I prevent conflicting hooks when building a multi-app Frappe suite?

You prevent conflicting hooks in a multi-app Frappe suite by centralizing hook definitions for before_request logic and scheduler_events, ensuring predictable behavior through a structured hooks catalog with consistent override patterns.

Can I use Frappe hooks for website routing and boot info customization?

Yes, you can use Frappe hooks for website routing and boot info customization, alongside configuring fixtures, jenv customization, and doctype or class extensions within your ERPNext or Frappe app projects.

Why are my Frappe hooks not triggering after running bench migrate?

Frappe hooks may not trigger after bench migrate if hook definitions in hooks.py are not properly centralized or aligned, requiring you to verify the structured hooks catalog and ensure correct routing for before_request and after_request events.