# Opencli Browser Sitemap > Guía para consumir de forma perezosa los sitemaps de un sitio al navegar con opencli browser: elige entre adapter y fallback, retoma desde firmas de estado y marca entradas obsoletas sin confiar más en ellas que en el navegador real. Fuente: https://skillsagentes.com/skills/jackwener/opencli/opencli-browser-sitemap Markdown: https://skillsagentes.com/skills/jackwener/opencli/opencli-browser-sitemap.md Repositorio: https://github.com/jackwener/OpenCLI Autor: jackwener Licencia: Apache-2.0 Actualizado: hace 2 meses Coste de contexto: 82 tok instalada, 995 tok al activarse, 995 tok con todos los archivos del bundle Bundle: 1 archivo, 4 KB Permisos que pide: bash(opencli:*), read, edit, write, grep ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add jackwener/OpenCLI --skill opencli-browser-sitemap --agent claude-code # Cursor npx -y skills add jackwener/OpenCLI --skill opencli-browser-sitemap --agent cursor # Codex npx -y skills add jackwener/OpenCLI --skill opencli-browser-sitemap --agent codex # Gemini CLI npx -y skills add jackwener/OpenCLI --skill opencli-browser-sitemap --agent gemini # Windsurf npx -y skills add jackwener/OpenCLI --skill opencli-browser-sitemap --agent windsurf # Cline npx -y skills add jackwener/OpenCLI --skill opencli-browser-sitemap --agent cline ``` ## Qué hace - Guía la lectura perezosa de solo los archivos de sitemap relevantes (SITE.md, pages/.md, workflows/.md, pitfalls.md). - Prioriza la ruta 'Best path' de un workflow, normalmente un comando adapter, antes que el navegador crudo. - Compara el estado real de la página con la firma de estado del sitemap y confía siempre en el navegador si difieren. - Marca entradas obsoletas del sitemap y actualiza la salud del adapter (healthy/suspect/broken) para agentes futuros. ## Cuándo usarla - Cuando opencli browser open o analyze reporta sitemap.available: true. - Cuando el usuario pide usar el sitemap de un sitio para navegar. ## Qué la activa - "Usa el sitemap de este sitio para completar la tarea" - "¿Qué ruta indica el sitemap para publicar un tweet?" ## Antes de instalar - Requiere que exista un sitemap local (~/.opencli/sites//sitemap/) o de repo (sitemaps//) para el sitio en cuestión. - writes to your files ## Archivos - SKILL.md — 4 KB ## SKILL.md Reproducido tal cual desde jackwener/OpenCLI bajo Apache-2.0. Esta sección es el documento original y está en inglés. # opencli-browser-sitemap Use this skill when `opencli browser open` or `opencli browser analyze` reports `sitemap.available: true`, or when the user asks you to use a site's sitemap. The sitemap is **prior knowledge**, not ground truth. It should reduce blind clicking, but it must never override the live browser state. --- ## Consumption Loop 1. Run or reuse `opencli browser state` to know the current page. 2. Read only the smallest relevant sitemap files: - `SITE.md` for site-level orientation. - One matching `pages/.md` for current state. - One matching `workflows/.md` for the user goal. - `pitfalls.md` only when blocked or warned by the workflow. 3. Prefer the workflow's **Best path**. If it names an adapter such as `opencli twitter post`, use that before raw browser actions. 4. If the adapter is unavailable or fails, use the **Fallback path** browser workflow. 5. After each navigation or state-changing action, refresh `state` and compare the workflow's `state_signature`. 6. If reality disagrees, trust reality, continue probing, and write a local stale note or draft patch. 7. If an action recovery includes `adapter_health_update: -> suspect|broken`, update the local overlay workflow that references that adapter so future agents go straight to the fallback path. --- ## Lookup Order Read local overlay first, then global seed: ```text ~/.opencli/sites//sitemap/ # local overlay sitemaps// # repo seed (top-level) ``` Local files override global files with the same stable id. Do not load an entire large sitemap into context. If the directory is large, list filenames first and then read only the page/workflow you need. --- ## Trust Reality Rule If sitemap says a button, URL, route, or API should exist but the browser does not show it: - Re-run `state` or `find` with semantic anchors. - Check whether login, locale, viewport, A/B test, or route state differs. - Follow the real page if a safe path is visible. - Mark the sitemap item stale in local overlay. Never keep clicking because "the sitemap says it should work." --- ## Stale / Draft Notes When you discover drift, write a small local note under the relevant page/workflow file or a draft file in the local overlay: ```md Stale note: - observed_at: YYYY-MM-DD - current_url: - expected: - actual: - next_probe: ``` Do not edit global seed files unless the task is explicitly a sitemap-authoring or repo PR task. ## Adapter Health Write-Back When an adapter fails and the sitemap action or workflow tells you to update adapter health: 1. Find the local workflow file under `~/.opencli/sites//sitemap/workflows/` whose `Best path` references the adapter command. 2. If no local workflow exists, copy the matching global workflow into the local overlay first; never edit the global seed directly during browser task execution. 3. Set `adapter_health: suspect` or `broken` as directed. 4. Add a short stale note with observed error, current URL, and timestamp. 5. Continue with the browser fallback path. This write-back is the memory loop: the current agent falls back once, and the next agent does not waste a turn retrying a known-suspect adapter. --- ## Output Discipline When reporting back, include: - Path chosen: adapter best path or browser fallback. - Checkpoint reached: current URL/state signature. - Sitemap health: used as-is, stale marked, or missing workflow. Keep the report task-focused. Do not summarize the whole sitemap. ## Dónde encaja - Categoría: [Automatización](https://skillsagentes.com/categorias/automatizacion.md) — Flujos de varios pasos que se ejecutan sin supervisión. - Creador: [jackwener](https://skillsagentes.com/creators/jackwener.md) — 8 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [Opencli Adapter Author](https://skillsagentes.com/skills/jackwener/opencli/opencli-adapter-author.md): Guía de extremo a extremo para escribir un adapter de OpenCLI para un sitio nuevo o un comando nuevo, desde el reconocimiento hasta la decodificación de campos y la verificación. Sustituye a opencli-oneshot y opencli-explorer. - [Opencli Sitemap Author](https://skillsagentes.com/skills/jackwener/opencli/opencli-sitemap-author.md): Para crear o mantener sitemaps de OpenCLI orientados a agentes: navegación, estado de página, acciones, workflows, referencias de API y fallbacks de un sitio. Úsalo tras explorar el navegador o cuando el sitemap quede obsoleto. - [Opencli Usage](https://skillsagentes.com/skills/jackwener/opencli/opencli-usage.md): Punto de partida de cualquier sesión de OpenCLI: mapa de lo que puede hacer, cómo descubrir adapters, qué flags y formatos de salida son universales, y qué skill especializada cargar después. - [Opencli Browser](https://skillsagentes.com/skills/jackwener/opencli/opencli-browser.md): Para cuando un agente necesita conducir una ventana real de Chrome con opencli: inspeccionar una página, rellenar formularios, seguir flujos con sesión iniciada o extraer datos puntuales. No es para escribir adapters. - [Smart Search](https://skillsagentes.com/skills/jackwener/opencli/smart-search.md): Router de búsqueda inteligente basado en comandos opencli: dirige cada consulta a la mejor fuente cuando hay que buscar o investigar información en sitios, redes sociales, noticias, compras, viajes, empleo, finanzas o contenido en chino. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)