lightpanda-browser

Lightpanda headless browser CLI for fast web content extraction, searching, and fetching When browsing the web, fetching URLs, searching the web, extracting web page content, or needing rendered HTML from a URL

15 stars

Best use case

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

Lightpanda headless browser CLI for fast web content extraction, searching, and fetching When browsing the web, fetching URLs, searching the web, extracting web page content, or needing rendered HTML from a URL

Teams using lightpanda-browser 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/lightpanda-browser/SKILL.md --create-dirs "https://raw.githubusercontent.com/shepherdjerred/monorepo/main/packages/dotfiles/dot_agents/skills/lightpanda-browser/SKILL.md"

Manual Installation

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

How lightpanda-browser Compares

Feature / Agentlightpanda-browserStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Lightpanda headless browser CLI for fast web content extraction, searching, and fetching When browsing the web, fetching URLs, searching the web, extracting web page content, or needing rendered HTML from a URL

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

# Lightpanda Browser

## Overview

Lightpanda is an open-source headless browser built from scratch in Zig for machine/AI usage. It executes JavaScript and renders the DOM like Chrome, but is 11x faster, uses 9x less memory, and has instant startup. Use it via CLI shell commands instead of Playwright or WebFetch.

**Status:** Beta. Works for most sites. Complex JS-heavy SPAs may fail -- fall back to Playwright for those.

## Binary Path

The binary is at `~/.local/bin/lightpanda`. Bare `lightpanda` works if `~/.local/bin` is in PATH.

**All flags use UNDERSCORES, not hyphens** (e.g. `--strip_mode`, `--log_level`, NOT `--strip-mode`, `--log-level`).

## Ideal Command for AI Content Extraction

```bash
~/.local/bin/lightpanda fetch --dump --strip_mode full --log_level fatal <url>
```

- `--dump` outputs rendered HTML to stdout
- `--strip_mode full` removes scripts, stylesheets, images, video, SVGs -- leaves just content
- `--log_level fatal` silences all log output on stderr

**NOTE: Output is always HTML, even with `--strip_mode full`.** This is expected and correct — `strip_mode` removes non-content elements but does NOT convert to markdown or plain text. The HTML output is clean and readable. Do NOT abandon lightpanda just because the output is HTML.

## CLI Reference

### Commands

| Command   | Purpose                                       |
| --------- | --------------------------------------------- |
| `fetch`   | Fetch a URL, execute JS, dump rendered HTML   |
| `serve`   | Start a CDP server (for Playwright/Puppeteer) |
| `help`    | Show usage                                    |
| `version` | Show version                                  |

### Fetch Options

| Flag                   | Description                                |
| ---------------------- | ------------------------------------------ |
| `--dump`               | Output rendered HTML to stdout             |
| `--strip_mode <modes>` | Comma-separated: `js`, `css`, `ui`, `full` |
| `--with_base`          | Add `<base>` tag to output                 |

Strip modes:

- `js` -- remove script tags and preload links
- `css` -- remove style tags and stylesheet links
- `ui` -- remove img, picture, video, css, svg
- `full` -- all of the above (recommended for AI)

### Common Options (fetch and serve)

| Flag                               | Default   | Description                               |
| ---------------------------------- | --------- | ----------------------------------------- |
| `--obey_robots`                    | false     | Respect robots.txt                        |
| `--http_proxy <url>`               | none      | HTTP proxy (supports user:pass@host:port) |
| `--proxy_bearer_token <token>`     | none      | Bearer auth for proxy                     |
| `--http_timeout <ms>`              | 5000      | Transfer timeout (0 = no timeout)         |
| `--http_connect_timeout <ms>`      | 0         | Connection timeout (0 = no timeout)       |
| `--http_max_concurrent <n>`        | 10        | Max concurrent HTTP requests              |
| `--http_max_response_size <bytes>` | unlimited | Limit response size                       |
| `--log_level <level>`              | warn      | debug/info/warn/error/fatal               |
| `--log_format <fmt>`               | logfmt    | pretty/logfmt                             |
| `--user_agent_suffix <str>`        | none      | Appended to "Lightpanda/1.0"              |

### Environment Variables

| Variable                            | Description             |
| ----------------------------------- | ----------------------- |
| `LIGHTPANDA_DISABLE_TELEMETRY=true` | Disable usage telemetry |

## Common Patterns

### Fetch a page (clean content)

```bash
~/.local/bin/lightpanda fetch --dump --strip_mode full --log_level fatal https://example.com
```

### Search the web via DuckDuckGo

```bash
~/.local/bin/lightpanda fetch --dump --strip_mode full --log_level fatal "https://duckduckgo.com/html/?q=search+terms+here"
```

