Lightpanda
Lightpanda browser, drop-in replacement for Chrome and Openclaw default browser - faster and lighter for tasks without graphical rendering like data retrieval. Use it via MCP server, CLI fetch, or CDP with Playwright/Puppeteer.
What this skill does
# Lightpanda
**Use instead of Chrome/Chromium for data extraction and web automation when you don't need graphical rendering.**
Lightpanda is a headless browser built from scratch for AI agents. It's 9x faster and uses 16x less memory than Chrome. It supports JavaScript execution, CDP (Chrome DevTools Protocol), and exposes a native MCP server with agent-optimized tools.
**Alternative to built-in web search**
When the built-in Web Search tool is unavailable, or when you need more control over search results (e.g., following links to extract full page content), you can use Lightpanda with DuckDuckGo as an alternative.
Prefer the built-in Web Search tool when it is available and sufficient for your needs.
## Install
```bash
bash scripts/install.sh
```
Lightpanda is available on Linux and macOS only. Windows is supported via WSL2.
The binary is a nightly build that evolves quickly. If you encounter crashes or issues, run `scripts/install.sh` again to update to the latest version (max once per day).
If issues persist after updating, open a GitHub issue at https://github.com/lightpanda-io/browser/issues including:
- The crash trace/error output, or a description of the unexpected behavior
- The script or MCP tool call that reproduces the issue
- The target URL and expected vs actual results
## When to Use What
Lightpanda offers three interfaces. Choose based on your needs:
| Interface | Best for | How it works |
|-----------|----------|--------------|
| **MCP server** | Agent workflows, interactive browsing, form filling | Structured tools over stdio — purpose-built for LLM agents |
| **CLI fetch** | Quick one-off page extraction | Single command, no server needed |
| **CDP server** | Custom automation with Playwright/Puppeteer | WebSocket protocol, full browser control |
## MCP Server (Recommended for Agents)
The MCP server is the simplest way for agents to use Lightpanda. It exposes purpose-built tools over stdio with no setup beyond the binary.
### Setup for Claude Code
```bash
claude mcp add lightpanda -- $HOME/.local/bin/lightpanda mcp
```
### Setup for other MCP clients
Add to your MCP client configuration:
```json
{
"mcpServers": {
"lightpanda": {
"command": "sh",
"args": ["-c", "exec $HOME/.local/bin/lightpanda mcp"]
}
}
}
```
### Available MCP Tools
**Navigation & content extraction:**
- `goto` — Navigate to a URL and load the page
- `markdown` — Get page content as markdown (accepts optional URL to navigate first)
- `links` — Extract all links from the page
- `semantic_tree` — Get a simplified semantic DOM tree optimized for AI reasoning (supports `backendNodeId` filter and `maxDepth` limit)
- `structuredData` — Extract structured data (JSON-LD, OpenGraph, etc.)
- `evaluate` — Execute JavaScript in the page context
**Interactive element discovery:**
- `interactiveElements` — List all interactive elements on the page
- `detectForms` — Detect forms with their field structure and types
- `nodeDetails` — Get detailed info about a specific node by `backendNodeId`
- `waitForSelector` — Wait for a CSS selector to match (default timeout: 5000ms)
**User actions** (return page URL and title after each action):
- `click` — Click an interactive element by `backendNodeId`
- `fill` — Fill text into an input, textarea, or select element
- `scroll` — Scroll the page or a specific element
### Available MCP Resources
- `mcp://page/html` — Full serialized HTML of the current page
- `mcp://page/markdown` — Token-efficient markdown representation of the current page
### MCP Usage Example
A typical agent workflow:
1. `goto` a URL
2. `semantic_tree` or `markdown` to understand the page
3. `interactiveElements` to find clickable/fillable elements
4. `click` / `fill` to interact
5. `markdown` to extract the result
## CLI Fetch — Quick Extraction
For one-off page extraction without starting a server:
```bash
$HOME/.local/bin/lightpanda fetch --dump markdown --wait-until networkidle https://example.com
```
### Options
- `--dump` — Output format: `html`, `markdown`, `semantic_tree`, `semantic_tree_text`
- `--wait-until` — Wait strategy: `load`, `domcontentloaded`, `networkidle`, `done` (default)
- `--wait-ms` — Max wait time in milliseconds (default: 5000)
- `--strip-mode` — Remove tag groups from output: `js`, `css`, `ui`, `full` (comma-separated)
- `--with-frames` — Include iframe contents in the dump
- `--obey-robots` — Fetch and obey robots.txt
### Examples
Extract page as markdown:
```bash
$HOME/.local/bin/lightpanda fetch --dump markdown https://example.com
```
Extract semantic tree (compact, AI-friendly):
```bash
$HOME/.local/bin/lightpanda fetch --dump semantic_tree_text --wait-until networkidle https://example.com
```
Fetch with longer wait for slow pages:
```bash
$HOME/.local/bin/lightpanda fetch --dump html --wait-ms 10000 --wait-until networkidle https://example.com
```
## CDP Server — Advanced Automation
For full browser control via Playwright or Puppeteer:
### Start the Browser Server
```bash
$HOME/.local/bin/lightpanda serve --host 127.0.0.1 --port 9222
```
Options:
- `--log-level info|debug|warn|error` — Set logging verbosity
- `--log-format pretty|logfmt` — Output format for logs
- `--obey-robots` — Fetch and obey robots.txt
### Using with playwright-core
Connect using `playwright-core` (not the full `playwright` package):
```javascript
const { chromium } = require('playwright-core');
(async () => {
const browser = await chromium.connectOverCDP({
endpointURL: 'ws://127.0.0.1:9222',
});
const context = await browser.newContext({});
const page = await context.newPage();
await page.goto('https://example.com');
const title = await page.title();
const content = await page.textContent('body');
console.log(JSON.stringify({ title, content }));
await page.close();
await context.close();
await browser.close();
})();
```
### Using with puppeteer-core
Connect using `puppeteer-core` (not the full `puppeteer` package):
```javascript
const puppeteer = require('puppeteer-core');
(async () => {
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222'
});
const context = await browser.createBrowserContext();
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
const title = await page.title();
console.log(JSON.stringify({ title }));
await page.close();
await context.close();
await browser.close();
})();
```
### Custom LP CDP Domain
Lightpanda exposes a custom `LP` domain via CDP with agent-optimized methods not available in standard Chrome DevTools Protocol. Use these via `page.evaluate` with CDP sessions or direct WebSocket messages.
**Content extraction:**
- `LP.getMarkdown` — Extract page content as markdown. Params: `nodeId` (optional)
- `LP.getSemanticTree` — Get semantic tree representation. Params: `format` (`text` for text format), `prune` (default: true), `interactiveOnly`, `backendNodeId`, `maxDepth`
- `LP.getStructuredData` — Extract structured data (JSON-LD, OpenGraph, etc.)
**Interactive elements:**
- `LP.getInteractiveElements` — Find all interactive elements. Params: `nodeId` (optional)
- `LP.detectForms` — Detect and extract form information
- `LP.getNodeDetails` — Get detailed info about a node. Params: `backendNodeId` (required)
- `LP.waitForSelector` — Wait for a CSS selector match. Params: `selector` (required), `timeout` (default: 5000ms)
**Actions:**
- `LP.clickNode` — Click a node. Params: `nodeId` or `backendNodeId`
- `LP.fillNode` — Fill an input/select element. Params: `nodeId` or `backendNodeId`, `text`
- `LP.scrollNode` — Scroll page or element. Params: `nodeId` or `backendNodeId` (optional), `x`, `y`
**Example using CDP session with Playwright:**
```javascript
const client = await context.newCDPSession(page);
// Get page as markdown
const { markdown } = await client.send('LP.getMarkdown');
// Get semantic tree
const { semanticRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.