hebrew-business-docs
Skill2 starsChanged 6 months agoMITView on GitHub
Create professional Hebrew (RTL) business documents as PDF — price quotes (הצעות מחיר), invoices (חשבוניות), proposals (הצעות), contracts (חוזים), receipts (קבלות), and forms (טפסים). Use this skill whenever the user asks for any business document in Hebrew, mentions הצעת מחיר / חשבונית / חוזה / טופס / מסמך עסקי, or wants a PDF with Hebrew text. Hebrew RTL rendering breaks badly with most PDF tools — this skill has the working method. Use it even if the request seems simple, and even if the user only says "make me a quote" without specifying Hebrew formatting.
- Installs packages
In this repository15 other files it gives its agents.
- app-foundationsSkill
- brand-guidelinesSkill
- code-reviewerSkill
- content-templatesSkill
- design-md-librarySkill
- image-genSkill
- logo-creatorSkill
- marketing-copywriterSkill
- premium-landing-effectsSkill
- production-security-auditSkill
- scroll-videoSkill
- seo-launchpadSkill
- skill-creatorSkill
- ui-ux-pro-maxSkill
- visual-generatorSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Write an HTML file using the template in references/template.html
- Distinctive: line 26
If it spills onto a second page, compress (see "Fitting one page")
- Distinctive: line 31
Check what's available, then install if needed:
- Distinctive: line 38
If Playwright is missing:
- Distinctive: line 43
If pdf2image is missing (needed for visual verification):
- Very specific: line 109
Ask only what you actually need.
- Distinctive: line 117
Don't ask about things you can infer or default sensibly:
- Distinctive: line 122
If the user uploads an existing document to modify, read it first and preserve their structure and wording where possible.
- Distinctive: line 136
Not every document needs every section.
- Very specific: line 142
Use חד־פעמי and דו־צדדי with the maqaf ־ (not a hyphen -)
- Distinctive: line 173
When a price changes, check whether it appears in more than one place.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Hebrew Business Documents (RTL PDF)
Generate clean, professional Hebrew business documents as one-page PDFs.
Why this skill exists
Hebrew is right-to-left. Most PDF generation paths get this wrong in ways that look unprofessional:
- ReportLab and FPDF reverse Hebrew characters or output gibberish
- WeasyPrint often lacks Hebrew font support in default containers
- Word/docx exports mangle mixed Hebrew-English text
- Numbers and Latin words (like "SEO" or "Google Analytics") inside Hebrew sentences flip position
The working method: HTML + CSS with dir="rtl" → Chromium via Playwright → PDF. Chromium has a mature bidirectional text engine. It handles Hebrew, mixed Hebrew-English, numbers, and punctuation correctly with no special handling.
Workflow
- Gather the details you need (see "What to ask" below)
- Write an HTML file using the template in
references/template.html - Convert to PDF with the Playwright script below
- Render the PDF as an image and look at it to verify it's correct
- If it spills onto a second page, compress (see "Fitting one page")
- Present the PDF to the user
Environment setup
Check what's available, then install if needed:
python3 -c "from playwright.sync_api import sync_playwright; print('playwright ok')" 2>&1
python3 -c "import pdf2image; print('pdf2image ok')" 2>&1If Playwright is missing:
pip install playwright --break-system-packages && playwright install chromiumIf pdf2image is missing (needed for visual verification):
pip install pdf2image --break-system-packagesGenerating the PDF
from playwright.sync_api import sync_playwright
from pdf2image import convert_from_path
import os
html_path = '/home/claude/doc.html'
out = '/mnt/user-data/outputs/שם_המסמך.pdf'
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto(f'file://{html_path}')
page.wait_for_load_state('networkidle')
page.pdf(
path=out,
format='A4',
print_background=True,
margin={'top': '0', 'bottom': '0', 'left': '0', 'right': '0'}
)
browser.close()
# Always verify visually
imgs = convert_from_path(out, dpi=110)
print(f'Pages: {len(imgs)}')
imgs[0].save('/home/claude/preview.png')Then view the preview image. Never present a PDF you haven't looked at — RTL problems are visual and won't show up in the code.
Margins: set page margins in the CSS @page rule, not in page.pdf(). Passing margins in both places double-applies them.
Critical CSS rules
These are what make Hebrew render correctly. Getting any of them wrong produces the broken output users complain about:
@page { size: A4; margin: 12mm 14mm; }
body {
font-family: 'DejaVu Sans', 'Arial', sans-serif; /* DejaVu Sans has full Hebrew coverage */
direction: rtl; /* the single most important line */
...
}
table th { text-align: right; } /* Hebrew headers align right, not left */
.summary, .note {
border-right: 4px solid #2563eb; /* accent bars go on the RIGHT in RTL */
}
ul { padding-right: 18px; padding-left: 0; } /* list indent flips */Do not set text-align: left anywhere on Hebrew text. Do not use border-left for accent bars. Do not reverse Hebrew strings manually — Chromium handles it.
Mixed Hebrew-English works with no extra effort. Write חיבור ל־Google Analytics and it renders correctly. Same for numbers: 170 ₪ לחודש.
What to ask before writing
Ask only what you actually need. Use ask_user_input_v0 if available (tappable options are much easier than typing on mobile), otherwise ask inline. Keep it to 1-3 questions.
Usually needed:
- Business name (goes where a logo would — styled prominently at the top)
- Client name (optional — some documents omit it and just carry a date)
- The line items: what's being sold, one-time vs recurring, prices
- Payment terms (upfront? on delivery? split?)
Don't ask about things you can infer or default sensibly:
- Date → use today's date
- Validity → 30 days is the standard default for a quote
- Currency → ₪ for Israeli documents
If the user uploads an existing document to modify, read it first and preserve their structure and wording where possible.
Document structure
The standard layout, top to bottom. Read references/template.html for the full working HTML.
- Header — business name (large, colored, acts as the logo), tagline, business number (ח״פ / ע״מ) if provided, then client name and date
- Greeting —
שלום רב,and a one-line intro naming what the document covers - Items table — columns right-to-left:
#,תיאור השירות,סוג תשלום,מחיר (₪) - Cost summary — highlighted box separating one-time from recurring totals
- Notes (optional) — yellow callout box for things excluded or on the client's account (domain purchase, API costs, etc.)
- Terms —
תנאי ההתקשרות, a bulleted list - Signature —
אישור הלקוחwith two lines:חתימהandתאריך
Not every document needs every section. An invoice skips the terms; a form is mostly fields.
Writing the Hebrew
Match the register of Israeli business correspondence:
- Use
חד־פעמיandדו־צדדיwith the maqaf־(not a hyphen-) סה״כuses gershayim״, not a quote mark- Prices as
1,200 ₪— comma separator, shekel sign after the number with a space - Service descriptions: a bold title line, then a short description or bulleted sub-items
- Terms are declarative:
התשלום החודשי יחויב מראש בתחילת כל חודש קלנדרי.
Standard phrasings worth reusing:
הצעה זו בתוקף ל־30 יום ממועד הוצאתה (עד [תאריך]).אישור ההצעה מהווה אישור לתחילת העבודה ולתנאי ההתקשרות המפורטים לעיל.רכישת הדומיין הינה על חשבון הלקוח ואינה כלולה בהצעה זו.50% מהתשלום ישולמו עם אישור ההצעה; היתרה במסירת התוצר.
Dates in Hebrew: 13 במאי 2026.
Fitting one page
Business documents should be one page. Two pages with a nearly-empty second page looks unprofessional. If content spills over, compress in this order — each step is less visible than the next:
- Reduce
@pagemargins (12mm 14mm→8mm 12mm) - Reduce
line-height(1.45 → 1.3 → 1.25) - Reduce table cell
padding(7px → 5px → 4px) - Reduce
h2margins and.signaturemin-height - Drop
bodyfont-size (9.5pt → 8.5pt — don't go below 8pt, it gets hard to read) - Merge the closing line into fewer lines, or cut the footer
Regenerate and re-check page count after each change. For a document with one or two line items, generous spacing (9.5-10pt, 1.45 line-height) looks better than cramming. Only compress when you actually need to.
Iterating
Users almost always come back with changes — a price, a line item, payment terms. Keep the HTML file around and edit it with str_replace rather than regenerating from scratch.
When a price changes, check whether it appears in more than one place. A price typically appears in the items table, the cost summary, and the payment terms (e.g. "50% (3,450 ₪)"). Missing one produces an inconsistent document, which is worse than the original error.
Output
Save PDFs to /mnt/user-data/outputs/ with a descriptive Hebrew filename, then present with present_files. Hebrew filenames work fine.
Beyond quotes
The same template and method work for other documents — change the sections, keep the CSS:
- חשבונית / קבלה — add invoice number and date fields to the header, VAT (מע״מ) row in the summary, drop the terms section
- חוזה / הסכם — replace the items table with numbered clause sections, add signature blocks for both parties
- טופס — replace the table with labeled input rows (a label and a bottom-bordered empty box)
- הצעה / מסמך אפיון — headings and prose sections instead of a table
references/template.html is the base. Adapt the structure; the CSS rules for RTL stay the same.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

