obscura-headless-browser
```markdown
What this skill does
```markdown
---
name: obscura-headless-browser
description: Use Obscura, the lightweight Rust-based headless browser for AI agents and web scraping with CDP, Puppeteer, and Playwright support.
triggers:
- headless browser for scraping
- use obscura browser
- puppeteer with obscura
- playwright headless rust browser
- web scraping with CDP
- run headless chrome alternative
- automate browser with obscura
- stealth web scraping rust
---
# Obscura Headless Browser
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Obscura is a headless browser engine written in Rust for web scraping and AI agent automation. It runs real JavaScript via V8, implements the Chrome DevTools Protocol (CDP), and acts as a drop-in replacement for headless Chrome — with 30 MB memory usage, instant startup, and built-in anti-detection.
## Installation
### Download Binary (Recommended)
```bash
# Linux x86_64
curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz
tar xzf obscura-x86_64-linux.tar.gz
sudo mv obscura /usr/local/bin/
# macOS Apple Silicon
curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-macos.tar.gz
tar xzf obscura-aarch64-macos.tar.gz
sudo mv obscura /usr/local/bin/
# macOS Intel
curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-macos.tar.gz
tar xzf obscura-x86_64-macos.tar.gz
sudo mv obscura /usr/local/bin/
# Windows: download .zip from releases page and extract manually
```
Single binary. No Chrome, no Node.js, no dependencies required.
### Build from Source
```bash
git clone https://github.com/h4ckf0r0day/obscura.git
cd obscura
cargo build --release
# With stealth mode (anti-detection + tracker blocking)
cargo build --release --features stealth
```
Requires Rust 1.75+. First build ~5 min (V8 compiles from source, cached after).
## CLI Quick Reference
### `obscura fetch` — Render a Single Page
```bash
# Get page title via JS eval
obscura fetch https://example.com --eval "document.title"
# Dump rendered HTML (after JS executes)
obscura fetch https://news.ycombinator.com --dump html
# Dump plain text content
obscura fetch https://example.com --dump text
# Dump all links
obscura fetch https://example.com --dump links
# Wait for network to be idle (SPAs, dynamic content)
obscura fetch https://example.com --wait-until networkidle0
# Wait for a specific CSS selector to appear
obscura fetch https://example.com --selector "#main-content"
# Enable stealth mode for anti-bot sites
obscura fetch https://example.com --stealth --eval "document.title"
# Suppress banner output
obscura fetch https://example.com --quiet --dump html
```
### `obscura serve` — Start CDP WebSocket Server
```bash
# Basic server on default port
obscura serve --port 9222
# With stealth mode enabled
obscura serve --port 9222 --stealth
# With proxy
obscura serve --port 9222 --proxy http://proxy.example.com:8080
obscura serve --port 9222 --proxy socks5://proxy.example.com:1080
# Multiple parallel workers
obscura serve --port 9222 --workers 4 --stealth
# Respect robots.txt
obscura serve --port 9222 --obey-robots
```
### `obscura scrape` — Parallel Scraping
```bash
# Scrape multiple URLs in parallel
obscura scrape https://site1.com https://site2.com https://site3.com \
--concurrency 25 \
--eval "document.querySelector('h1').textContent" \
--format json
# Output as plain text
obscura scrape https://site1.com https://site2.com \
--eval "document.title" \
--format text
```
## Puppeteer Integration
```bash
npm install puppeteer-core
```
```javascript
import puppeteer from 'puppeteer-core';
// Start obscura first: obscura serve --port 9222
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser',
});
const page = await browser.newPage();
await page.goto('https://news.ycombinator.com');
// Extract structured data
const stories = await page.evaluate(() =>
Array.from(document.querySelectorAll('.titleline > a'))
.map(a => ({ title: a.textContent, url: a.href }))
);
console.log(stories);
await browser.disconnect();
```
### Puppeteer with Stealth Mode
```bash
# Start with stealth enabled
obscura serve --port 9222 --stealth
```
```javascript
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser',
});
const page = await browser.newPage();
// Set custom headers if needed
await page.setExtraHTTPHeaders({
'Accept-Language': 'en-US,en;q=0.9',
});
await page.goto('https://bot-protected-site.com', {
waitUntil: 'networkidle0',
});
const content = await page.content();
await browser.disconnect();
```
## Playwright Integration
```bash
npm install playwright-core
```
```javascript
import { chromium } from 'playwright-core';
// Start obscura first: obscura serve --port 9222
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://en.wikipedia.org/wiki/Web_scraping');
console.log(await page.title());
// Wait for selector
await page.waitForSelector('#content');
const text = await page.locator('h1').textContent();
console.log(text);
await browser.close();
```
### Playwright Form Submission & Login
```javascript
import { chromium } from 'playwright-core';
const browser = await chromium.connectOverCDP({
endpointURL: 'ws://127.0.0.1:9222',
});
const page = await browser.newContext().then(ctx => ctx.newPage());
await page.goto('https://quotes.toscrape.com/login');
// Fill and submit form
await page.fill('#username', process.env.SCRAPE_USERNAME);
await page.fill('#password', process.env.SCRAPE_PASSWORD);
await page.click('[type="submit"]');
// Obscura handles POST, follows 302 redirect, maintains cookies
await page.waitForNavigation();
console.log('Logged in:', page.url());
await browser.close();
```
## Common Automation Patterns
### Scrape Behind Login (Puppeteer)
```javascript
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser',
});
const page = await browser.newPage();
// Login
await page.goto('https://example.com/login');
await page.evaluate((user, pass) => {
document.querySelector('#username').value = user;
document.querySelector('#password').value = pass;
document.querySelector('form').submit();
}, process.env.SITE_USERNAME, process.env.SITE_PASSWORD);
await page.waitForNavigation({ waitUntil: 'networkidle0' });
// Now scrape authenticated content
await page.goto('https://example.com/dashboard');
const data = await page.evaluate(() => ({
title: document.title,
content: document.querySelector('.data-table')?.innerHTML,
}));
await browser.disconnect();
```
### Request Interception (Fetch Domain)
```javascript
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser',
});
const page = await browser.newPage();
// Intercept and modify requests
await page.setRequestInterception(true);
page.on('request', (req) => {
if (req.resourceType() === 'image') {
req.abort(); // Block images for faster scraping
} else {
req.continue();
}
});
await page.goto('https://example.com');
await browser.disconnect();
```
### Cookie Management
```javascript
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser',
});
const page = await browser.newPage();
// Set cookies before navigation
await page.setCookie({
name: 'session_token',
value: process.env.SESSION_TOKEN,
domain: 'example.com',
});
await page.goto('https://example.com/protected');
// Get cookies after navigation
const cookies = await page.cookies();
console.log(cookies);
await browser.disconnectRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.