Agent skill

HTML Template Authoring

by Portwood-Global-Solutions in Portwood-Global-Solutions/Portwood

Author or repair a Portwood HTML template that renders correctly through Blob.toPdf (Flying Saucer).

Apache-2.0Auto-check passedDocuments & Office

Install HTML Template Authoring

skills CLI
$ npx skills add Portwood-Global-Solutions/Portwood --skill html-template-authoring -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Portwood-Global-Solutions/Portwood html-template-authoring --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Portwood-Global-Solutions/Portwood.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/html-template-authoring .claude/skills/html-template-authoring && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
html-template-authoring
GitHub stars
126
Token cost
~1.6k tokens
SKILL.md length
649 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Author or repair a Portwood HTML template that renders correctly through Blob.toPdf (Flying Saucer).

  • Writing a new template
  • SKILL.md covers The renderer is CSS 2.1, Images, Fonts and symbols and @page conflicts, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Converting a design to a template

What it does

HTML Template Authoring is an agent skill from Portwood-Global-Solutions/Portwood. Author or repair a Portwood HTML template that renders correctly through Blob.toPdf (Flying Saucer). Use when writing a new template, converting a design to a template, or fixing one whose PDF output doesn't match the source — collapsed layout, missing images, wrong fonts, broken charts.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering PDF. It works with Microsoft Word and Salesforce. The repository describes itself as: Free, native document generation for Salesforce. PDF, DOCX, XLSX, PPTX — merge tags, images, barcodes, QR codes, bulk generation, Flow actions. 100% Apex + LWC, zero external… The licence is Apache-2.0.

When your agent uses it

  • Writing a new template
  • Converting a design to a template
  • Fixing one whose PDF output doesnt match the source — collapsed layout

Example prompts

  • “/html-template-authoring”

What it can do on your machine

Read from SKILL.md and the folder at commit 70ede0c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are css and html).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

HTML Template Authoring loads about 1.6k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 649 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Portwood-Global-Solutions/Portwood at commit 70ede0c, republished under its Apache-2.0 licence (© Portwood-Global-Solutions). 649 words, ~1,586 tokens.

