Skip to content

mxyhi/ok-skills / kimi-webbridge

kimi-webbridge

Unverified

Kimi Browser Extension(Kimi 浏览器扩展,原 Kimi WebBridge)lets AI control the user's real browser — navigate, click, type, read, screenshot, and interact with any website using the user's actual login sessions. Use this skill whenever the user wants to interact with websites, automate browser tasks, scrape web content, or perform any action requiring a real browser. Also use when the user mentions "browser", "webpage", "open URL", "screenshot", asks to read/interact with any website, or wants a reusable CLI tool or script that automates a specific website. Use even for simple-sounding browser requests — the daemon handles all complexity.

references/cli-creator/site-exploration.md

View on GitHub
# Site Exploration Protocol

Run this for each planned feature **before** writing any implementation code. It ends with an `evaluate` call that returns the feature's data inside the user's browser session — that call is what the CLI command will wrap.

Every step is a tool from SKILL.md, sent in its Call Format. Use one `session` for the whole exploration — the platform name the CLI will use.

## Steps

1. **`navigate`** `{url: "<target-url>", newTab: true}` — open the page the feature lives on.

2. **`snapshot`** — read the page structure. If the feature is purely DOM-based (the text is already on the page, or the action is one visible button), note the `@e` refs and go to step 7.

3. **`network`** `{cmd: "start"}` — begin capturing.

4. **Trigger the feature** so the page makes its API call — `navigate` to the same URL without `newTab` (it reloads the tab; with `newTab` the capture would stay behind on the old tab), scroll, or `click`. For an action with side effects (posting, liking), ask the user to do it once in the tab you opened instead — capture is per tab.

5. **`network`** `{cmd: "list", filter: "<url-substring>"}` — find the XHR/GraphQL/REST call behind the feature; skip static assets. Then, **while capture is still on**:
   - **`network`** `{cmd: "detail", requestId: "<id>"}` — full URL with query params, method, status, `requestHeaders`, `requestBody`, and the response `body`. Note the response's field names, nesting, and any pagination cursor. In `requestHeaders`, note the ones the page set itself — `authorization`, a CSRF token, a language header, other `x-…` headers: the replay in step 7 has to send them.

   The response body can only be fetched while capture is on.

6. **`network`** `{cmd: "stop"}`

7. **`evaluate`** — replay the call from inside the page. On a same-origin call the browser attaches the user's cookies on its own; when the API is on another host than the page, add `credentials: "include"`:

   ```js
   (async () => {
     const r = await fetch("<api-path>", {
       method: "POST",
       headers: {"Content-Type": "application/json", <headers the page set, from step 5>},
       body: JSON.stringify(<request-body>),
     });
     return JSON.stringify({status: r.status, body: await r.text()});
   })()
   ```

   `evaluate` runs the code as a plain script, so `await` needs the async wrapper.

   For a DOM-based feature (you came here from step 2) there is no call to replay: use `evaluate` to read the content or perform the click, and check the result against what the snapshot showed.

   **Compare the result with the response body captured in step 5** — same items, same count. A replay can return 200 with different data (another language, a shorter list) when it lacks a header the page sends, so "looks plausible" is not the test.

   If the site rejects the replay or the data differs, the replay is missing a header the page sends — compare it against `requestHeaders` from step 5, add what is missing, and retry. The browser attaches `cookie`, `user-agent`, `accept-encoding` and the `sec-…` headers on its own. For a token (`authorization`, a CSRF header), the captured value tells you what to look for: find where the page keeps it — cookies, `<meta>` tags, `localStorage` / `sessionStorage` — then read it from there inside the same `evaluate` call and use it there. It never needs to leave the page, and the CLI must not hardcode it.

## Common patterns

| Pattern | What it means | How to handle |
|---------|---------------|---------------|
| CSRF token header | Token read from a cookie or `<meta>` tag | Read it in the same `evaluate` and set the header |
| Bearer token in web storage | `authorization: Bearer …` in `requestHeaders`; the same token sits in `localStorage` / `sessionStorage` | Read it in the same `evaluate` and send it as the `Authorization` header |
| Cursor pagination | `cursor` / `after` field in the response | Pass the cursor back as a request arg |

## Exploration summary

Write the findings down in the CLI project before writing code:

```
Feature: [home feed / search / post / ...]
Request: [GET/POST] <full URL>   (or "DOM read")
Auth: [cookies only / token header from <where>]
Request params: [query, cursor, limit]
Response shape: {data: [{id, text, author: {name}, created_at}], next_cursor}
Evaluate call: [the working JS]
```
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall