opencli-browser-sitemap
jackwener/opencli
Navigate websites with opencli browser using sitemap context to avoid blind clicking.
What is opencli-browser-sitemap?
Use this skill when driving a website with opencli browser and sitemap files are available. It guides you to consume sitemaps lazily, prefer adapter paths over raw browser actions, trust live browser state over sitemap predictions, and mark stale entries for future agents.
- Consume sitemap files (SITE.md, pages, workflows, pitfalls) lazily to reduce blind navigation
- Choose adapter-based workflows first, fall back to browser actions if adapters fail
- Compare live browser state against sitemap state signatures to detect drift
- Mark stale sitemap entries in local overlay without editing global seed files
- Update adapter health status when adapters fail, creating memory for future agents
- Resolve conflicts by trusting live browser reality over prior sitemap knowledge
How to install opencli-browser-sitemap
npx skills add https://github.com/jackwener/opencli --skill opencli-browser-sitemap- opencli browser session must be open and initialized
- Sitemap files must be present (sitemap.available: true reported by opencli browser analyze or open)
How to use opencli-browser-sitemap
- 1.Run opencli browser <session> state to confirm current page and state signature
- 2.Read the smallest relevant sitemap files: SITE.md for orientation, pages/<page-id>.md for current state, workflows/<task-id>.md for your goal
- 3.Check the workflow's Best path; if it names an adapter (e.g., opencli twitter post), try that first
- 4.If the adapter fails or is unavailable, use the Fallback path browser workflow instead
- 5.After each action, refresh state and compare the workflow's state_signature against reality
- 6.If reality disagrees with the sitemap, trust the browser, continue probing, and mark the sitemap entry stale in local overlay
- 7.If an adapter fails with adapter_health_update directive, copy the global workflow to local overlay and set adapter_health to suspect or broken
Use cases
- Navigate a complex multi-page website using workflow guidance from sitemap files
- Recover from a failed adapter command by switching to the browser fallback path
- Detect that a sitemap page structure is outdated and mark it stale for the next agent
- Resume a multi-step task from a saved state signature after browser navigation
- Choose between multiple adapter options (e.g., opencli twitter post vs. raw browser clicks) based on availability
- Agents driving websites with opencli browser when sitemap context is available
- Teams maintaining site sitemaps and needing to track adapter health and stale entries
- Users automating multi-step workflows that benefit from prior site knowledge
opencli-browser-sitemap FAQ
No. The sitemap is prior knowledge, not ground truth. Always trust live browser state. If the sitemap predicts a button or URL that does not appear, re-run state/find with semantic anchors, check for login/locale/A/B test differences, and mark the sitemap entry stale.
Read local overlay first (~/.opencli/sites/<site>/sitemap/), then global seed (sitemaps/<site>/ in repo). Local files override global files with the same id. Do not load entire large sitemaps; list filenames first and read only what you need.
Use the Fallback path browser workflow instead. If the sitemap directs an adapter_health_update, copy the matching global workflow to local overlay (never edit global seed during browser tasks), set adapter_health to suspect or broken, add a stale note with the error, and continue with the browser fallback.
Write a small local note under the relevant page or workflow file in the local overlay with observed_at, current_url, expected, actual, and next_probe fields. Do not edit global seed files unless the task is explicitly sitemap authoring.
Include the path chosen (adapter best path or browser fallback), checkpoint reached (current URL/state signature), and sitemap health status (used as-is, stale marked, or missing workflow). Keep the report task-focused.
Full instructions (SKILL.md)
Source of truth, from jackwener/opencli.
name: opencli-browser-sitemap description: Use when driving a website with opencli browser and sitemap context is available, requested, or needed to avoid blind navigation. Guides agents to consume site sitemap files lazily, choose adapter/browser fallback paths, resume from state signatures, and mark stale sitemap entries without trusting them over live browser state. allowed-tools: Bash(opencli:*), Read, Edit, Write, Grep
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
- Run or reuse
opencli browser <session> stateto know the current page. - Read only the smallest relevant sitemap files:
SITE.mdfor site-level orientation.- One matching
pages/<page-id>.mdfor current state. - One matching
workflows/<task-id>.mdfor the user goal. pitfalls.mdonly when blocked or warned by the workflow.
- Prefer the workflow's Best path. If it names an adapter such as
opencli twitter post, use that before raw browser actions. - If the adapter is unavailable or fails, use the Fallback path browser workflow.
- After each navigation or state-changing action, refresh
stateand compare the workflow'sstate_signature. - If reality disagrees, trust reality, continue probing, and write a local stale note or draft patch.
- If an action recovery includes
adapter_health_update: <adapter> -> 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:
~/.opencli/sites/<site>/sitemap/ # local overlay
sitemaps/<site>/ # 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
stateorfindwith 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:
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:
- Find the local workflow file under
~/.opencli/sites/<site>/sitemap/workflows/whoseBest pathreferences the adapter command. - 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.
- Set
adapter_health: suspectorbrokenas directed. - Add a short stale note with observed error, current URL, and timestamp.
- 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.
Related skills
More from jackwener/opencli and the wider catalog.

opencli-explorer
Automated API discovery and OpenCLI adapter generation for websites via browser exploration.

opencli-oneshot
Generate a single OpenCLI command from a URL and goal in 4 steps.

opencli-operate
Control Chrome via CLI for AI agents—navigate, click, type, extract using existing login sessions.

opencli-repair
Diagnose and fix broken OpenCLI adapters when websites change. Use when an opencli command fails with SELECTOR, EMPTY_RESULT, API_ERROR, or PAGE_CHANGED errors. Reads structured diagnostic output and uses browser automation to discover what changed and patch the adapter.

opencli-usage
Orientation layer for OpenCLI — discover adapters, learn universal flags, and route to specialized skills.

smart-search
Intelligent search router for opencli—route queries to optimal sources across AI, social media, news, shopping, and specialized databases.