Download SKILL.mdSave it as .claude/skills/html-template-authoring/SKILL.md (or your agent's skills folder).
name
html-template-authoring
description
Author or repair a Portwood HTML template that renders correctly through Blob.toPdf (Flying Saucer). Use when writing a new template, converting a design to a template, or fixing one whose PDF output doesn't match the source — collapsed layout, missing images, wrong fonts, broken charts.

Authoring HTML templates for Portwood

HTML is the recommended source format. It skips the DOCX→HTML parse and lands more reliably in the renderer. Steer new authors here, and chart authors here without exception.

The renderer is CSS 2.1

Blob.toPdf is Flying Saucer: CSS 2.1 plus a small CSS 3 subset. Unsupported properties are silently ignored — the page still renders, but layout collapses to default block flow. Nothing warns you.

Never use
  • display: flex, display: grid, gap
  • linear-gradient(...) and friends
  • calc(...)
  • CSS custom properties (var(--x))
  • most CSS 3 layout
Use instead
  • <table>-based layout for anything multi-column
  • solid background colors
  • absolute lengths (pt, in) and percentages
  • display: table-cell / table-row on <div> where you need cell behavior without a real table
The tbody trap
css
table > tbody > tr > td { ... }   /* silently matches NOTHING */

The parse tree has no implied <tbody>. Use td attribute selectors or class-only selectors:

css
td.total { ... }

Images

URLs must be relative. Absolute https://… URLs and data: URIs both render broken — this is a hard constraint of the renderer, not a bug to work around.

If the same image appears at two different sizes, the renderer caches one layout size per URL. Vary the URL to force a re-layout (the engine appends a size key for this reason).

Fonts and symbols

The base font families resolve to the base-14 PDF fonts (Helvetica / Times / Courier, WinAnsi). Anything outside Latin-1 renders as nothing — not a box, not a fallback, absent. Checkmarks, arrows, CJK, Greek, Cyrillic all disappear.

'Arial Unicode MS' is the one family that draws them, embedding as a subsetted CID font. The trade-off is real and worth knowing:

Symbols / CJKBold
'Arial Unicode MS'✅❌ — no bold face; font-weight: bold renders regular
every other family❌✅

So a symbol-heavy document gives up bold. Build hierarchy from size, colour and fill bands instead — reversed white-on-dark headers, tinted totals rows, a solid band behind the key number.

Embedding costs roughly 1.5KB → 70KB per page that uses it, and only for the glyphs used.

@page conflicts

The engine builds a <style> from the template's Page_Size__c, Page_Orientation__c and Custom_Margins__c fields. If your source HTML also declares @page, the engine defers to your source — you do not need to clear the template's page fields.

Charts

Charts are not HTML-only — Word, PowerPoint and Excel get a rasterized PNG from DocGenChartRasterizer, and in fact support more chart shapes than HTML→PDF does. What varies is which style survives which output.

StyleWord / PPTX / XLSXHTML → PDFHTML in a browser
bar✅ PNG✅ CSS-bar✅
pivot❌✅ CSS table✅
clustered, stacked✅ PNG✅ CSS table✅
column, pie, donut, line, area✅ PNG❌✅ with htmlRender=svg
Show full SKILL.md (232 more words)Show less
The two rules behind that table

Flying Saucer drops inline <svg> from Blob.toPdf. The htmlRender=svg modifier routes through DocGenSvgChartSerializer and looks perfect in a browser, then vanishes in the PDF. If your HTML template is destined for PDF, stay on the default CSS-bar styles: bar, pivot, clustered, stacked.

pivot never rasterizes. It isn't in the rasterizer's KNOWN_STYLES because a cross-tab is a table, not a chart shape. Cross-tab belongs in HTML.

So: rich chart shapes in a PDF → author the template in Word and let the PNG pipeline handle it. Cross-tab pivots → HTML.

The pivot layout gotcha

HTML container auto-expansion looks for the nearest open <tr> when processing nested {#…} loops. Putting {#cols} directly inside a <tr> makes each column duplicate the whole row.

html
<!-- WRONG — every column repeats the entire row -->
<tr>
    {#cols}
    <td>{key}</td>
    {/cols}
</tr>

<!-- RIGHT — div + table-row, CSS 2.1 safe -->
<div class="row" style="display: table-row">
    {#cols}
    <div style="display: table-cell">{key}</div>
    {/cols}
</div>
Reference templates
FileWhat it shows
docs/SurveyChartExample.htmlCanonical chart template — single-dimension per question + cross-tab spread
docs/CommuteSurveyExample.htmlPivot + filter + multi-select + colSort composed together
docs/ChartEngineShowcase.htmlThe full style gallery

Large tables

For giant-query templates, repeating headers on every PDF page come from Flying Saucer's -fs-table-paginate: paginate plus thead { display: table-header-group; }. Be aware this mis-paginates some real-world templates dramatically — verify page count on a full render before relying on it.

Before you ship a template

  • Grep your own CSS: grep -nE "flex|grid|gap:|gradient|calc\(|var\(--" template.html
  • Confirm every <img src> is relative
  • If it has symbols, confirm the font is 'Arial Unicode MS' and you haven't relied on bold
  • Render it and count the pages

© Portwood-Global-Solutions, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/html-template-authoring of Portwood-Global-Solutions/Portwood.

Open the folder on GitHubat commit 70ede0c

Compare with similar skills

HTML Template Authoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

HTML Template Authoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
HTML Template Authoring this skillPortwood-Global-Solutions/Portwood126—~1.6kAutomated safety check: PassApache-2.0
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Gzh Designisjiamu/gzh-design-skill4k—~2.2kAutomated safety check: PassAGPL-3.0
GenOffice Document CLIgenspark-ai/genoffice9.2k—~19kAutomated safety check: PassApache-2.0
Translate Bookdeusyu/translate-book2.1k—~5.5kAutomated safety check: NotesMIT
Docsagentdocsagent/docsagent625—~834Automated safety check: PassNone

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    4k GitHub stars~2.2k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • GenOffice Document CLI

    genspark-ai/genoffice

    Creates, converts, reads and edits real pptx, xlsx, docx and PDF files locally through the genoffice command line.

    9.2k GitHub stars~19k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Translate Book

    deusyu/translate-book

    Translate books (PDF/DOCX/EPUB) into any language using parallel sub-agents.

    2.1k GitHub stars~5.5k tokensUpdated 17 days ago
    Documents & OfficeAuto-check: notes
  • Docsagent

    docsagent/docsagent

    Search and manage private, local document collections (PDF, PPTX, DOCX) offline.

    625 GitHub stars~834 tokensUpdated 13 days ago
    Documents & OfficeAuto-check passed
  • PDF

    zai-org/ZCode

    Professional PDF toolkit covering four production workflows: reports, creative visuals, academic LaTeX, and existing PDF processing.

    7.7k GitHub stars~18k tokensUpdated yesterday
    Documents & OfficeAuto-check: notes

More from Portwood-Global-Solutions/Portwood

  • Canvas Designer

    Portwood-Global-Solutions/Portwood

    Work on Portwood's Canvas designer (docGenCanvas LWC and canvasModel.js).

    126 GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Dev Setup

    Portwood-Global-Solutions/Portwood

    Get from a fresh clone of Portwood to a working, fully-tested Salesforce org.

    126 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • Triage Report

    Portwood-Global-Solutions/Portwood

    Decide whether a Portwood bug report is a real code defect or a template-authoring problem, before any code is written.

    126 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Fix Merge Tag

    Portwood-Global-Solutions/Portwood

    Fix a Portwood merge-tag or parser bug correctly across all of its resolution paths.

    126 GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Managed Package Rules

    Portwood-Global-Solutions/Portwood

    Constraints that only bite in a real managed-package install of Portwood — global visibility, Flow Apex-Defined types, namespace-prefixed keys, USERMODE on internal reads, immutable API names.

    126 GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed
  • Run Tests

    Portwood-Global-Solutions/Portwood

    Run Portwood's test suites — the one-command QA harness, the anonymous-Apex e2e scripts, Apex unit tests, prettier, and Code Analyzer.

    126 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed

Questions about HTML Template Authoring

What does HTML Template Authoring do?

Author or repair a Portwood HTML template that renders correctly through Blob.toPdf (Flying Saucer). HTML Template Authoring is an agent skill from Portwood-Global-Solutions/Portwood.toPdf (Flying Saucer).

When should I use HTML Template Authoring?

HTML Template Authoring fits situations like: writing a new template; converting a design to a template; fixing one whose PDF output doesnt match the source — collapsed layout.

How do I install HTML Template Authoring in Claude Code?

Run `npx skills add Portwood-Global-Solutions/Portwood --skill html-template-authoring -a claude-code`. Or copy the skill folder (.claude/skills/html-template-authoring in Portwood-Global-Solutions/Portwood) into .claude/skills/html-template-authoring in your project. Claude Code loads it when a task matches its description.

How do I install HTML Template Authoring in Codex?

Run `npx skills add Portwood-Global-Solutions/Portwood --skill html-template-authoring -a codex`. Or copy the skill folder (.claude/skills/html-template-authoring in Portwood-Global-Solutions/Portwood) into .agents/skills/html-template-authoring in your project. Codex loads it when a task matches its description.

Can I use HTML Template Authoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Portwood-Global-Solutions/Portwood --skill html-template-authoring -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/html-template-authoring, .gemini/skills/html-template-authoring, .github/skills/html-template-authoring and .opencode/skills/html-template-authoring in your project.

What does HTML Template Authoring need to run?

SKILL.md names no scripts, command-line tools or credentials: HTML Template Authoring is instructions for the agent only.

Does HTML Template Authoring access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is HTML Template Authoring safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does HTML Template Authoring use?

HTML Template Authoring is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does HTML Template Authoring use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to HTML Template Authoring?

Skills that share tags, products or a category with HTML Template Authoring: Markitdown (ImCa0/just-laws, 781 stars), Gzh Design (isjiamu/gzh-design-skill, 4k stars), GenOffice Document CLI (genspark-ai/genoffice, 9.2k stars) and Translate Book (deusyu/translate-book, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains HTML Template Authoring?

Portwood-Global-Solutions (a GitHub organization) maintains it in Portwood-Global-Solutions/Portwood, which has 126 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 9, 2026.

Source: Portwood-Global-Solutions/Portwood on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.