doc-style-builder
Skill0 starsChanged 30 days agoMITView on GitHub
Write and build documentation for any work product (an API, a deploy or update, a system, a feature, a release, a test round) in one consistent house style, and output a matching PDF + DOCX from a single Markdown source. Use whenever the user wants to document, write up, report on, or hand over something: "write an API spec", "เขียนเอกสาร", "ทำรายงานอัปเดต", "document this endpoint", "make a user guide", "write the README", "changelog for this release", "system overview for onboarding", "report for the client", "export as PDF and Word", or asks to make an existing document match the house style. Covers seven document types (report/change record, API reference, user guide/quickstart, FAQ, architecture/onboarding, README, changelog) with fixed skeletons, and a theme of TH Sarabun fonts, a plain black/grey palette, and green/yellow/red change highlighting. Thai-first headings; English works the same way.
In this repository8 other files it gives its agents.
- dependency-vuln-explainerSkill
- design-coreSkill
- design-flowSkill
- pdf-operationsSkill
- poc-spec-driven-builderSkill
- podman-disk-reclaimSkill
- prompt-cache-kitSkill
- thai-mock-namingSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Ground: Check each fact against the real thing before writing it: the controller and DTO for an API, the server's own output for a deploy, …
- Distinctive: line 36
Build: Write the Markdown to the skeleton, then run the builder (below).
- Distinctive: line 46
Keep at most about four per target.
- Distinctive: line 47
Readers outside the team see nothing internal: No internal paths, config-section names, ticket shorthand or chat handles.
- Very specific: line 52
Revisions are visible: Add a revision-history row (Version | วันที่ | ผู้เขียน | รายละเอียด), mark changed table rows [+] / [~] / [-], and …
- Distinctive: line 54
Keep removed rows in the table, struck through.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Doc Style Builder
One method, seven skeletons, one theme. The value is consistency: a reader who has seen one document of a type can find what they need in the next one without reading it, and a revision shows exactly what changed.
Work like this: gather → ground → summarize → confirm → build
The usual failure is a document that looks right and describes the system wrongly. Avoid it in this order:
- Gather. Collect what the user points at: code, an OpenAPI file, logs, screenshots, notes, an older version of the document.
- Ground. Check each fact against the real thing before writing it: the controller and DTO for an API, the server's own output for a deploy, the running screen for a guide. When the user's notes and the system disagree, the system wins. Tell the user about the conflict.
- Pick the reader and the type. Decide who reads it (end user, integrator, operator, developer,
approver outside the team), then pick the type from
references/doc-types.md. The reader decides what to leave out. - Summarize. List the sections, the tables, and what changed since the last version, as a short scannable list.
- Confirm. Show the summary and wait for a go-ahead, unless the user said to just build it.
- Build. Write the Markdown to the skeleton, then run the builder (below).
House rules
- Short and finished. A document says what was done, where, and what the result was. Leave out the working: raw logs, dead ends, the tools you happened to use.
- Every claim has evidence. A result row points to a screenshot, a response, or a command output. A check
with no evidence stays in the table as
ยังไม่มีหลักฐาน/ "no evidence yet". It is never dropped and never marked as passed. - Screenshots prove where they were taken. The address bar or the shell prompt is visible. Keep at most about four per target.
- Readers outside the team see nothing internal. No internal paths, config-section names, ticket shorthand or chat handles. Use real usernames only when the reader needs them to log in, and name issue owners by role ("IT ของลูกค้า", "ทีมพัฒนา").
- Unknown is
-, never invented. A production URL that does not exist yet is-. - Blank is not zero. An empty value stays empty or
-. Never write0for "not measured". - Revisions are visible. Add a revision-history row (
Version | วันที่ | ผู้เขียน | รายละเอียด), mark changed table rows[+]/[~]/[-], and include the legend once (seereferences/theme.md). Keep removed rows in the table, struck through; do not delete them. - Dates. Thai readers get Buddhist-era
dd/mm/yyyy+543(13/10/2569). Follow whatever an existing document already uses. - Thai prose. Headings and fixed labels stay Thai as in the skeleton. Field names, types, commands and
JSON stay as they are. For paragraphs of Thai, use a Thai-writing skill such as
kien-thaiif one is installed. Keep technical terms that practitioners say in English (deploy,schema,endpoint). - Never hand-edit the output. Fix the Markdown (or the theme) and rebuild.
Build
uv run scripts/build_doc.py doc.md # -> "doc - Update <ddmmyyyy>.pdf" + ".docx"
uv run scripts/build_doc.py doc.md --prefix ACME --out dist --formats html,pdf,docx
uv run scripts/build_doc.py doc.md --no-date # -> "doc.pdf" + "doc.docx"Needs pandoc on PATH. The PDF needs Chromium for playwright once:
uv run --with playwright playwright install chromium. Run the script from this skill's folder or give its
full path; it finds assets/theme.css relative to itself.
The Markdown is pandoc Markdown:
- Front matter sets
title,subtitle,authoranddate. - Pipe tables take their column widths from the separator dashes.
- A table with an empty header row becomes a key/value table, with the key column shaded.
gives a captioned figure.- A first cell that starts with
[+],[~]or[-]marks the row as added, edited or removed.
references/example.md exercises all of it. Build it once to check the setup.
File names follow [<PREFIX>_]<name> - Update <ddmmyyyy>.<ext>, so a folder groups documents by topic and
a rebuild on the same day replaces the earlier file.
Theme
assets/theme.css is the only place fonts, sizes and colors are defined. The builder reads its tokens for the
DOCX and applies the stylesheet to the HTML/PDF. references/theme.md explains each token.
To re-brand, edit the tokens and keep the rule that color carries meaning (pass/fail, change state) and
nothing else.
Check before handing over
- Open the PDF and the DOCX. Check that headings, tables and code blocks look the same in both, that header rows repeat across pages, and that no row is cut in half.
- Re-read the result and issue tables against the evidence: every result row should trace to something the reader can see.
- For an outside reader, search the Markdown for internal paths, hostnames, config labels and handles before sending.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

