Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

hebrew-document-generator

БесплатноЗапускает вложенные скриптыНе проверен

Not legal advice. Generate Hebrew documents (PDF, DOCX/Word, PPTX) with correct RTL layout, mixed Hebrew-and-English bidi handling, and Hebrew typography. Use…

skills-ilот skills-il★ 28 звёзд на GitHub

Об этом скилле

Hebrew Document Generator

Legal notice

This is a free information tool operated by an AI model. It lays out and formats Hebrew documents (PDF, Word and PowerPoint) from the content you supply, and shows the customary section and field structure for a contract, invoice, receipt and price proposal. All of its output is produced automatically by an AI model, without the involvement, review or approval of a lawyer, tax advisor or accountant. The output is not legal advice, not a legal opinion and not a document prepared by a lawyer; it is a layout template that you fill in and adapt yourself. The tool does not examine the circumstances of your transaction, does not assess whether any clause is valid or enforceable, and does not adapt the clauses to the law that applies to you. An AI model may err, omit information or reach a wrong conclusion.

Any contract, letter or other text this skill drafts is an automatic draft for personal organization only. It is not a document prepared by a lawyer, and it must not be relied on as evidence. The invoice and receipt samples are layout examples, not issued tax documents. Responsibility for reporting and paying tax is yours, the binding computation is the Tax Authority's, and representation before the Tax Authority is reserved to those the law permits. It does not replace advice that considers each person's specific facts and needs: before taking a legal step, signing a document, or filing one with an authority or a court, consult a lawyer. Any use of the output is at the user's sole responsibility.

Instructions

Step 1: Choose the Output Format

Format Library Best For RTL Support
PDF reportlab Invoices, tax docs, printable forms Register Hebrew font, use canvas.drawRightString()
PDF WeasyPrint Styled documents from HTML/CSS Native via dir="rtl" in HTML
DOCX python-docx Contracts, proposals, meeting minutes scripts/docx_rtl.py: paragraph bidi, runs split by script, w:rtl on Hebrew runs only, w:cs font on every run
PPTX pptxgenjs (Node) Presentations, slide decks RTL text boxes with rtlMode: true

Step 2: Install Dependencies and Hebrew Fonts

Python PDF generation:

pip install reportlab weasyprint python-bidi

WeasyPrint also needs the Pango system library. The simplest route on macOS is brew install weasyprint; on Debian or Ubuntu install libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0 before pip install. A missing library fails with cannot load library 'libgobject-2.0-0'; on macOS with Homebrew Pango already installed, export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib fixes it.

Python DOCX generation:

pip install python-docx

Node.js PPTX generation:

npm install pptxgenjs

Recommended Hebrew fonts (install on system):

Font Style Best For Source
Heebo Sans-serif, modern Web-style documents, invoices Google Fonts
David Classic serif Legal contracts, formal letters System (Windows; macOS with Microsoft Office)
Narkisim Serif, elegant Proposals, invitations System (Windows)
Frank Ruehl Traditional serif Academic, literary Google Fonts (Frank Ruhl Libre)
Rubik Sans-serif, rounded Presentations, marketing Google Fonts
Assistant Sans-serif, clean Business correspondence Google Fonts

See references/hebrew-fonts.md for download links and installation instructions.

Step 3: Generate Hebrew PDF with reportlab

See scripts/generate_doc.py for the full generation pipeline.

from reportlab.lib.pagesizes import A4
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.units import mm
from bidi.algorithm import get_display  # NOT `from bidi import get_display`, see below

# Register Hebrew font
pdfmetrics.registerFont(TTFont('Heebo', 'Heebo-Regular.ttf'))
pdfmetrics.registerFont(TTFont('Heebo-Bold', 'Heebo-Bold.ttf'))

def create_hebrew_pdf(filename, title, content_lines):
    c = canvas.Canvas(filename, pagesize=A4)
    width, height = A4

    # Title -- right-aligned for RTL
    c.setFont('Heebo-Bold', 18)
    hebrew_title = get_display(title)
    c.drawRightString(width - 20*mm, height - 30*mm, hebrew_title)

    # Body lines
    c.setFont('Heebo', 12)
    y = height - 50*mm
    for line in content_lines:
        display_line = get_display(line)
        c.drawRightString(width - 20*mm, y, display_line)
        y -= 7*mm

    c.save()

Key points for reportlab Hebrew:

  • Always use get_display() from python-bidi to reorder characters
  • Use drawRightString() for right-aligned RTL text
  • Register TTF Hebrew fonts explicitly -- reportlab has no built-in Hebrew support
  • Set line height to at least 1.5x font size for Hebrew readability
  • **python-bidi import, use `from bidi.alg
Полный SKILL.md на GitHub

Установить hebrew-document-generator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(python:*)
Bash(pip:*)
Bash(node:*)
Bash(npm:*)

Вложенные файлы

SKILL_HE.mdevidence.jsonmetadata.jsonoptimization-log.jsonreferences/domain-checklist.mdreferences/hebrew-fonts.mdreferences/templates.mdscripts/docx_rtl.pyscripts/generate_doc.py

FAQ

Что делает скилл hebrew-document-generator?

Not legal advice. Generate Hebrew documents (PDF, DOCX/Word, PPTX) with correct RTL layout, mixed Hebrew-and-English bidi handling, and Hebrew typography. Use whenever the output is a Hebrew or mixed Hebrew/English Word document, Hebrew PDF, or Hebrew PowerPoint ("Hebrew Word document", "מסמך Word בעברית", "create a .docx in Hebrew"), or Israeli templates like Heshbonit Mas, Hozeh, or Protokol. ALSO use this for the symptom where a Hebrew document looks fine on screen or in Claude but comes out scrambled, reversed, or broken in Word, with English, numbers, or punctuation on the wrong side ("Hebrew text reversed in Word", "fix Hebrew formatting in Word"); the fix is regenerating the .docx with paragraph-level RTL/bidi, NOT a web/CSS RTL change. Prefer over the generic docx/pdf skills ONLY when the document is Hebrew or RTL; for English-only docs use the generic skill. Covers reportlab, WeasyPrint, python-docx, pptxgenjs. Do NOT use for OCR or reading existing documents (use hebrew-ocr-forms).

Как установить скилл hebrew-document-generator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл hebrew-document-generator запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить hebrew-document-generator с