---
name: dolphin-anty-profile
description: Use when creating or updating a Dolphin{anty} antidetect browser profile from a Facebook account note in this vault. Reads 2_Credentials/1_Facebook/<note>.md (matching the 2_FB_ACCOUNT template), resolves the linked proxy, builds the fingerprint from the note's User Agent, imports the saved Cookies, and POSTs/PATCHes via the Dolphin remote API. Use when asked to "create a Dolphin profile", "make a Dolphin Anty profile", "sync this FB account to Dolphin", "update the browser profile", "push cookies to Dolphin".
---

# Dolphin{anty} profile from an FB account note

Turn a Facebook account note (`2_Credentials/1_Facebook/…md`, frontmatter matching
`9999_Templates/2_FB_ACCOUNT.md`) into a Dolphin{anty} browser profile.

One note → one profile. The driver parses the note, resolves the linked proxy,
builds the fingerprint from the note's `User Agent`, and imports the saved
`Cookies` so the FB session is restored on launch.

**Two different APIs are involved** (this is the key non-obvious fact):
- **Profile create** → the **remote Sync API** `https://dolphin-anty-api.com`,
  `Authorization: Bearer $DOLPHIN_ANTY_API_KEY`. Works headless.
- **Cookie import** → the **local app API** `http://localhost:3001/v1.0/cookies/import`.
  **The Dolphin{anty} desktop app must be running** for this step. No auth needed on
  that route; `profileId` goes in the body.

**Create vs update is keyed on the note's `Browser Profile ID`:**
- empty → `POST /browser_profiles` with a **complete fingerprint**, then the returned id
  is **written back** into the note, then cookies import.
- present → the driver `PATCH`es **only the proxy** and **refreshes the cookies**. The
  fingerprint is deliberately left untouched so a warmed account's GPU/canvas/etc. stay
  stable across runs. To change the fingerprint, recreate (clear `Browser Profile ID` first).

All paths below are relative to the vault root (`.`).

## Run (agent path) — the driver

The driver is `.claude/skills/dolphin-anty-profile/driver.mjs` (Node 18+, no deps).

**Always preview with `--dry-run` first** — it parses the note, resolves the proxy,
and prints the exact JSON payloads + equivalent curl, hitting nothing and editing
nothing:

```bash
node .claude/skills/dolphin-anty-profile/driver.mjs \
  2_Credentials/1_Facebook/1_12062026_16942.md --dry-run
```

The header lines tell you what it found and what it will do:

```
Note:    …/2_Credentials/1_Facebook/1_12062026_16942.md
Proxy:   socks5 155.212.62.15:64299 (1_12062026_16942)
Cookies: 11 cookie(s)
Action:  CREATE new profile
```

Then go live. Requires **(a)** the key in the environment and **(b)** the Dolphin
desktop app running (for the cookie import):

```bash
export DOLPHIN_ANTY_API_KEY=…           # your remote API token (already in ~/.zshrc here)
node .claude/skills/dolphin-anty-profile/driver.mjs \
  2_Credentials/1_Facebook/1_12062026_16942.md
```

Verified live output:

```
# CREATE (empty Browser Profile ID):
Action:  CREATE new profile
WebGL:   ANGLE (NVIDIA, NVIDIA Quadro M6000 24GB Direct3D11 vs_5_0 ps_5_0, D3D11)
✓ wrote Browser Profile ID: 805820233 back into …/1_12062026_16942.md
✓ imported 11 cookie(s) into profile 805820233

# UPDATE (Browser Profile ID present):
Action:  UPDATE profile 805820233
✓ proxy updated (fingerprint left unchanged)
✓ imported 11 cookie(s) into profile 805820233
```

After CREATE, confirm the profile is **openable** (the app does a single-profile GET on
launch — a complete fingerprint makes this return 200):

```bash
curl -s -o /dev/null -w '%{http_code}\n' \
  "https://dolphin-anty-api.com/browser_profiles/<id>" \
  -H "Authorization: Bearer $DOLPHIN_ANTY_API_KEY"   # -> 200
```

Flags:
- `--dry-run` — preview only; no network, no note edit.
- `--no-cookies` — create/update the profile but skip the cookie import.
- `--help`

## Field mapping — note → profile

| Profile field            | From note |
|--------------------------|-----------|
| `name`                   | `Name` + ` #` + `Order ID` (e.g. `Viola Wilson #16942`) |
| `useragent` (manual)     | `User Agent` |
| `platform` / `osVersion` | derived from the UA (`Windows…` → `windows` / `10`) |
| `proxy` (socks5)         | the `Proxy: "[[name]]"` link → `2_Credentials/0_Proxies/<name>.md` → `Ip` / `Sock5 Port` / `Username` / `Password` |
| cookies                  | `Cookies` (single-quoted JSON array) → **local** `POST http://localhost:3001/v1.0/cookies/import` with `{cookies, profileId, transfer:0, cloudSyncDisabled:false}` |
| create vs update         | `Browser Profile ID` empty = create + write-back; else PATCH proxy + cookie refresh |

