/typst-document-generator:screenplayfrom typst-document-generator
Typeset a screenplay as a PDF with Typst in standard spec-script format (Courier 12, US Letter, industry margins and element indents, title page, numbered pages). Takes the script in any form (Fountain, plain text, Markdown, a Word/PDF export, a Final Draft .fdx, or prose to adapt), prepares it into scene headings, action, dialogue, parentheticals and transitions, then renders through the bundled `screenplay.typ` skeleton. Use on "format this as a screenplay", "make a script PDF", "turn this into screenplay format", "typeset my Fountain file".
Ships in typst-document-generator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Renders through shared/screenplay.typ, not styles.typ. A screenplay is a
fixed industry format, not a house style: no IBM Plex, no branding, no
header/footer conventions, no AI-assistance line on the page. No profile or
onboarding is needed. If "${CLAUDE_PLUGIN_ROOT}/scripts/paths.sh" reports a
profile, offer its author.name as the default author; otherwise ask. If the
user has their own variant in the overlay (paths.sh bases shows a user
screenplay.typ), copy that one instead of the built-in.
Typst must be installed at a resolvable path (
which typst). Do not try to install it automatically.
| Element | Position (US Letter, Courier 12) | Helper |
|---|---|---|
| Margins | left 1.5in, right 1.0in, top 1.0in, bottom 1.0in | screenplay.with(...) |
| Scene heading | left margin, uppercase, 2 blank lines above, kept with the next block | #scene[INT. KITCHEN - NIGHT] |
| Action | left margin, 6.0in wide | #action[...] |
| Character name | 3.7in from the page edge, uppercase, extension in brackets | #dialogue("ANNA", ext: "V.O.")[...] |
| Parenthetical | 3.1in from the page edge, 2.0in wide | paren[quietly] inside dialogue |
| Dialogue | 2.5in from the page edge, 3.5in wide | #dialogue("ANNA")[...] |
| Transition | right-aligned, uppercase | #transition[CUT TO:] |
| Centered | centered | #centered[THE END] |
| Dual dialogue | two columns side by side | #dual(("ANNA", [Stop!]), ("BEN", [Go!])) |
| Page number | top right, 2. form, from the second script page; the title page is unnumbered | automatic |
Every line sits on a 12pt grid (6 lines per inch), so one page is roughly one minute of screen time. Don't change the font size, line height or margins to make a script fit: that breaks the page-minute rule, and readers spot it.
screenplay.with options: title, author, credit (default "Written by"),
source (e.g. [Based on the novel by …]), contact (title page, bottom left),
draft (title page, bottom right, e.g. [First Draft \ 2 November 2026]),
paper ("us-letter" default, "a4"), scene-numbers (false for a spec
script, true for a shooting script), title-page (default true), font.
Identify what you were given and pull out plain text:
| Input | How |
|---|---|
Pasted text, .txt, .md, .fountain | Read it directly |
.docx, .odt, .rtf | pandoc -t plain --wrap=none in.docx |
.pdf | pdftotext -layout in.pdf -. Keep -layout: the indentation tells you which lines are character names and which are dialogue |
.fdx (Final Draft) | XML: each `<Paragraph Type="Scene Heading |
| Prose, a story, notes, a transcript | This is adaptation, not conversion (see below) |
Then decide which job this is, and say which in one line before you start:
// NOTE: comment in the .typ file and
list the gaps in your report.Fountain is the most common text form. Its rules are a good classifier for any plain-text script:
| Line looks like | Element |
|---|---|
Starts INT., EXT., INT./EXT., I/E, EST. (or Fountain .FORCED) | scene |
| ALL CAPS on its own line, blank line before, text directly after | dialogue name. A trailing (V.O.), (O.S.), (O.C.) or (CONT'D) goes to ext: |
(…) on its own line inside a speech | paren |
Fountain ^ after the second character name | dual |
ALL CAPS ending in TO:, or Fountain > TEXT | transition |
Fountain > TEXT < | centered |
Title-page keys (Title:, Credit:, Author:, Source:, Contact:, Draft date:) | screenplay.with options |
[[notes]], /* boneyard */ | Drop, or keep as // comments |
= synopsis, # section | Drop. They're outline aids, not printed |
| Anything else | action |
When converting, fix only the mechanical items below, and list what you changed. When adapting, write to all of them:
INT./EXT. + LOCATION + - + DAY/NIGHT (or
CONTINUOUS, LATER, MOMENTS LATER). Go from general to specific:
INT. HOSPITAL - CORRIDOR - NIGHT.MIRIAM (60s). After that, normal case.DR. COHEN, not
sometimes COHEN).V.O. is a speaker who isn't in the scene's space (narration, the far end of
a phone call). O.S. is in the space but off-screen. CONT'D is the same
speaker resuming after an action line.CLOSE ON, WE SEE, ANGLE ON) and
few transitions. FADE IN: opens the script (#action[FADE IN:], left
aligned) and FADE OUT. closes it (#transition[FADE OUT.]).Script text goes inside content blocks [...], where these characters mean
something. Escape them with a backslash:
| Character | Problem | Write |
|---|---|---|
# $ @ < > * _ ` \ | markup or code | \# \$ \@ \< \> \* \_ \` \\ |
[ ] | close the block early | \[ \] |
// (not part of an http(s):// URL, which Typst links automatically) | starts a comment, silently eats the rest of the line | \/\/ |
- + = at the start of a line | list, enum, heading | \- \+ \= |
~ | non-breaking space | \~ |
-- becomes an en dash and --- an em dash. That's fine in action and usually
intended. ... becomes an ellipsis, and straight quotes become curly ones.
Leave both as they are.
Character names go in as strings ("ANNA"), so only " and \ need escaping
there.
Pick the output path. Propose ./{slug}.typ, or use profile.default_output_dir if it's set.
Copy screenplay.typ next to the output .typ: the overlay copy from paths.sh bases if there is one, otherwise ${CLAUDE_PLUGIN_ROOT}/shared/screenplay.typ.
Write the document:
#import "./screenplay.typ": *
#show: screenplay.with(
title: "The Last Bus",
author: "Jane Doe",
contact: [Jane Doe \ jane\@example.com],
draft: [First Draft \ 2 November 2026],
)
#action[FADE IN:]
#scene[EXT. CENTRAL BUS STATION - NIGHT]
#action[Rain hammers the concrete. MIRIAM (60s) watches the departures board go dark.]
#dialogue("MIRIAM", paren[to herself], [Of course it's gone.])
#dialogue("YONI", ext: "O.S.")[Last one to Haifa!]
#transition[CUT TO:]
Use one helper call per element, with a blank line between calls. Don't put raw text outside the helpers.
Compile: typst compile {path}.typ. Warnings like unknown font family: courier prime are normal: the template lists fallbacks, and Typst warns
about each one it doesn't find. On a real error, show it verbatim and
stop. Don't retry with guesses.
Check the font: pdffonts {path}.pdf should show a Courier-metric
monospace font (Courier Prime, Courier New, Courier, or Nimbus Mono PS). If
only Liberation Mono or DejaVu was found, the page count won't match a real
Courier script. Tell the user that Courier Prime is free (SIL OFL, Google
Fonts) and is the usual choice, but don't install it yourself.
Render and look at it before you report success:
pdftoppm -png -r 50 -f 1 -l 3 {path}.pdf /tmp/screenplay-preview
Check that character names line up in one column, dialogue sits in its
narrower column, scene headings aren't stranded at a page bottom, the title
page is unnumbered, and the first numbered page says 2..
Report the PDF path, the page count (≈ minutes) and, for a conversion, any lines you weren't sure how to classify.
(MORE)/(CONT'D) at page
breaks. That's right for drafts, table reads and sharing. It can leave a
short page now and then.(CONT'D) for a speaker interrupted by action isn't automatic. Add it with
ext: "CONT'D".(MORE)/(CONT'D) page breaking or
an .fdx file, Typst isn't the right tool. Say so, and offer the classified
script as a .fountain file for a Fountain tool (afterwriting, screenplain).What SKILL.md sets; muted values are Claude Code's defaults
typst-document-generator@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin typst-document-generator12 skills in this plugin
/add-profilePromote a one-off Typst document into a reusable named format. By default it goes into the user's private overlay (their own template YAML, and a Typst base if the look needs one), so personal and business formats never enter the public plugin. Only a generic look the user wants to share becomes a built-in. Verifies by rendering and records any Typst traps hit along the way. Use when a PDF came out well and the user wants that look reusable ("save this as a profile", "I want to reuse this style", "add this to my Typst templates"), or when auditing which profiles already exist before building a new one./briefingGenerate a printable Typst briefing or field sheet using the user's `briefing` template — dark full-bleed cover, a classification marking watermarked on every page, and a checkbox-first body with quantities, prices and addresses. Use for shopping lists, trip plans, run sheets, packing lists, site-visit sheets, or any single-subject document that will be printed and carried rather than read at a desk./business-docGenerate a Typst document using the user's business template (`business-doc`). Business logo in header, footer link to `{business.site}`. Use for general business documents that are not client-specific and not confidential (proposals, whitepapers, external reports). Requires profile.business to be populated.Other plugins' skills for the same job