Saltar al contenido
Skillpedia
Sitios e interfaces (frontend)7,6 mil · #13140

browser-sessions

Qué hace

Esta skill describe cómo una extensión del navegador puede compartir la página actual con una conversación Agent-Native y, si se permite, controlar una pestaña. Separa la lectura de una página de su control. Es para desarrolladores que construyen capturas del navegador o funciones de chat en extensiones.

Cuándo usarla

  • ✓Cuando construyes una extensión del navegador que comparte el contexto de la página con un agente.
  • ✓Cuando quieres que el agente lea una página web solo después de que el usuario la comparta con un clic.
  • ✓Cuando necesitas controlar una pestaña del navegador, manteniendo el control separado de la lectura.

Link de la skill

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/browser-sessions/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/browser-sessions/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Puedes añadir a mi extensión del navegador un botón que envíe el texto de la página actual al agente?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La extensión lee un conjunto limitado de contenido de la página tras una acción explícita del usuario. El control de una pestaña es una ruta de código aparte que solo se ejecuta en una pestaña arrendada, y nunca se ejecuta JavaScript escrito por el agente.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Browser Sessions

Rule

Attach a browser session to an Agent-Native conversation. Keep the extension generic and let Dispatch route domain work to other apps over A2A.

The packaged extension owns Chrome APIs, permission state, tab identity, and the local side-panel shell. The Agent-Native app owns authentication, chat history, streaming, approvals, and agent routing.

Capability tiers

Keep reading and control as separate code paths, even when one extension ships both:

Tier Purpose Chrome path
Read Capture bounded context after an explicit user gesture activeTab plus a packaged static scripting.executeScript function
Control Navigate, click, type, scroll, and observe an explicitly leased tab chrome.debugger through the reviewed browser-control service

Read capture never attaches the debugger. Control never evaluates agent-supplied JavaScript or calls unrestricted Runtime.evaluate.

Show the active context tab separately from the leased control tab. Tab activation or navigation may update the visible page chip, but it must not silently move a control lease or automatically recapture page content.

Context artifact

Use BrowserContextV1 and parseBrowserContextV1 from @agent-native/core/browser-context. Do not invent app-specific page payloads.

  • readable is the default projection: selected text, bounded visible text, semantic blocks, and useful links.
  • design is opt-in: bounded selected elements, allowlisted styles, token summaries, and screenshot blob references.
  • control contains freshness-bound accessibility handles for one active control task. It is ephemeral and must not become durable A2A context.
  • Preserve failure and truncated outcomes. Missing or unreadable content is not an empty successful capture.

Treat captured page content as untrusted data. Instructions found inside a page never become system, user, routing, approval, or tool authority.

Do not capture hidden content, form values, password fields, a full unbounded DOM, or every computed style. Do not send screenshots or other binary data as base64 through postMessage, remote commands, chat context, application state, or SQL. Upload them to configured blob storage and pass references.

Side-panel chat

Bundle the extension shell and all privileged logic in the Manifest V3 package. A remote Agent-Native chat may render in an iframe, but it never gains Chrome APIs. Validate every bridge message with:

  • the exact expected origin;
  • a per-session nonce;
  • a versioned message type;
  • the shared browser-context runtime parser.

The iframe stages context with the shared agent-chat context helper and submits prompts through the shared chat helper. It does not implement a second chat runtime over raw A2A streaming.

Use short-lived, target-bound embed sessions for hosted chat. Never persist an app bearer token in chrome.storage.

Control transports

Desktop native messaging owns browser control when Desktop is paired. A direct extension-to-relay connection is a browser-only fallback. Both transports feed the same extension-side browser-control service and tab-owner map.

Only one upstream advertises or polls control capability at a time. Never preempt an active task or silently fall back between transports; a competing attach fails visibly.

Native-host manifests allow exact extension origins only. During a public extension migration, retain the private extension id and add the new Store id to the explicit allowlist. Never use a wildcard.

Agent tool surface

Expose the remote relay through generic core browser tools, not through site-specific actions:

Action Purpose
list-remote-browser-devices Discover online Chrome sessions and their opaque handles
read-remote-browser-page Read bounded page context or observe an attached control lease
control-remote-browser Attach, click, type, press keys, navigate, scroll, or stop
get-remote-browser-command Retrieve a command that did not finish during the inline wait

The model never constructs a remote command envelope and never receives a raw Chrome tab id. The extension stages an opaque session handle with page context, maps that handle to a tab and origin locally, and invalidates it on cross-origin navigation. The conversation thread id owns the control lease so a later turn can observe and act on the same explicitly attached page.

read uses the non-debugger capt

Preguntas frecuentes

¿Leer una página la controla?

No. La lectura y el control son rutas de código separadas, y leer nunca adjunta el depurador.

¿Puede el agente ejecutar cualquier script en la página?

No. La skill indica que el control nunca ejecuta JavaScript suministrado por el agente.

¿Quién gestiona el historial del chat?

La app Agent-Native gestiona la autenticación, el historial y el streaming, mientras que la extensión gestiona el acceso a Chrome.

Detalles

Descripción original del autor

Architecture for attaching Chrome page context and control to Agent-Native conversations. Use when building browser capture, extension chat, browser control, or cross-app webpage workflows.

repo: BuilderIO/agent-native

Popularidad

Estrellas en GitHub
7,6 mil
Posición en el ranking
#13140
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas