# Proof audit pass 1 — Cursor built-in skills

Review: [#18673](https://git.cafe/pingdotgg/t3code/pulls/18673) ([GitHub mirror #18673](https://github.com/pingdotgg/t3code/pull/18673)).
Replacement [dc550f5935](https://git.cafe/pingdotgg/t3code/commit/dc550f5935bac14d573b3092fe2f311b88f061a5), base [3cc31ed27c](https://git.cafe/pingdotgg/t3code/commit/3cc31ed27c). Original supplied head [936ba6dac6](https://git.cafe/pingdotgg/t3code/commit/936ba6dac687ba9a8189e5a4d254e889757135f2).

Verdict: no actionable defect found in the replacement diff. All required proof rows below passed. Full replacement/base diff is two server files, 19 additions / 3 deletions. Original/replacement scanner behavior is identical; replacement removes three additional original tests for existing scan-budget/dependency/symlink behavior. No render code changed. No browser, viewport, or theme rows apply.

## Required fixture matrix and capture form

| Required branch / fixture | Before | After | Capture / result |
|---|---|---|---|
| Built-in with `surfaces: [cli]`, labelled `builtin-cli` | Base omits it | Listed at temporary HOME path, `scope: system`, `enabled: true`, labelled description | PASS: actual base/current module JSON + real server `server.refreshProviders` RPC transcript |
| Built-in with no surface restriction, `builtin-default` | Base omits it | Listed as system | PASS: module + RPC JSON |
| Built-in IDE-only, `builtin-ide` | Omitted | Still omitted; new root does not bypass CLI filter | PASS: module + RPC JSON; focused test also excludes IDE-only skill |
| Project/user/built-in same name, `project-wins` | Project wins | Project still wins; exact project path/description and one result | PASS: module + RPC JSON; focused test covers project winner |
| User/built-in same name, `user-wins` | User wins | User still wins; exact user path/description and one result | PASS: module + RPC JSON (fills a gap in committed test, where project shadow masks user-v-built-in precedence) |
| Missing built-in root | Existing roots still work | Existing roots still work; no fatal missing-root error | PASS: real server root-absent RPC, followed by root-present RPC. This is a fixture comparison on replacement, explicitly not a base-server capture |
| No project cwd | Base user roots only | User + system built-ins; user winner remains user | PASS: actual base/current `probeCursorSkills(undefined, ...)` JSON |
| Machine versus workspace RPC representation | Machine snapshot has no workspace-discovered skills | Machine `skills` remains empty; canonical result is `workspaceSnapshots[cwd].skills` | PASS: real server getConfig / workspace refresh / machine refresh JSON. Do not mistake top-level `skills: []` for failed discovery |
| Read-only discovery | Fixture manifest before scan | Same files, dirs, modes, sizes, mtimes and SHA-256 values after RPCs | PASS: 22 manifest entries equal. Baseline captured after harness root-rename setup; preserves only actual scan interval |
| Existing parser, recursion and mention behavior | Existing behavior | Remains passing | PASS: all 5 focused tests, including depth/symlink package boundary and mention rewriting. No provider turn was launched |

Required evidence form is a textual RPC request/response transcript plus labelled fixture manifest and tests. Screenshots/video are unnecessary for this server-only change. Browser was optional and was not used. Actual base module was loaded from `git show` into scratch; the real dev server ran replacement only. No claim of a baseline server run or composer visual verification is made.

## Exact isolation / seed approach

All commands ran from `/home/ubuntu/wt/pr-18673`; scratch lives under `/tmp/ev-18673/audit-pass1`. A new temporary HOME was created there with only synthetic, labelled Cursor fixtures initially. No real `~/.cursor` or `~/.t3/userdata` was opened, copied, or seeded.

Server command (credential value deliberately omitted):

```sh
HOME=/tmp/ev-18673/audit-pass1/home \
T3CODE_DEV_SEED=0 \
T3CODE_DEV_AUTH_TOKEN="$(cat /tmp/ev-18673/audit-pass1/token)" \
node scripts/dev-runner.ts dev:server \
  --home-dir /tmp/ev-18673/audit-pass1/state \
  --no-seed --host 127.0.0.1 --port 18763
```

Fresh `state` did not exist before launch. No migrate-dev-db command was run. Server startup confirmed `baseDir=/tmp/ev-18673/audit-pass1/state`, listening on loopback 18763, recovery counts all zero. Browser opening was disabled by default. The isolated default Cursor instance was enabled through `server.updateSettings` with `{providerInstances:{cursor:{driver:"cursor",enabled:true}}}`. The RPC capture authenticates with the generated local dev credential, mints a WebSocket ticket, connects with orchestrationProtocol=2, and calls `server.refreshProviders` with `{instanceId:"cursor",cwd:"/tmp/ev-18673/audit-pass1/workspace",fresh:true}`. No `refreshModels` or agent turn was requested. Credentials, tickets, full account data and pairing URLs are excluded from public evidence.

Server was stopped via its captured exec session (exit 130). Working tree remained clean. No commits, pushes, PR comments, watches, or delegation.

## Validation

- `vp test run packages/provider-cursor/src/server/skills.test.ts`: 1 file, 5 tests passed.
- `vp lint packages/provider-cursor/src/server/skills.ts packages/provider-cursor/src/server/skills.test.ts`: exit 0.
- `vp run --filter @t3tools/provider-cursor typecheck`: exit 0; existing Effect suggestions in unrelated files, no type errors.
- Source read confirms scanner has only filesystem reads; adapter uses tolerant discovery to resolve skill mentions, driver uses strict probe for workspace snapshot.
- Built-ins use existing shared scan budget/depth/realpath machinery. Oversized/unreadable/budget-exhausted built-ins are inherited scanner limitations, not separately verified runtime rows. No claim of an exhaustive parser/security audit.

## FRICTION

FRICTION: Fresh settings disable Cursor. Enabled it only in isolated state before evidence capture.

FRICTION: First HTTP ticket attempt included a cleared session cookie and returned 401. Capture was corrected to omit `Max-Age=0` cookies; successful requests are in final transcript.

FRICTION: Parent environment contains a Cursor API credential, so enabling Cursor performed SDK availability/catalog discovery and succeeded despite synthetic HOME. Public capture keeps only skill-related fields. Other provider startup probes also populated temporary HOME (including Codex bundled skills); those unrelated skills are counted and omitted from the transcript. Cursor fixtures remained unchanged. This was a real server with synthetic skills, not a mocked RPC server or evidence from an actual Cursor skill installation.

FRICTION: A root-absent/present setup rename changes the parent directory mtime. Preservation manifest correctly starts after setup, immediately before present-root RPCs, and is exactly equal afterward.

## Runtime RPC capture (skill-related response projection)

```json
[
  {
    "label": "enable isolated Cursor instance",
    "request": {
      "_tag": "Request",
      "id": "1",
      "tag": "server.updateSettings",
      "payload": {
        "patch": {
          "providerInstances": {
            "cursor": {
              "driver": "cursor",
              "enabled": true
            }
          }
        }
      },
      "headers": []
    },
    "response": {
      "_tag": "Success",
      "settingsUpdateAccepted": true
    }
  },
  {
    "label": "built-in root absent (pre-change observable equivalent; replacement binary)",
    "request": {
      "_tag": "Request",
      "id": "2",
      "tag": "server.refreshProviders",
      "payload": {
        "instanceId": "cursor",
        "cwd": "/tmp/ev-18673/audit-pass1/workspace",
        "fresh": true
      },
      "headers": []
    },
    "response": {
      "_tag": "Success",
      "cursor": {
        "instanceId": "cursor",
        "enabled": true,
        "skills": [],
        "workspaceSnapshots": [
          {
            "cwd": "/tmp/ev-18673/audit-pass1/workspace",
            "checkedAt": "2026-10-24T23:09:41.323Z",
            "slashCommands": [],
            "skills": [
              {
                "name": "project-wins",
                "description": "LABEL project winner",
                "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills/project-wins/SKILL.md",
                "scope": "project",
                "enabled": true
              },
              {
                "name": "user-wins",
                "description": "LABEL user winner",
                "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
                "scope": "user",
                "enabled": true
              }
            ],
            "unrelatedSkillCount": 5
          }
        ]
      }
    }
  },
  {
    "label": "built-in root present",
    "request": {
      "_tag": "Request",
      "id": "3",
      "tag": "server.refreshProviders",
      "payload": {
        "instanceId": "cursor",
        "cwd": "/tmp/ev-18673/audit-pass1/workspace",
        "fresh": true
      },
      "headers": []
    },
    "response": {
      "_tag": "Success",
      "cursor": {
        "instanceId": "cursor",
        "enabled": true,
        "skills": [],
        "workspaceSnapshots": [
          {
            "cwd": "/tmp/ev-18673/audit-pass1/workspace",
            "checkedAt": "2026-10-24T23:09:43.746Z",
            "slashCommands": [],
            "skills": [
              {
                "name": "builtin-cli",
                "description": "LABEL builtin cli",
                "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-cli/SKILL.md",
                "scope": "system",
                "enabled": true
              },
              {
                "name": "builtin-default",
                "description": "LABEL builtin default",
                "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-default/SKILL.md",
                "scope": "system",
                "enabled": true
              },
              {
                "name": "project-wins",
                "description": "LABEL project winner",
                "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills/project-wins/SKILL.md",
                "scope": "project",
                "enabled": true
              },
              {
                "name": "user-wins",
                "description": "LABEL user winner",
                "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
                "scope": "user",
                "enabled": true
              }
            ],
            "unrelatedSkillCount": 5
          }
        ]
      }
    }
  },
  {
    "label": "machine refresh without cwd (does not expose workspace skills)",
    "request": {
      "_tag": "Request",
      "id": "4",
      "tag": "server.refreshProviders",
      "payload": {
        "instanceId": "cursor"
      },
      "headers": []
    },
    "response": {
      "_tag": "Success",
      "cursor": {
        "instanceId": "cursor",
        "enabled": true,
        "skills": [],
        "workspaceSnapshots": [
          {
            "cwd": "/tmp/ev-18673/audit-pass1/workspace",
            "checkedAt": "2026-10-24T23:09:43.746Z",
            "slashCommands": [],
            "skills": [
              {
                "name": "builtin-cli",
                "description": "LABEL builtin cli",
                "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-cli/SKILL.md",
                "scope": "system",
                "enabled": true
              },
              {
                "name": "builtin-default",
                "description": "LABEL builtin default",
                "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-default/SKILL.md",
                "scope": "system",
                "enabled": true
              },
              {
                "name": "project-wins",
                "description": "LABEL project winner",
                "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills/project-wins/SKILL.md",
                "scope": "project",
                "enabled": true
              },
              {
                "name": "user-wins",
                "description": "LABEL user winner",
                "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
                "scope": "user",
                "enabled": true
              }
            ],
            "unrelatedSkillCount": 5
          }
        ]
      }
    }
  },
  {
    "label": "fixture preservation around present-root RPC calls (after harness rename)",
    "equal": true,
    "entries": 22
  }
]
```

## Actual base/current module comparison

```json
[
  {
    "label": "baseline 3cc31ed27c",
    "cwd": "/tmp/ev-18673/audit-pass1/workspace",
    "skills": [
      {
        "name": "project-wins",
        "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills/project-wins/SKILL.md",
        "scope": "project",
        "enabled": true,
        "description": "LABEL project winner"
      },
      {
        "name": "user-wins",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
        "scope": "user",
        "enabled": true,
        "description": "LABEL user winner"
      }
    ],
    "unrelatedSkillCount": 5
  },
  {
    "label": "baseline 3cc31ed27c",
    "cwd": null,
    "skills": [
      {
        "name": "project-wins",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/project-wins/SKILL.md",
        "scope": "user",
        "enabled": true,
        "description": "LABEL user shadow"
      },
      {
        "name": "user-wins",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
        "scope": "user",
        "enabled": true,
        "description": "LABEL user winner"
      }
    ],
    "unrelatedSkillCount": 5
  },
  {
    "label": "replacement dc550f5935",
    "cwd": "/tmp/ev-18673/audit-pass1/workspace",
    "skills": [
      {
        "name": "builtin-cli",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-cli/SKILL.md",
        "scope": "system",
        "enabled": true,
        "description": "LABEL builtin cli"
      },
      {
        "name": "builtin-default",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-default/SKILL.md",
        "scope": "system",
        "enabled": true,
        "description": "LABEL builtin default"
      },
      {
        "name": "project-wins",
        "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills/project-wins/SKILL.md",
        "scope": "project",
        "enabled": true,
        "description": "LABEL project winner"
      },
      {
        "name": "user-wins",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
        "scope": "user",
        "enabled": true,
        "description": "LABEL user winner"
      }
    ],
    "unrelatedSkillCount": 5
  },
  {
    "label": "replacement dc550f5935",
    "cwd": null,
    "skills": [
      {
        "name": "builtin-cli",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-cli/SKILL.md",
        "scope": "system",
        "enabled": true,
        "description": "LABEL builtin cli"
      },
      {
        "name": "builtin-default",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-default/SKILL.md",
        "scope": "system",
        "enabled": true,
        "description": "LABEL builtin default"
      },
      {
        "name": "project-wins",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/project-wins/SKILL.md",
        "scope": "user",
        "enabled": true,
        "description": "LABEL user shadow"
      },
      {
        "name": "user-wins",
        "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
        "scope": "user",
        "enabled": true,
        "description": "LABEL user winner"
      }
    ],
    "unrelatedSkillCount": 5
  }
]
```

## Fixture manifest (identical before and after)

```json
[
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883383736.5981
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/project-wins",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/project-wins/SKILL.md",
    "mode": 33204,
    "size": 64,
    "mtimeMs": 1792883228527.7751,
    "sha256": "a3a53cb42ba544e64d45605b3b847d99d672a14bb8d77eef79d0e627b39412b4"
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills/user-wins/SKILL.md",
    "mode": 33204,
    "size": 64,
    "mtimeMs": 1792883228527.7751,
    "sha256": "148bf2fe41954d4c34eef1a2a1b1cc6e9050a0c48eaecb90034b00a105a7c5ad"
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-cli",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228523.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-cli/SKILL.md",
    "mode": 33204,
    "size": 92,
    "mtimeMs": 1792883228523.7751,
    "sha256": "4aa87fe1daa45f43ae9ee1a6be803cd5ac3a35c690775435ab440f3539e41631"
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-default",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228523.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-default/SKILL.md",
    "mode": 33204,
    "size": 68,
    "mtimeMs": 1792883228523.7751,
    "sha256": "31e8e5b0c1531cca2cecc7647ba1356c9b8e2db05ae48f4be58aa7edfcd5622a"
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-ide",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228523.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/builtin-ide/SKILL.md",
    "mode": 33204,
    "size": 91,
    "mtimeMs": 1792883228527.7751,
    "sha256": "7e22e9f41dae38fc96fa55530a323ce22c109e844da330af701deee1f676fb61"
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/project-wins",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/project-wins/SKILL.md",
    "mode": 33204,
    "size": 67,
    "mtimeMs": 1792883228527.7751,
    "sha256": "4ec82daba7d4f29b24c92e4f47ddfdc37e63a016f10b96348b42c6a118b5ae72"
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/user-wins",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/home/.cursor/skills-cursor/user-wins/SKILL.md",
    "mode": 33204,
    "size": 67,
    "mtimeMs": 1792883228527.7751,
    "sha256": "4ec82daba7d4f29b24c92e4f47ddfdc37e63a016f10b96348b42c6a118b5ae72"
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/workspace",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/workspace/.agents",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills/project-wins",
    "mode": 16893,
    "size": 4096,
    "mtimeMs": 1792883228527.7751
  },
  {
    "path": "/tmp/ev-18673/audit-pass1/workspace/.agents/skills/project-wins/SKILL.md",
    "mode": 33204,
    "size": 67,
    "mtimeMs": 1792883228527.7751,
    "sha256": "990bb886be577db9026ab6c0fda4861c9003e1bcb630533ddd7423aca21387dc"
  }
]
```

## Focused test output

```text
note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead.

 RUN  v5.0.5 /home/ubuntu/wt/pr-18673


 Test Files  1 passed (1)
      Tests  5 passed (5)
   Start at  23:06:38
   Duration  12.69s (transform 53%, setup 33%, import 10%, tests 4%)


```