Use the `/html/` endpoint for simpler, lighter HTML output from DuckDuckGo.

### Fetch with extended timeout (slow sites)

```bash
~/.local/bin/lightpanda fetch --dump --strip_mode full --log_level fatal --http_timeout 15000 https://slow-site.com
```

### Fetch respecting robots.txt

```bash
~/.local/bin/lightpanda fetch --dump --strip_mode full --log_level fatal --obey_robots https://example.com
```

### Fetch with base tag (for resolving relative URLs)

```bash
~/.local/bin/lightpanda fetch --dump --strip_mode full --log_level fatal --with_base https://example.com
```

## Output Behavior

- **stdout**: Rendered HTML (after JS execution)
- **stderr**: Log messages
- `--log_level fatal` or `2>/dev/null` gives clean stdout-only output
- Output is HTML, not markdown. Parse it directly or use shell tools to extract text.

## When to Fall Back to Playwright

Use Playwright instead of lightpanda when you need:

- Interactive page manipulation (clicking buttons, filling forms)
- Multi-step navigation with session/cookie state
- Screenshots or visual testing
- Complex JS-heavy SPAs that lightpanda fails to render
- Waiting for specific elements or network conditions

## Installation

macOS (Apple Silicon):

```bash
curl -L -o /usr/local/bin/lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && chmod a+x /usr/local/bin/lightpanda
```

macOS (Intel):

```bash
curl -L -o /usr/local/bin/lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-macos && chmod a+x /usr/local/bin/lightpanda
```

Linux (x86_64):

```bash
curl -L -o /usr/local/bin/lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && chmod a+x /usr/local/bin/lightpanda
```

Linux (aarch64):

```bash
curl -L -o /usr/local/bin/lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-linux && chmod a+x /usr/local/bin/lightpanda
```

Related Skills

toolkit-recall

15
from shepherdjerred/monorepo

Search past decisions, prior research, conversation history, monorepo docs, and fetched web pages. Use toolkit recall search to find context from previous work, and toolkit fetch to save web pages for future search.

zod-patterns

15
from shepherdjerred/monorepo

Zod schema validation, type-safe development, and strict TypeScript patterns. When user works with Zod, validates data, creates schemas, handles form validation, mentions z.object/z.string patterns, needs runtime validation, type-safe code, or strict TypeScript configuration.

zellij-helper

15
from shepherdjerred/monorepo

Zellij terminal multiplexer for session management, layouts, and pane operations When user mentions Zellij, terminal multiplexer, zellij commands, sessions, panes, layouts, or tabs

worktree-workflow

15
from shepherdjerred/monorepo

Git worktree workflow for isolated feature development and PR creation When user starts new work, needs to switch contexts, or wants parallel development

vite-react-helper

15
from shepherdjerred/monorepo

Vite + React for fast modern web development - build config, HMR, hooks, state management, and performance patterns When user works with Vite, React, creates components, manages state, uses hooks, or configures Vite builds

version-management

15
from shepherdjerred/monorepo

Use when asking about version management, Renovate annotations, versions.ts patterns, or pinning image/chart versions.

typst-authoring

15
from shepherdjerred/monorepo

This skill should be used when the user asks to "write Typst", "create a Typst document", "format in Typst", "convert to Typst", "Typst syntax", "Typst template", "Typst math", "Typst table", or works with .typ files. Provides comprehensive Typst markup, scripting, math, layout, and styling reference for authoring documents. Also use proactively when generating .typ output files (e.g., in deep-research reports).

typescript-helper

15
from shepherdjerred/monorepo

TypeScript development guidance for type systems and tooling When user works with .ts or .tsx files, mentions TypeScript, or encounters type errors

torvalds-deployment

15
from shepherdjerred/monorepo

Use when asking about adding services, createXxxDeployment patterns, or homelab deployment conventions. Services use per-namespace charts.

terraform-helper

15
from shepherdjerred/monorepo

Terraform and OpenTofu infrastructure as code - HCL, providers, modules, state management, and CLI operations When user works with .tf files, mentions Terraform, OpenTofu, tofu, HCL, infrastructure as code, or tf commands

terminal-concepts

15
from shepherdjerred/monorepo

Comprehensive guide for building CLI and TUI applications - terminal internals, design principles, and battle-tested patterns When building CLI/TUI apps, implementing argument parsing, handling terminal input/output, escape codes, buffering, signals, or asking about terminal development concepts

talos-helper

15
from shepherdjerred/monorepo

Talos Linux cluster administration using talosctl When user mentions Talos, talosctl, or Talos cluster operations