headline-card

Use this skill when the user asks to add news headline cards, 'Last Week Tonight'-style cards, headline slides, news quote slides, or media quote cards to a Typst presentation. Also use when the user wants to modify existing headline cards (add/remove cards, change quotes, swap logos, fix layout issues). Trigger on: 'add a headline', 'news card', 'LWT card', 'headline slide', 'quote card', 'media quote', 'add a quote from [publication]'.

6 stars

Best use case

headline-card is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use this skill when the user asks to add news headline cards, 'Last Week Tonight'-style cards, headline slides, news quote slides, or media quote cards to a Typst presentation. Also use when the user wants to modify existing headline cards (add/remove cards, change quotes, swap logos, fix layout issues). Trigger on: 'add a headline', 'news card', 'LWT card', 'headline slide', 'quote card', 'media quote', 'add a quote from [publication]'.

Teams using headline-card should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/headline-card/SKILL.md --create-dirs "https://raw.githubusercontent.com/edwinhu/workflows/main/skills/headline-card/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/headline-card/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How headline-card Compares

Feature / Agentheadline-cardStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use this skill when the user asks to add news headline cards, 'Last Week Tonight'-style cards, headline slides, news quote slides, or media quote cards to a Typst presentation. Also use when the user wants to modify existing headline cards (add/remove cards, change quotes, swap logos, fix layout issues). Trigger on: 'add a headline', 'news card', 'LWT card', 'headline slide', 'quote card', 'media quote', 'add a quote from [publication]'.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# LWT-Style Headline Cards for Typst Presentations

Creates "Last Week Tonight"-style headline cards: dark cards with a red date badge, publication logo (SVG), bold headline, and an italic pull quote. Data-driven from JSON so cards stay decoupled from slide markup.

## Architecture

```
presentation/
├── templates/theme.typ        ← headline-card() function lives here
├── data/headlines.json        ← card data (venue, date, headline, quote, logo)
├── assets/logos/*-white.svg   ← white-on-transparent SVG logos
└── slides.typ                 ← loops over JSON to emit one slide per card
```

The Typst function (`headline-card`) already exists in theme.typ. This skill is about **adding new cards correctly** — getting the JSON right, preparing logos, and avoiding the path/sizing pitfalls that cost hours of iteration.

## Step 1: Prepare the JSON Entry

Add an object to `data/headlines.json`:

```json
{
  "venue": "Publication Name",
  "date": "Month Day, Year",
  "headline": "The headline text exactly as published",
  "quote": "A vivid, punchy pull quote — not a summary",
  "logo": "../assets/logos/publication-white.svg"
}
```

### What makes a good quote

The quote should be **vivid and specific** — something that makes the audience react. Source quotes from the actual article, executive statements, or analyst commentary. Avoid generic descriptions like "discusses the impact of proxy advisors." Use Readwise, Consensus, or WebSearch to find the exact language.

**Good**: "Anyone who gives them money — shame on you. They should be gone and dead and done with."
**Bad**: "JPMorgan CEO criticizes proxy advisory industry practices."

### Widow check

Headlines and quotes are displayed at large font sizes on a centered card — a single orphaned word on the last line is highly visible and looks sloppy. After writing the headline and quote text, check for widows:

1. **Compile the presentation** and visually inspect each headline card
2. **Run the widow detector** if available:
   ```bash
   DETECT_WIDOWS=$(command ls -d ~/.claude/plugins/cache/tinymist-plugin/tinymist/*/skills/typst-widow-orphan/scripts/detect_widows.py 2>/dev/null | sort -V | tail -1) && uv run python3 "$DETECT_WIDOWS" presentation.pdf
   ```
3. **Fix widows in the JSON text** (not in Typst source):
   - **Tighten wording** — cut redundant words so the last line has 2+ words
   - **Use `\u00a0`** (non-breaking space, JSON-safe) between the last 2-3 words: `"proxy\u00a0advisors."` keeps "proxy advisors." together
   - **Shorten the quote** — trim from the beginning or end to shift the line break
   - **Never pad with filler words** just to fix a widow

