openaec-foundation/frappe_claude_skill_package/frappe-impl-jinja
Claude Code and agent skill by openaec-foundation/frappe_claude_skill_package
- community
- ext:[{"type":"context","description":"Custom context provider definitions"}]
Checking that the SKILL.md file is still in the repository.
Use when building Jinja templates in Frappe: Print Formats, Email Templates, Notification templates, Portal Pages, and custom Jinja methods. Covers template creation workflows, child table handling, conditional sections, styling, multi-language support, and debugging. Prevents N+1 queries, wrong formatting, and Report Print confusion. Keywords: create print format, email template, portal page, pdf, create print format, invoice template, email template, PDF layout, custom print. template, invoice template, jinja methods, notification template, web page template, print format styling.
Install
npx vskill@latest install openaec-foundation/frappe_claude_skill_package/frappe-impl-jinjaSemi-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-impl-jinja.
Frappe Jinja Templates Implementation Workflow
Step-by-step workflows for building Jinja templates. For syntax reference, see frappe-syntax-jinja.
Version: v14/v15/v16 (V16 Chrome PDF noted)
Master Decision: What Are You Creating?
Workflow 1: Create a Print Format
Step 1: Create via UI
Step 2: Write the Template
Step 3: Test
- Open a Sales Invoice
- Menu > Print > Select "My Invoice Format"
- Verify layout and formatting
- ALWAYS test PDF download — wkhtmltopdf renders differently from browser
Critical Rules for Print Formats
- ALWAYS use
doc.get_formatted("field")for currency, dates, numbers - ALWAYS pass parent doc for child rows:
row.get_formatted("rate", doc) - ALWAYS wrap user-facing text with
_("text")for translation - ALWAYS put CSS in a
<style>block at the top (not external files) - NEVER use flexbox in v14/v15 (wkhtmltopdf does not support it) — V16 Chrome PDF does
- NEVER use
| safeon user-supplied input — only on trusted system HTML
Workflow 2: Create an Email Template
Step 1: Create via UI
Step 2: Write Email Content
ALWAYS use inline styles for emails — most clients strip <style> blocks.
Step 3: Use in Notification or Code
Option A: Auto-triggered Notification
Option B: Send from code
Workflow 3: Create a Notification Template
Step 1: Create via UI
Step 2: Write Message (Jinja)
Workflow 4: Create a Portal Page
Step 1: Create directory structure
Step 2: Create context (index.py)
Step 3: Create template (index.html)
Step 4: Test at https://yoursite.com/my-orders
Workflow 5: Register Custom Jinja Methods
Step 1: Add to hooks.py
Step 2: Create methods module
Step 3: Create filters module
Step 4: Deploy
Critical Rules for Custom Jinja Methods
- Custom methods should be READ-ONLY — NEVER write to database or commit
- ALWAYS handle None/empty input gracefully (return empty string)
- NEVER call slow external APIs — templates must render fast
Workflow 6: Debug a Template
Template Not Rendering?
Common Debugging Steps
- Check Error Log (Setup > Error Log) for template exceptions
- Use
frappe.render_template(template_string, {"doc": doc})in bench console - For Print Formats: Menu > Print > check browser console for errors
- For Portal Pages: check Python context — add
frappe.logger().info(context)inget_context
Common Pitfalls
| Symptom | Cause | Fix | ||
|---|---|---|---|---|
| Blank output | Wrong template type (Jinja in Report) | Reports use JS: {%= %} | ||
| "None" displayed | Field is null | Use `\ | default('')` | |
| Wrong currency format | Missing parent doc context | Use row.get_formatted("rate", doc) | ||
| HTML showing as text | Auto-escaping | Add `\ | safe` (trusted content only) | |
| Translations not working | Missing _() wrapper | Wrap all strings: {{ _("text") }} |
Quick Patterns: Child Tables, Conditionals, Translation
Styling/CSS in Print Formats
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/source/impl/frappe-impl-jinja/SKILL.md
Popularity
- Repository stars
- 88
- Repository forks
- 25
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 28 Apr 2026, 7 months ago.
Extension points
contextCustom context provider definitions
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-impl-jinja)