Communitygithub.com

merysugy/indesign-layout-prep

Prepares documents for professional layout in Adobe InDesign instead of laying them out with AI. Extracts the design system (paragraph/character styles, colours, grid) from the user's reference PDF, or reads it from their own InDesign file exported as IDML, and delivers an IDML with every style, swatch and table style plus the Word .docx content already laid out in those styles (titles, body, lists, emphasis, tables, threaded pages). Then proposes visual resources (key figures, diagrams, mind maps) as editable InDesign scripts. Also writes ExtendScript (ES3) import scripts for new text. Use when the user mentions InDesign, IDML, .indd/.indt, ExtendScript or .jsx for InDesign, maquetar/maquetación, a whitepaper, report, magazine or brochure to lay out, a style sheet or "sistema de estilos" from a PDF, or putting a Word document into InDesign.

indesign-layout-prep 是什麼?

indesign-layout-prep is a Claude Code agent skill that prepares documents for professional layout in Adobe InDesign instead of laying them out with AI. Extracts the design system (paragraph/character styles, colours, grid) from the user's reference PDF, or reads it from their own InDesign file exported as IDML, and delivers an IDML with every style, swatch and table style plus the Word .docx content already laid out in those styles (titles, body, lists, emphasis, tables, threaded pages). Then proposes visual resources (key figures, diagrams, mind maps) as editable InDesign scripts. Also writes ExtendScript (ES3) import scripts for new text. Use when the user mentions InDesign, IDML, .indd/.indt, ExtendScript or .jsx for InDesign, maquetar/maquetación, a whitepaper, report, magazine or brochure to lay out, a style sheet or "sistema de estilos" from a PDF, or putting a Word document into InDesign.

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/merysugy/skillhub-indesign/tree/HEAD/skills/indesign-layout-prep

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

InDesign layout prep

Claude does not design the document. Claude prepares it so the designer can design it in InDesign. When InDesign opens the file, the styles and swatches are already set up, the text is placed and styled (titles, body, lists, emphasis, tables), and a proposal of visual resources comes with it. The mechanical work shrinks, and the design stays with a person.

Always answer in the user's language. Use the style names the user and the brand already use in files, styles and code.

First: is this workflow the right tool?

  • Use it when the result has to be professional: print-ready or device-ready, long or important documents (whitepapers, reports, magazines, catalogues), or anything that will be iterated on in InDesign.
  • Don't use it for quick, low-stakes pieces Claude can produce on its own, such as a one-page summary or an internal note. Say so and offer to make it directly.
  • Laying out a whole document with Claude and regenerating it for every small fix wastes tokens. This workflow moves the detail work into InDesign.

Inputs and routes

Ask only for what is missing, in one message:

  1. Content: the Word document (.docx) to lay out.
  2. Where the design comes from. Ask which route applies:
    • Route A, a reference to replicate: a PDF, or a PDF export of a design made in Figma, InDesign, Canva and so on.
    • Route B, styles that already exist in InDesign: a template or a previous document. Ask for it as IDML (File > Save As > InDesign Markup (IDML)). If they also share a PDF of a finished piece, use it to decide which of their styles and master pages go where.
  3. Format (route A, if not obvious): page size, margins, columns, facing pages, print or screen.

No style system is bundled with this skill. Every project's styles come from its own reference (route A) or its own IDML (route B). Never reuse styles, colours or fonts from another project.

The three steps

Work through one step at a time. End each step with what was produced and what the user should check, then wait for their go-ahead.

Step 1: Styles and laid-out text in one IDML

Route A. Read references/01-style-analysis.md, then references/02-idml-document.md.

  1. Analyse the PDF and the Word file. Write style-system.json (schema in assets/style-system.schema.json) with the grid, colours, paragraph and character styles, the roles that say which style each part of the content gets, and a tables block if the content has tables.
  2. Build the document and the empty template, then check both:
    python3 scripts/build_idml.py style-system.json -o <name>.idml --content content.docx
    python3 scripts/build_idml.py style-system.json -o <name>-template.idml
    python3 scripts/check_idml.py <name>.idml <name>-template.idml
    
  3. Deliver everything together: the style table (with estimated values flagged), the laid-out IDML and the empty template. Corrections are cheap: fix the JSON and run the scripts again.

Route B. Read references/existing-idml.md.

python3 scripts/extract_idml.py their.idml -o style-system.json   # then add roles
python3 scripts/fill_idml.py their.idml style-system.json content.docx -o <name>.idml
python3 scripts/check_idml.py <name>.idml

Show which of their styles you mapped to each role, before or with the result.

In both routes:

  • Never hand-write IDML XML. Always use the scripts, and fix the JSON when they report an error.
  • Never deliver an IDML that check_idml.py rejects.
  • The page count is an estimate with one spare page. InDesign composes the final text, and anything that does not fit stays as overset text, so nothing is ever lost. Tell the user.
  • Pass on the script's report: the styles, lists, tables and hashtags it handled, and anything the user should edit, such as images in the Word file (they are not placed) or social-media phrases.

Step 2: Propose visual resources

Read references/03-visual-resources.md. Using the content and the identity already analysed, propose resources section by section: key figures, diagrams, mind maps, comparisons, callout boxes, cards, screenshots, images. For each one, say what it represents and why it helps the reader, and give a sketch in the brand colours and fonts. Don't lay out the full document: only the resources, in content order. Compositions in the reference that are not plain text or tables (boxes, cards, bands, mind maps) belong here, not in step 1.

For each resource the user picks, adapt assets/visual_resource.jsx so it builds that element inside InDesign with the document's swatches and styles, fully editable. Check it with scripts/check_es3.py.

Step 3: Hand over to design

Summarise what is ready and what is left to the designer: page rhythm, emphasis and breathing room, images, white space, final details. Offer help with specific scripts (a TOC, page fitting), but don't try to finish the layout.

Alternative: import text with a script inside InDesign

Read references/import-script.md when the user:

  • already has a document started in InDesign and new text arrives,
  • has a very long Word file and prefers InDesign to create the pages, or
  • asks for the script approach.

Fill in assets/import_docx.jsx (its CONFIG mirrors the roles block), read references/extendscript-rules.md, and run scripts/check_es3.py before delivering.

Files in this skill

FileUse
references/01-style-analysis.mdRoute A: measure the reference, write the table and the JSON
references/02-idml-document.mdRoute A: roles, tables, build and check the IDML
references/existing-idml.mdRoute B: work inside the user's own IDML
references/03-visual-resources.mdStep 2: resource proposal and resource scripts
references/import-script.mdAlternative: ExtendScript import inside InDesign
references/extendscript-rules.mdES3 rules and InDesign scripting pitfalls
scripts/build_idml.pyRoute A: style system (+ Word) to .idml
scripts/extract_idml.pyRoute B: existing .idml to style-system JSON
scripts/fill_idml.pyRoute B: Word content laid out inside the user's .idml
scripts/idml_content.pyShared: Word reading, roles, story, tables, pages
scripts/check_idml.pyStructural check of any .idml before delivery
scripts/inspect_docx.pyReport on the Word file's structure
scripts/check_es3.pyCatches modern JavaScript in .jsx files
assets/style-system.schema.jsonFormat of the style system, roles and tables
assets/import_docx.jsxAlternative import script template
assets/visual_resource.jsxStep 2 resource script template with drawing helpers

If code execution is not available, still deliver the table, the JSON and the scripts, and tell the user how to run them locally. They only need Python 3.

相關技能