| Before (widow) | After (fixed) |
|---|---|
| `"...should be gone and dead and done\nwith."` | `"...should be gone and dead and done\u00a0with."` |
| `"...the impact on shareholder\nvalue"` | `"...the impact on shareholder value"` (tightened) |

### Path resolution rule

Logo paths in JSON are resolved **relative to `templates/theme.typ`**, not relative to `slides.typ` or the project root. Since theme.typ lives in `templates/`, use `../assets/logos/` to reach the assets directory.

| theme.typ location | Logo location | Correct JSON path |
|---|---|---|
| `templates/theme.typ` | `assets/logos/foo.svg` | `../assets/logos/foo.svg` |

This is because Typst's `image()` function resolves relative to the file containing the function definition, not the file that calls it.

## Step 2: Prepare the SVG Logo

Headline cards have a dark background (`#12121e`). Logos need to be **white on transparent** to be visible.

### IRON LAW: Real Vector Logos Only

**Text-based SVG placeholders are NOT logos.** If you catch yourself creating an SVG with `<text>` elements spelling out the publication name — STOP. That is a fake placeholder, not a real logo.

- Logos MUST contain real vector paths (`<path>`, `<polygon>`, `<rect>`, etc.) from the publication's actual branding
- Logos must be DOWNLOADED from authoritative sources: Wikimedia Commons SVGs, official brand/press pages, or GitHub logo repos
- **Never** generate a text-based SVG as a "temporary" logo — there is no temporary; it ships

**Verification step** — after downloading, check that it's real:
```bash
# If this finds matches, it's a fake placeholder, not a real logo
grep '<text' assets/logos/publication-white.svg && echo "FAKE — contains <text> elements, download a real logo"
```

### Logo Facts

- Wikimedia Commons has SVGs for virtually every major publication — "I can't find an SVG" means search harder, not fall back to a placeholder.
- A text-based SVG always has the wrong font, weight, and spacing — real logos are designed. Shipping one as "temporary" is shipping it; it looks unprofessional in the deliverable.

### Creating a white variant

1. Download the publication's SVG logo (Wikimedia Commons is a good source)
2. Identify dark fill colors in the SVG (`#000000`, `#1F1D1A`, `#222222`, `#292526`, etc.)
3. Replace them with white:

```bash
# Replace all dark fills with white
sed -i '' 's/fill="#000000"/fill="#ffffff"/g; s/fill="#1F1D1A"/fill="#ffffff"/g' assets/logos/publication-white.svg
```

4. Verify the result by compiling the presentation — some SVGs have multiple fill values or use `style` attributes instead of `fill`.

**Common gotcha**: Some SVGs use CSS `style="fill:#000"` instead of `fill="#000"`. Check both:
```bash
grep -i 'fill' assets/logos/publication-white.svg
```

### Logo sizing

The `headline-card` function constrains logos with `box(width: 60%, height: 4.5em, image(fit: "contain"))`. This handles both wide wordmarks (like Semafor) and square icons (like a seal) without overflow. You should not need to adjust sizing per-logo — the `contain` fit mode preserves aspect ratio within the bounding box.

If a logo appears too small despite the 60% width, it's likely that the SVG has excessive whitespace/padding in its viewBox. Crop the viewBox or edit the SVG to remove padding.

## Step 3: Render in slides.typ

Cards are rendered by looping over the JSON. This pattern should already exist in slides.typ:

```typst
#{
  let cards = json("data/headlines.json")
  for card in cards {
    slide[
      #headline-card(
        venue: card.venue,
        date: card.date,
        headline: card.headline,
        quote: card.at("quote", default: none),
        logo: card.at("logo", default: none),
      )
    ]
  }
}
```

**One card per slide.** Grid layouts (2x2, etc.) were tried and don't work — quotes and headlines get truncated, logos shrink too small to be recognizable, and the visual impact is lost. The LWT style depends on each card filling the screen.

**No `===` heading on headline slides.** The slide heading bar eats vertical space. Headline cards use `block(height: 1fr)` to fill the available space, but an `===` heading reduces that space significantly. If you need a section header, put it on the slide before the card loop.

