Логотип Document Creator

Document Creator

Організація
khoj-ai
document-creator

Create and edit professional Word (.docx) and Excel (.xlsx) documents. Use to create reports, memos, proposals, financial models, invoices, or modify existing Office documents. Supports rich text, tables, lists, images, formulas, charts, and tracked changes.

Огляд

Видавецьkhoj-ai
Репозиторійpipali
Назва навичкиdocument-creator
Зірки
318
Форки
61
Файли в пакеті
13
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 13

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем khoj-ai. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Document Creator у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/khoj-ai/pipali/tree/main/src/server/skills/builtin/document-creator
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/khoj-ai/pipali.git /tmp/pipali
mkdir -p .claude/skills
cp -r /tmp/pipali/src/server/skills/builtin/document-creator .claude/skills/document-creator
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Document Creator в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Document Creator, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Document Creator не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Document Creator

Create professional-grade Word and Excel documents for expert knowledge workers.

Quick Reference

TaskToolCommand Pattern
Create Word docdocx_create.tsbun run scripts/docx_create.ts --spec spec.json --output doc.docx
Edit Word docdocx_unpack.py + XML editing + docx_pack.pySee Word Editing section
Create/Edit Excelxlsx_create.pyuvx --with openpyxl python scripts/xlsx_create.py --spec spec.json --output file.xlsx
Verify formulasxlsx_recalc.pyuvx --with openpyxl python scripts/xlsx_recalc.py file.xlsx

Decision Tree

What type of document?
├── Word (.docx)
│   ├── Create new → Use docx_create.ts (TypeScript)
│   └── Edit existing → Unpack → Edit XML → Repack (Python)
└── Excel (.xlsx)
    └── Create or Edit → Use xlsx_create.py (Python)

Word Document Creation

Use scripts/docx_create.ts to create new Word documents from a JSON specification.

Running the Script

bash
# From the scripts directory
cd ~/.pipali/skills/document-creator/scripts
bun run docx_create.ts --spec spec.json --output report.docx

# Or with full path
bun run ~/.pipali/skills/document-creator/scripts/docx_create.ts \
  --spec spec.json \
  --output report.docx

Specification Format

json
{
  "properties": {
    "title": "Document Title",
    "creator": "Author Name"
  },
  "styles": {
    "defaultFont": "Calibri",
    "headingFont": "Cambria",
    "fontSize": 11
  },
  "sections": [
    {
      "properties": { "type": "continuous" },
      "children": [
        { "type": "heading", "level": 1, "text": "Main Title" },
        { "type": "paragraph", "text": "Introduction paragraph." },
        { "type": "heading", "level": 2, "text": "Section 1" },
        { "type": "bulletList", "items": ["First point", "Second point"] },
        { "type": "numberedList", "items": ["Step 1", "Step 2"] },
        {
          "type": "table",
          "headers": ["Column A", "Column B"],
          "rows": [
            ["Cell 1", "Cell 2"],
            ["Cell 3", "Cell 4"]
          ]
        },
        { "type": "image", "path": "/path/to/image.png", "width": 400 },
        { "type": "pageBreak" }
      ]
    }
  ]
}

Element Types

TypeRequired FieldsOptional Fields
headinglevel (1-6), textstyle
paragraphtext (string or RichText)bold, italic, alignment, color
bulletListitems (array of string or RichText)level
numberedListitems (array of string or RichText)level
tableheaders, rowswidths, headerStyle
imagepathwidth, height, caption
pageBreak--

Rich Text Support

Paragraphs and list items support rich text with inline formatting and links. Text can be:

  • A simple string: "Plain text"
  • An array of segments with formatting: [{ "text": "bold", "bold": true }, { "text": " normal" }]

Auto-linking: URLs (http:// or https://) in text are automatically converted to clickable hyperlinks.

TextSegment properties:

PropertyTypeDescription
textstringThe text content (required)
boldbooleanBold formatting
italicbooleanItalic formatting
underlinebooleanUnderline formatting
linkstringURL - makes text a clickable hyperlink
colorstringText color as hex (e.g., "#FF0000")

Examples:

json
// Simple paragraph (backward compatible)
{ "type": "paragraph", "text": "Plain text paragraph." }

// Paragraph with inline formatting
{ "type": "paragraph", "text": [
  { "text": "This has " },
  { "text": "bold", "bold": true },
  { "text": " and " },
  { "text": "italic", "italic": true },
  { "text": " text." }
]}

// Paragraph with link
{ "type": "paragraph", "text": [
  { "text": "Visit " },
  { "text": "our website", "link": "https://example.com" },
  { "text": " for more info." }
]}

// List with rich text items
{ "type": "bulletList", "items": [
  "Simple string item",
  [{ "text": "Item with " }, { "text": "bold part", "bold": true }],
  [{ "text": "Click ", "link": "https://docs.example.com" }]
]}

// Auto-linked URL (no explicit link property needed)
{ "type": "paragraph", "text": "Check out https://example.com for details." }

See references/docx-js-api.md for complete API reference.

Word Document Editing

For editing existing documents (especially with tracked changes), use the unpack-edit-repack workflow.

Step 1: Unpack

bash
uvx --with defusedxml python ~/.pipali/skills/document-creator/scripts/docx_unpack.py \
  input.docx \
  --output unpacked_folder/

Step 2: Edit XML

Edit unpacked_folder/word/document.xml directly. Key elements:

  • <w:p> - Paragraph
  • <w:r> - Run (text span)
  • <w:t> - Text content
  • <w:ins> - Tracked insertion
  • <w:del> - Tracked deletion

Use scripts/docx_edit.py for common operations:

bash
# Find and replace with tracked changes
uvx --with defusedxml python scripts/docx_edit.py \
  --folder unpacked_folder/ \
  --action replace \
  --find "old text" \
  --replace "new text" \
  --track-changes \
  --author "Your Name"

Step 3: Repack

bash
uvx --with defusedxml python ~/.pipali/skills/document-creator/scripts/docx_pack.py \
  unpacked_folder/ \
  --output output.docx

See references/ooxml-structure.md for XML element reference.

Excel Creation and Editing

Use scripts/xlsx_create.py for all Excel operations.

Running the Script

bash
uvx --with openpyxl python ~/.pipali/skills/document-creator/scripts/xlsx_create.py \
  --spec spec.json \
  --output report.xlsx

Specification Format

json
{
  "sheets": [
    {
      "name": "Summary",
      "data": [
        ["Item", "Q1", "Q2", "Q3", "Total"],
        ["Revenue", 100000, 120000, 130000, "=SUM(B2:D2)"],
        ["Costs", 50000, 55000, 60000, "=SUM(B3:D3)"],
        ["Profit", "=B2-B3", "=C2-C3", "=D2-D3", "=SUM(B4:D4)"]
      ],
      "columnWidths": { "A": 15, "B": 12, "C": 12, "D": 12, "E": 12 },
      "formatting": {
        "A1:E1": { "bold": true, "fill": "#4472C4", "fontColor": "#FFFFFF" },
        "B2:E4": { "numberFormat": "$#,##0" }
      }
    }
  ]
}

Critical Excel Rules

  1. Always use formulas - Never calculate in code and hardcode results
  2. Color coding for financial models:
    • Blue (#0070C0): Input values / assumptions
    • Black: Formulas and calculations
    • Green (#00B050): Cross-sheet references
  3. Number formats:
    • Currency: $#,##0.00
    • Percentages: 0.0%
    • Years: Use text format @ to prevent 2,024
    • Zeros: Display as - using conditional format

Formula Verification

After creating files with formulas, verify them:

bash
uvx --with openpyxl python ~/.pipali/skills/document-creator/scripts/xlsx_recalc.py \
  output.xlsx

Returns JSON with any formula errors (#REF!, #DIV/0!, etc.) and their locations.

See references/xlsx-best-practices.md for formula patterns and standards.

Professional Standards

Fonts

  • Body: Calibri 11pt (Windows) or Arial 11pt (cross-platform)
  • Headings: Cambria or Arial Bold
  • Monospace: Consolas or Courier New

Font Sizes (in points)

  • fontSize in spec is in points (pt), not half-points
  • Standard body: 11pt (use "fontSize": 11)
  • Headings: 12-24pt depending on level

Margins

  • Standard: 1 inch (2.54 cm) all sides
  • Narrow: 0.5 inch (1.27 cm) for dense reports

Colors

  • Primary: #2F5496 (dark blue)
  • Accent: #4472C4 (medium blue)
  • Success: #00B050 (green)
  • Warning: #FFC000 (amber)
  • Error: #C00000 (red)

See references/professional-styling.md for complete style guide.

Template Usage

Pre-built templates are available in assets/templates/:

  • report-template.docx - Business report with sections
  • financial-model.xlsx - 3-statement financial model

To use a template:

  1. Copy template to working directory
  2. Use editing scripts to modify content
  3. Save with new filename

Troubleshooting

Dependencies not installed

If you encounter module errors, run bun install in scripts dir to manually reinstall

LibreOffice not found (for xlsx_recalc.py)

The recalc script is optional. Install LibreOffice for formula verification:

  • macOS: brew install --cask libreoffice
  • Windows: Download from libreoffice.org

Document won't open

Check for XML errors in the unpacked folder. Common issues:

  • Unclosed tags
  • Invalid characters (use &#8217; for apostrophe, etc.)
  • Missing namespace declarations

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Document Creator?

Create and edit professional Word (.docx) and Excel (.xlsx) documents. Use to create reports, memos, proposals, financial models, invoices, or modify existing Office documents. Supports rich text, tables, lists, images, formulas, charts, and tracked changes.

Навіщо використовувати Document Creator у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Document Creator — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Document Creator у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/khoj-ai/pipali/tree/main/src/server/skills/builtin/document-creator. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Document Creator?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Document Creator?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Document Creator — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Document Creator?

Так. Навичку опубліковано на GitHub: khoj-ai, за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