Fingerprint (set once at CREATE, in `buildProfilePayload`): `useragent` manual from the
note; `webglInfo` manual with a real **vendor/renderer fetched live** from
`GET /fingerprints/webgl?platform=…&browser_version=…`; `canvas`/`webgl: real`;
`webrtc: altered`; `timezone`/`locale`/`geolocation: auto` (Dolphin derives them from the
proxy IP); `screen: 1920x1080`; `mediaDevices: real`; `ports: protect`; `cpu: 4`,
`memory: 8`. **All of these are required together** — an incomplete fingerprint makes the
profile un-openable (see Gotchas).

## Gotchas

- **The note must live at `<vault>/2_Credentials/1_Facebook/<note>.md`.** The driver
  finds the vault root by going two directories up from the note, then resolves the
  proxy under `2_Credentials/0_Proxies/`. A note copied elsewhere (e.g. `/tmp`) makes
  proxy resolution fail with a `proxy note not found: /…` error.
- **User-agent must be manual.** Dolphin's API rejects auto useragent; the driver
  always sends `{mode:"manual"}` from the note's `User Agent`. A note with no
  `User Agent` is a hard error.
- **Cookies are a single-quoted JSON string in the note** (the JSON contains `:` and
  `"`). The driver strips the quotes and `JSON.parse`s; unparseable JSON → a warning
  and the profile is still created without cookies.
- **`Browser Profile ID` write-back only happens on a live CREATE.** `--dry-run`
  prints "would write … back" but does not touch the note; UPDATE never rewrites it.
- **Cookie import is on the LOCAL app API, not the remote one.** It's
  `POST http://localhost:3001/v1.0/cookies/import` with
  `{cookies, profileId, transfer:0, cloudSyncDisabled:false}` (profileId in the **body**,
  not the path). **Dolphin must be running**, or this step fails with a connection error.
  The cookie objects pass straight through from the note (standard Chrome export shape:
  `name/value/domain/path/expirationDate/…`). Verified working: 11 cookies imported and
  confirmed back via `POST /v1.0/export-cookies`.
- **An INCOMPLETE fingerprint makes the profile un-openable — this is the big trap.** If
  you create a profile with `webglInfo: off` (or omit `screen`/`mediaDevices`), the create
  succeeds and the profile shows in the list, but **opening it in Dolphin throws
  HTTP 500** (`GET …api…/browser_profiles/{id}` → 500), and so does any `PATCH`/single
  `GET`. It is *not* an account/plan limit — it's the missing fingerprint. The driver now
  always sends a complete one (manual `webglInfo` + `screen` + `mediaDevices`), so single
  `GET` returns 200 and `PATCH` works. If an old profile won't open, **recreate** it.
- **On UPDATE the driver PATCHes only `{proxy}`, never the fingerprint.** Re-sending a
  freshly-generated `webglInfo` on every cookie refresh would churn the GPU/canvas between
  sessions — bad for a warmed account. A partial `PATCH {proxy}` returns 200 and leaves the
  rest stable.
- **`GET /browser_profiles?limit=…` (list) always works** and is the reliable way to
  confirm a profile exists / find its id.

## Troubleshooting

- `DOLPHIN_ANTY_API_KEY is not set` → export the token, or use `--dry-run` to preview
  without it.
- `… -> HTTP 401 / Unauthorized.` → the token is missing/invalid. The endpoint is
  correct (a wrong path returns 404, not 401).
- `proxy note not found: …` → the `Proxy: "[[name]]"` link doesn't resolve to
  `2_Credentials/0_Proxies/<name>.md`. Create the proxy note first (see
  `9999_Templates/1_PROXY.md`).
- `note has no User Agent` → fill the `User Agent` frontmatter field.
- cookie step fails with `ECONNREFUSED` / `fetch failed` on `localhost:3001` → the
  Dolphin desktop app isn't running (or its Local API is off). Launch Dolphin, then re-run.
- **profile won't open in Dolphin / `…/browser_profiles/{id}` → HTTP 500** → the profile
  was created with an incomplete fingerprint (e.g. by an older driver version). Recreate it:
  clear `Browser Profile ID` in the note and re-run. A freshly-created profile from the
  current driver returns 200 on single GET.
- `PATCH … -> HTTP 500` warning on UPDATE → the stored profile is broken (incomplete
  fingerprint from before); recreate it. A valid profile accepts `PATCH {proxy}` with 200.
- local route returns `{"success":false,"error":"invalid session token"}` → that route
  needs Dolphin's *local* session token (different from the API key). The `cookies/import`
  route used here does not need it; other local profile routes do — out of scope for this skill.

## Verify (no key needed)

```bash
node .claude/skills/dolphin-anty-profile/driver.mjs \
  2_Credentials/1_Facebook/1_12062026_16942.md --dry-run
```

Confirms parsing, proxy resolution (`socks5 155.212.62.15:64299`), an 11-cookie
import payload, and the `CREATE new profile` decision — all without a key.