## Red Flags — STOP If You See These

| Symptom | Cause | Fix |
|---|---|---|
| Logo doesn't appear (blank space) | Path in JSON is relative to slides.typ, not theme.typ | Change to `../assets/logos/...` |
| Logo is invisible (dark on dark) | SVG has dark fills on dark card background | Create a `-white.svg` variant |
| Logo clips over the date badge | SVG is very wide and `box` width is too large | The 60%/4.5em constraint should prevent this; check SVG viewBox for excessive width |
| Card doesn't fill vertical space | Using `height: 100%` instead of `1fr`, or `===` heading is present | Use `block(height: 1fr)` and remove `===` from the slide |
| Quote is generic/boring | Summarized instead of quoted | Find the actual vivid quote from the source |
| Typst error: "file not found" | Logo SVG doesn't exist at the resolved path | Check that the file exists at `templates/../assets/logos/...` |
| Logo SVG contains `<text>` elements | You created a text placeholder instead of downloading a real logo | `grep '<text' logo.svg` — if it matches, delete it and download the real SVG from Wikimedia Commons or the brand's press page |
| Single word on last line of headline or quote | Widow — large centered text makes this very visible | Use `\u00a0` between last 2-3 words in JSON, or tighten wording |

## Modifying the headline-card Function

The function lives in `presentation/templates/theme.typ` (search for `#let headline-card`). Key design decisions baked in:

- **`place(top + left)`** for the date badge — floats it over the card without affecting content flow
- **`align(center + horizon)`** — vertically and horizontally centers the logo/headline/quote stack
- **`block(height: 1fr)`** — stretches to fill available slide space
- **Curly quotes** via `\u{201c}` and `\u{201d}` — typographically correct
- **Divider lines** at 50% width between logo, headline, and quote sections

If you need to adjust text sizes, the current values are: headline 22pt bold, quote 18pt italic, date badge 14pt bold, fallback venue name 24pt bold.

Related Skills

writing

6
from edwinhu/workflows

This skill should be used when the user asks to 'write a paper', 'start a writing project', 'draft an article', 'write about', 'brainstorm writing topics', 'gather sources for a paper', 'what should I write about', or needs the writing workflow entry point for any writing task.

writing-validate

6
from edwinhu/workflows

Validate draft sections cover all PRECIS claims before review.

writing-setup

6
from edwinhu/workflows

Internal skill for creating PRECIS.md, OUTLINE.md, and ACTIVE_WORKFLOW.md. Called after brainstorm sources are gathered.

writing-revise

6
from edwinhu/workflows

This skill should be used when the user asks to 'revise writing', 'fix review issues', 'polish draft', 'apply review feedback', 'complete writing workflow', or after /writing-review produces REVIEW.md with issues to fix.

writing-review

6
from edwinhu/workflows

Internal skill for hierarchical document review. Called by writing-validate after claim validation passes.

writing-precis-reviewer

6
from edwinhu/workflows

Internal skill used by writing-setup at exit gate. Dispatches a reviewer subagent to verify PRECIS.md quality before outlining. NOT user-facing.

writing-outline

6
from edwinhu/workflows

Internal skill for creating detailed section outlines. Called by /writing workflow after PRECIS and master OUTLINE are complete.

writing-outline-reviewer

6
from edwinhu/workflows

Internal skill used by writing-outline at exit gate. Dispatches a reviewer subagent to verify OUTLINE.md quality before drafting. NOT user-facing.

writing-lit-review

6
from edwinhu/workflows

Internal skill for literature review and source materialization. Called after brainstorm, before setup. NOT user-facing.

writing-legal

6
from edwinhu/workflows

Internal skill for academic legal writing. Loaded by /writing when style=legal. Based on Volokh's "Academic Legal Writing".

writing-handoff

6
from edwinhu/workflows

Create structured handoff document for writing workflow session pause/resume.

writing-general

6
from edwinhu/workflows

Internal skill for Strunk & White writing rules. Loaded by /writing for quick edits or as base layer for domain skills.