Una publicación de r/ClaudeAI compartió un repositorio de Claude Code + Playwright para navegar por sitios web. Agregar Scavio MCP para la recuperación de objetivos indexados reduce sustancialmente el tiempo de ejecución del agente. Este tutorial recorre el patrón híbrido.
Requisitos previos
- Código Claude instalado
- Clave API de Scavio
- Dramaturgo (npm o pip)
Guia paso a paso
Paso 1: Adjunte Scavio MCP a Claude Code
Un comando de configuración.
claude mcp add scavio https://mcp.scavio.dev/mcp --header "x-api-key: $SCAVIO_API_KEY"Paso 2: Mantenga a Playwright como una herramienta independiente
Solo para flujos interactivos.
// Playwright stays a tool callable from Claude Code skills.
// Use only when target is auth-gated or JS-only.Paso 3: Mensaje de habilidad: elegir por consulta
Dígale a Claude que elija la herramienta por tipo de objetivo.
# Skill prompt fragment:
# 'For SERP, Reddit, YouTube, Amazon, Walmart use Scavio MCP.
# For auth-gated dashboards or JS-only SPAs use Playwright.'Paso 4: Banca la división
Compare el tiempo de ejecución: dramaturgo puro versus híbrido.
# Pure Playwright research agent (50 steps): 5-8 min, $0.40-0.80 in browser time.
# Hybrid (40 Scavio + 10 Playwright): 1-2 min, ~$0.10 total.Paso 5: Iterar sobre el enrutamiento de herramientas
Si Claude usa excesivamente a Dramaturgo, ajuste la indicación de habilidad.
# Add: 'Only use Playwright when Scavio cannot answer.'
# Verify by reviewing tool-call logs after 10 runs.Ejemplo en Python
# No direct Python needed — Claude Code orchestrates. Hybrid-aware skill is the deliverable.Ejemplo en JavaScript
// Same — skill file is the artifact.Salida esperada
Hybrid agent runs 60-80% faster than pure-Playwright. Most queries land on Scavio MCP; Playwright fires only on the 10-20% genuinely browser-required queries.