Pdf

From okou-ai/okou-skills · View interactive version

Pdf is an AI agent skill from the GitHub repository okou-ai/okou-skills. Create, fill, or reformat PDF files, including research and technical reports with tables, charts, equations, citations, figures, code, and flowcharts. Use for "make a PDF", "write a proposal", "professional document", "cover page", "fill in this PDF form", "what fields does this PDF have", "reforma

How to use this skill

Skill file

PDF

1. Common requirements

Set SKILL_DIR to the absolute directory containing this file, not the task's

working directory. Identify output format(s), source, content features and

formatting requirements first. Deliver only the requested format(s); an internal

DOCX authoring file is not automatically an extra deliverable.

Honor explicit requirements and supplied templates, including typography, colors,

cover/no-cover layout, spacing, and numbering. Do not silently substitute a

preset. Verify actual capabilities and disclose unavailable fonts or unsupported

requirements. Presets do not supply research, finance, legal or medical expertise

or standards certification.

2. Named manuscript requirement or visual preset

select capable authoring per requirement profiles.

--type academic does not implement APA/IEEE. Consider

DOCX and PDF export when appropriate; verify its actual fonts

and layout too, rather than claiming unsupported compliance.

designed report, read presentation before

CREATE/REFORMAT. It owns supported preset names, tokens and overrides.

do not independently redesign the PDF with this pipeline.

3. Select the operation

| Authorized task | Direct workflow | Existing implementation |

|---|---|---|

| New cover/body PDF | Route A: CREATE | palette.py → cover.py → render_cover.js → render_body.py → merge.py |

| Form inspection or filling | Route B: FILL | fill_inspect.py → fill_write.py |

| Requested redesign of an existing document | Route C: REFORMAT | reformat_parse.py → CREATE |

| Completed output | VALIDATE | Reopen, source comparison and applicable actual-page QA |

For a creation/redesign request, clarify whether a source exists if needed:

existing source → REFORMAT, no source → CREATE. FILL stays separate; an input

alone does not authorize redesign. These remain the three implemented operations,

with no new general READ, OCR, scans, signature or exact-layout editing workflow.

PDF text parsing is best-effort, not lossless layout or source reconstruction.

Read environment for only the selected

route. For this cover/body pipeline, run

bash "$SKILL_DIR/scripts/make.sh" check once per session before this pipeline's

CREATE/REFORMAT; it checks actual Chromium launch. A different authoring route uses

that route's setup and validation instead. DOCX-to-PDF does not require Chromium;

FILL and read-only inspection need Python/pypdf, not the browser pipeline: do

not make them install Chromium.

Load content features directly

For every CREATE/REFORMAT using this pipeline, read the

block contract, then only

applicable sections. This is the single block-schema authority; presentation

owns appearance, not duplicated fields. Follow the operation's workflow and

actual output validation before delivery.

| Required feature | Direct reference |

|---|---|

| Headings, prose, lists, tables, breaks and spacing | Common blocks and tables |

| Equations, labels and mathtext limits | Mathematics |

| Charts, datasets and defaults | Charts |

| Images, figures, captions and shared numbering | Figures and captions |

| Citations and references | Bibliography |

| Code whitespace and language labels | Code |

| Process nodes, arrows and back-edges | Flowcharts |

| Delivered content features | Feature-specific rendering QA |

Package organization

references/common/, domains/, operations/ and implementation/ separate

appearance, applicable requirements, workflows and technical detail. All guides

are linked directly above; load only relevant files. scripts/ entry points and

licenses remain in their existing locations. A successful check, merge or parser

call is not a substitute for inspecting content and actual pages; disclose

unexecuted checks.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.