typst-test-slide

This skill should be used when the user asks to 'test a slide', 'isolate a slide', 'debug a slide', 'preview a single slide', 'test this slide', 'render one slide', or when you need to visually verify a single Typst slide from a presentation in isolation. Provides the exact file setup pattern to avoid access-denied and import errors.

6 stars

Best use case

typst-test-slide is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

This skill should be used when the user asks to 'test a slide', 'isolate a slide', 'debug a slide', 'preview a single slide', 'test this slide', 'render one slide', or when you need to visually verify a single Typst slide from a presentation in isolation. Provides the exact file setup pattern to avoid access-denied and import errors.

Teams using typst-test-slide 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/typst-test-slide/SKILL.md --create-dirs "https://raw.githubusercontent.com/edwinhu/workflows/main/skills/tinymist/typst-test-slide/SKILL.md"

Manual Installation

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

How typst-test-slide Compares

Feature / Agenttypst-test-slideStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This skill should be used when the user asks to 'test a slide', 'isolate a slide', 'debug a slide', 'preview a single slide', 'test this slide', 'render one slide', or when you need to visually verify a single Typst slide from a presentation in isolation. Provides the exact file setup pattern to avoid access-denied and import errors.

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.

Related Guides

SKILL.md Source

# Typst Test Slide - Isolate and Render a Single Slide

Renders a single Typst slide in isolation for debugging or visual verification. This is a recipe, not a workflow.

## Why This Exists

Typst cannot access files outside its project root. Creating test files in `/tmp/` causes "access denied" on every `#import` and `#image()` call. This skill provides the correct pattern.

## Common Errors This Prevents

| Error | Cause | Fix |
|-------|-------|-----|
| `access denied` on `#import "../templates/theme.typ"` | Test file is in `/tmp/` (outside project root) | Put test file in `output/` inside the project |
| `access denied` on `#image(...)` | Image path resolves outside project root | Use `../assets/` from `output/` directory |
| `file not found` on `#import "../../templates/theme.typ"` | Wrong relative depth (used sub-slide depth instead of `output/` depth) | `output/` is one level deep: use `../templates/`, not `../../templates/` |
| Slides don't render (just text) | Missing `#show: university-theme.with(...)` preamble | Include the full preamble (see template below) |

## The Pattern

### 1. Create the test file in `output/`

```bash
cat > output/test-slide.typ << 'EOF'
#import "../templates/theme.typ": *
#show: university-theme.with(
  aspect-ratio: "16-9",
  config-info(
    title: [Test],
    author: [Test],
    date: datetime.today(),
    institution: [UVA],
    logo: image("../assets/LawP_horizontal_short_4c_RGB.png"),
  ),
)

#slide[
// paste slide content here
]
EOF
```

### 2. Compile with `--root .` from project root

```bash
tinymist compile --root . output/test-slide.typ /tmp/test-slide.png --ppi 144
```

The `--root .` flag tells Typst that the project root is the current directory, so `../templates/` from `output/` resolves correctly.

### 3. Clean up

```bash
rm -f output/test-slide.typ
```

## Key Rules

- **Always create in `output/`**, never `/tmp/` or any directory outside the project root.
- **Always compile with `--root .`** from the project root directory.
- **Paths from `output/` go up one level**: `../templates/`, `../assets/`.
- **Paths from `slides/XX-topic/` go up two levels**: `../../templates/`, `../../assets/` -- do not confuse these depths.
- **Delete the test file when done.** `output/` is gitignored but keeping test files around causes confusion.

Related Skills

dev-test

6
from edwinhu/workflows

This skill should be used when the user needs to 'debug web applications', 'test UI interactions', 'capture screenshots or network requests', 'test desktop automation', or needs to select between testing tools. Routes to platform-specific E2E testing skills: Chrome MCP for debugging, Playwright for CI/CD, Hammerspoon for macOS, Linux for X11/Wayland.

dev-test-playwright

6
from edwinhu/workflows

This skill should be used when testing web applications with Playwright MCP, running headless E2E tests, cross-browser testing, CI/CD test automation, or when dev-test routes to Playwright-based browser testing.

dev-test-linux

6
from edwinhu/workflows

This skill should be used when the user asks to "test Linux desktop apps", "automate GTK/Qt applications", "test with ydotool", "test with xdotool", "verify Linux UI interactions", "capture screenshots on Linux", "control D-Bus services", "test Wayland applications", "test X11 applications", or needs Linux desktop E2E testing. Provides comprehensive guidance for Linux automation with ydotool (Wayland), xdotool (X11), grim, and D-Bus.

dev-test-hammerspoon

6
from edwinhu/workflows

This skill should be used when the user asks to "debug macOS app", "test native app", "automate macOS workflow", "test native macOS application", or needs desktop automation for testing macOS applications with Hammerspoon. Use for application launch/control, window management, keyboard/mouse simulation, and visual verification.

dev-test-gaps

6
from edwinhu/workflows

This skill should be used when validating test coverage against requirements, after implementation tasks complete (Phase 5.5 of /dev workflow). Invoked automatically by dev-implement before review phase.

dev-test-electron

6
from edwinhu/workflows

This skill should be used when the user asks to "test Electron app", "automate Electron desktop app", "debug Electron renderer", "test VS Code extension", "E2E test Electron", or needs Chrome DevTools Protocol automation for Electron applications. Use for renderer process debugging, main process control, native menu automation, and file dialog testing.

dev-test-chrome

6
from edwinhu/workflows

This skill should be used when testing web applications with Chrome MCP tools, debugging console errors, monitoring network requests, executing JavaScript in browser, recording GIF test evidence, or when dev-test routes to Chrome-based browser testing.

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.