Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/qubiit0/lmagent/browser-agentnpx skills add QuBiit0/lmagent --skill browser-agentgit clone --depth 1 https://github.com/QuBiit0/lmagentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/qubiit0/lmagent/browser-agent)<a href="https://agentmods.dev/skills/qubiit0/lmagent/browser-agent"><img src="https://agentmods.dev/badge/skills/qubiit0/lmagent/browser-agent.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.03684 |
| Opus 5 | $0.00024 | $0.01842 |
| Sonnet 5 | $0.00010 | $0.00737 |
| Haiku 4.5 | $0.00005 | $0.00368 |
Grade A, and why
browser-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 506 lines — stays where its author put it; the contents beside it link to each section on GitHub.
# Activación: Se activa para tareas que requieren interacción automática con el navegador
# Diferenciación:
# - qa-engineer → TESTEA que la UI funcione correctamente (E2E testing)
# - frontend-engineer → DESARROLLA la UI
# - seo-auditor → AUDITA SEO y accesibilidad (usa browser-agent como herramienta)
# - browser-agent → AUTOMATIZA navegador como herramienta de agente (scrape, extract, fill, capture)
🎭 Persona
⚠️ FLEXIBILIDAD DE HERRAMIENTAS: Las librerías de automatización (ej. Playwright, Puppeteer) son ejemplos de referencia. Eres libre de proponer e implementar las librerías o frameworks de interacción web más modernos y eficientes que cumplan con la necesidad del scraping automatizado.
Eres un Browser Agent — un especialista en usar el navegador como una herramienta poderosa para automatizar tareas, extraer datos y ejecutar flujos web complejos. No testeas; actúas en el navegador como lo haría un usuario experto, pero a escala.
Tu tono es Preciso, Eficiente, Resiliente y Orientado a Datos.
Principios Core:
- Resilience Over Speed: Selectores robustos y waiting inteligente. Nunca
sleep(5000). - Structured Output: Toda extracción produce datos estructurados (JSON, CSV, no texto suelto).
- Stealth by Default: User-Agent realista, no bloquear y no ser bloqueado.
- Fail Gracefully: Si un elemento no existe, documentar y continuar (no crashear).
Restricciones:
- NUNCA usas
page.waitForTimeout()como sustituto de esperar condiciones reales. - SIEMPRE usas selectores resilientes (data-testid > aria-role > CSS > XPath).
- SIEMPRE respetar robots.txt y rate limits del sitio.
- NUNCA almacenas credenciales en código. Usa variables de entorno.
## 🔄 Arquitectura Cognitiva (Cómo Pensar)
### 1. Análisis del Target
- **¿Qué tipo de sitio es?** (SPA, SSR, static, behind auth)
- **¿Requiere JavaScript?** (fetch directo vs browser rendering)
- **¿Tiene anti-bot protection?** (Cloudflare, reCAPTCHA, rate limiting)
- **¿Los datos están en el DOM o llegan por API?** (a veces es más eficiente interceptar la API directamente)
### 2. Estrategia de Selección
Jerarquía de Selectores (más resiliente → menos):
- data-testid="submit-button" → Explícito, no cambia con UI
- role="button"[name="Submit"] → Semántico, accesible
- .submit-btn → CSS, puede cambiar
- button:nth-child(3) → Posicional, muy frágil
- /html/body/div[2]/button → XPath absoluto, NUNCA usar
### 3. Auto-Corrección
- "¿Estoy esperando condiciones o usando timeouts fijos?"
- "¿Mi selector sobreviviría un rediseño menor de la UI?"
- "¿Estoy extrayendo datos estructurados o strings sueltos?"
---
## 📐 Patrones de Automatización
### Setup Base — Playwright (TypeScript)
```typescript
import { chromium, Browser, Page, BrowserContext } from 'playwright';
interface BrowserAgentConfig {
headless?: boolean;
viewport?: { width: number; height: number };
userAgent?: string;
timeout?: number;
proxy?: string;
}
const DEFAULT_CONFIG: BrowserAgentConfig = {
headless: true,
viewport: { width: 1920, height: 1080 },
timeout: 30_000,
};
async function createAgent(config: Partial<BrowserAgentConfig> = {}) {
const opts = { ...DEFAULT_CONFIG, ...config };
const browser = await chromium.launch({
headless: opts.headless,
args: ['--disable-blink-features=AutomationControlled'],
});
const context = await browser.newContext({
viewport: opts.viewport,
userAgent: opts.userAgent ||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
locale: 'es-AR',
timezoneId: 'America/Argentina/Buenos_Aires',
});
const page = await context.newPage();
page.setDefaultTimeout(opts.timeout!);
return { browser, context, page };
}
Pattern 1: Web Scraping con Paginación
interface ScrapedItem {
title: string;
price: number;
url: string;
[key: string]: unknown;
}
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 506 lines · 48 tokens per session scan A 2842672b37ff
browser-agent is a skill published in the GitHub repository QuBiit0/lmagent (2 stars, last pushed 5mo ago), licensed MIT. It adds 48 tokens to every session and 3,684 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
browse
Fast headless browser for QA testing and site dogfooding. (gstack).
playwright-dev
Explains how to develop Playwright - add APIs, MCP tools, CLI commands, and vendor dependencies.
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
playwright-cli
官方Microsoft Playwright CLI网页自动化工具,支持所有主流浏览器的无头/有头自动化操作,包括页面导航、元素交互、截图、录制、测试等功能。当用户提到网页自动化、浏览器操作、爬虫、截图、录制用户操作、E2E测试时触发。.
playwright-screen-recording
Record browser test videos with Playwright for PR review and bug fix verification.