openaec-foundation/frappe_claude_skill_package/frappe-syntax-hooks
Claude Code and agent skill by openaec-foundation/frappe_claude_skill_package
- community
- ext:[{"type":"template","description":"Custom templates for code generation"}]
Checking that the SKILL.md file is still in the repository.
Use when configuring Frappe hooks.py for app events, scheduler tasks, document events, fixtures, boot session, jenv customization, or website routing. Covers v14/v15/v16 including extend_doctype_class. Keywords: hooks.py, doc_events, scheduler_events, fixtures, app_include_js, override_whitelisted_methods, extend_doctype_class, hooks.py example, how to register hook, available hooks list, extend_doctype_class example.
Install
npx vskill@latest install openaec-foundation/frappe_claude_skill_package/frappe-syntax-hooksSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as openaec-foundation/frappe_claude_skill_package/frappe-syntax-hooks.
Frappe Configuration Hooks (hooks.py)
Configuration hooks in hooks.py enable custom apps to extend Frappe/ERPNext behavior. This skill covers ALL non-document-event hooks. For doc_events (validate, on_submit, on_update, etc.), see frappe-syntax-hooks-events.
Quick Reference: Hook Categories
| Category | Key Hooks | Reference | |
|---|---|---|---|
| App metadata | app_name, app_title, required_apps | Below | |
| Frontend assets | app_include_js/css, web_include_js/css | Below | |
| Install/migrate | before_install, after_install, after_migrate | Below | |
| Scheduler | hourly, daily, cron, *_long | scheduler-events.md | |
| Session/auth | on_login, on_logout, auth_hooks | bootinfo.md | |
| Request middleware | before_request, after_request | request-lifecycle.md | |
| Permissions | permission_query_conditions, has_permission | permissions.md | |
| DocType overrides | override_doctype_class, doctype_js | overrides.md | |
| Website/portal | website_route_rules, portal_menu_items | request-lifecycle.md | |
| File handling | before_write_file, write_file | Below | |
override_email_send, default_mail_footer | Below | ||
pdf_header_html, pdf_footer_html | Below | ||
| Jinja | jinja.methods, jinja.filters | Below | |
| Boot/client data | extend_bootinfo, notification_config | bootinfo.md | |
| Data/fixtures | fixtures, global_search_doctypes | Below | |
| Method overrides | override_whitelisted_methods, standard_queries | overrides.md |
Decision Tree: Which Hook Do I Need?
1. App Metadata Hooks
ALWAYS include these in every hooks.py:
2. Frontend Asset Injection
NEVER put heavy libraries in app_include_js — they load on every page.
3. Installation & Migration Lifecycle
All accept a single dotted-path string. The function receives no arguments.
4. Scheduler Events
See scheduler-events.md for full reference.
ALWAYS run bench --site sitename migrate after changing scheduler_events. NEVER define task functions with arguments — they receive none.
5. Session & Authentication Hooks
Execution order: on_login --> session created --> on_session_creation --> extend_bootinfo.
6. Request/Response Middleware
See request-lifecycle.md for the full request lifecycle flow, page renderer architecture, and router API.
7. Permission Hooks
See permissions.md for full reference.
ALWAYS check if not user: user = frappe.session.user in handlers. ALWAYS use frappe.db.escape(user) in SQL — NEVER string interpolation. permission_query_conditions works ONLY with get_list, NOT get_all.
8. DocType Class Overrides
See overrides.md for full reference.
ALWAYS call super().method() in overrides. Forgetting super() breaks core logic.
9. Website & Portal Hooks
10. File Handling Hooks
Use write_file to redirect file storage to cloud providers (S3, GCS, Azure Blob).
11. Email Hooks
12. PDF Hooks
13. Jinja Hooks
14. Boot & Client Data
See bootinfo.md for full reference.
NEVER put secrets/API keys in bootinfo — it is sent to the browser. NEVER run heavy queries in bootinfo — it runs on EVERY page load.
15. Data & Fixtures
ALWAYS use filters in fixtures — NEVER export unfiltered (exports everything). NEVER put transactional data (Sales Invoice, Stock Entry) in fixtures.
16. Method Overrides
See overrides.md for full reference.
ALWAYS match the original method signature exactly when overriding.
Version Differences
| Hook | v14 | v15 | v16+ | |
|---|---|---|---|---|
extend_doctype_class | -- | -- | NEW | |
extend_bootinfo | Yes | Yes | Yes | |
auth_hooks | Yes | Yes | Yes | |
after_sync | Yes | Yes | Yes | |
before_uninstall | -- | Yes | Yes | |
after_uninstall | -- | Yes | Yes | |
website_path_resolver | -- | Yes | Yes | |
| All other hooks | Yes | Yes | Yes |
Critical Rules
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/source/syntax/frappe-syntax-hooks/SKILL.md
Popularity
- Repository stars
- 91
- Repository forks
- 26
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Apr 2026, 7 months ago.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openaec-foundation/frappe_claude_skill_package/frappe-syntax-hooks)