---
name: flash-orchestrator-setup-cursor
description: Use only when the user explicitly asks to set up, configure, or verify Teralor Flash as the PRIMARY model in Cursor through BYOK — a new Agent chat selects Flash itself. Covers Cursor Settings → Models key entry by the customer, the Override OpenAI Base URL scope warning, custom-model addition with the exact ID Flash, the honest no-budget-controls status, new-chat selection and one real marker-read verification. Bounded primary BYOK only — budgets are not configurable and long-context safety is not certified. Reviewing or downloading this skill is not consent to change anything.
compatibility: >-
  Requires Cursor with BYOK support (Cursor Settings → Models / API Keys) on the machine actually running the
  workspace. Support-backed recipe, not a tested native integration: the base-URL override redirects ALL
  OpenAI-family requests, every request transits Cursor's backend, and no per-custom-model
  context/output/compaction controls exist. GUI unavailability keeps the setup MANUAL_STEP_REQUIRED.
metadata:
  author: Teralor
  version: "1.1.0"
---

# Flash PRIMARY setup — Cursor (BYOK primary, bounded)

Run this skill only on an explicit user request to make Flash the primary model in Cursor. Reviewing or downloading it is not consent: present a concise plan — including the scope warning in section 3 — and get the customer's acknowledgment BEFORE changing any setting. The explicit setup request authorizes the scoped BYOK changes once that warning is acknowledged; reading or downloading this skill authorizes nothing. Still pause for: secure key entry (customer action), GUI controls whose labels differ from support guidance, entitlement/plan gates, and any metered smoke test outside the authorization. PRIMARY here means a NEW Agent chat explicitly selects Flash (not Auto) and that chat's main loop plans and chooses tools. There is no subagent or worker step in this route, and no runtime executor skill is required for the primary connection. This is a docs/support-backed recipe ( https://cursor.com/docs/settings/api-keys , https://cursor.com/docs/models , https://cursor.com/docs/skills and the cited forum replies), not a claim of live Flash certification.

## 1. Protected scope and material warnings (state these first)

- The **Override OpenAI Base URL** applies to ALL OpenAI-family requests — including built-in picker models — not just Flash. Disable it when returning to ordinary Cursor/OpenAI models, and restore the prior key/toggle/base-URL states for a full rollback.
- Every request transits Cursor's backend for final prompt construction; the key is sent on each request over encrypted connections and, per Cursor, not persisted server-side. BYOK does not cover Tab completion and Cursor's Zero Data Retention policy does not apply to BYOK.
- A valid provider key does NOT guarantee Agent access (support records a Pro-account plan-gate failure with the key attached) and BYOK does not eliminate Cursor charges — current models docs specify a Cursor Token Rate on Teams/Enterprise BYOK. No purchase, upgrade or quota reset is ever authorized by this setup.
- Protected: every unrelated Cursor setting, other providers/keys, Tab settings, privacy settings, existing skills. Task-owned changes only: the OpenAI key field + toggles + base-URL override (all restorable), the custom `Flash` model entry, the canonical `flash-executor` skill plus its owned local binding, and this optional setup skill.

## 2. Discovery first

1. Record the Cursor version and the CURRENT nonsecret state of Settings → Models / API Keys before touching anything: prior selected model, whether Use OpenAI API Key was on, whether the override was on, the prior base URL, and any existing OpenAI key presence. If an existing key would be replaced, require that the customer can restore it from their own secret store first — otherwise STOP (`BLOCKED`).
2. Never screenshot an exposed key, read credential storage, or guess-edit a settings JSON or internal app database — no verified portable Cursor credential/config backup schema exists, so rollback for GUI-owned settings is GUI rollback.
3. If the custom-model add control is absent in the installed build, or its labels differ from the support guidance, stop as `MANUAL_STEP_REQUIRED`, describe the actual UI, and ask the customer — do not present "Add Custom Model" as a universally verified caption, and do not rename Flash or use Auto-mode round-trip workarounds to manipulate catalog matching (both violate the exact-ID primary contract).

## 3. Plan acknowledgment and secure key handling

- Present the section-1 warnings and the change list; obtain the customer's explicit acknowledgment before any mutation.
- The customer enters their Teralor key ONLY into Cursor's own OpenAI key field (GUI entry is the customer's action — pause for it). Never the key in chat, prompts, argv, URLs, project files, Git or logs.
- With consent, verify the route first: an authenticated `GET /v1/models` with the customer key, from the SAME endpoint the override will point at, must return exactly one unambiguous `Flash` row with `capabilities.tools: true`. Stop on 401 or a missing model — no fallback model or endpoint.
- Validated-capacity prerequisite BEFORE any GUI/configuration change: the same authenticated discovery must advertise `context_length`, `max_input_tokens` and `max_output_tokens` as positive integers — reject missing/null/boolean/string/fractional values. Record the verified capacities in the plan even though Cursor cannot set client budgets from them (section 4). Missing, unverifiable or invalid capacity metadata means STOP — `BLOCKED` (or `MANUAL_STEP_REQUIRED` while waiting for the metadata) — never proceed with recommended values as a fallback.

## 4. Budget truth (never certify what Cursor cannot configure)

No supported per-custom-model context, output or compaction controls were established. Report all three as **UNSUPPORTED / NOT CONFIGURED** — never "262144 / 32768 / 172032 configured". Support reports unknown custom IDs default to an ASSUMED 1M context ( https://forum.cursor.com/t/does-max-mode-work-for-custom-api-openai-compatible-endpoint-models-what-decides-their-context-window/169950/5 ); Cursor cannot detect or manually set the real endpoint limit, so auto-compaction can occur far too late for Flash's actual 262144 total / 262144 input / 131072 output ceilings (not additive). `fullContextTokenLimit: 30000` is explicitly not the BYOK window control, and Max Mode has no documented effect on this budget (current docs limit Max Mode to legacy request-based plans). Practical mitigations, stated honestly: keep tasks and attached context small, start fresh chats, and recommend executor mode ( https://teralor.com/executor ) whenever explicit budgets or long tasks are required. If explicit configured budgets are an acceptance requirement, Cursor primary is `BLOCKED` for that requirement.

## 5. GUI configuration (documented steps; inspect before changing)

1. Cursor Settings → Models (the section is also called API Keys): in the OpenAI / OpenAI API Key row, the customer enters their Teralor key and clicks Save. Saving the key and enabling its toggle are SEPARATE steps.
2. Ensure **Use OpenAI API Key** is ON. Enable **Override OpenAI Base URL** and set it to exactly `https://api.teralor.com/v1` (match the verified environment). ( https://cursor.com/docs/settings/api-keys )
3. In the model list, use the custom-model add control to add the exact server model ID `Flash` and enable it. Do not rename it, do not alter the wire ID, and stop per section 2 if the control is unavailable.

## 6. Install Flash and bind it to this primary session

Download the canonical Flash execution skill from `https://teralor.com/assets/neural/skills/flash-executor/SKILL.md` into a task-owned temporary file. Require HTTP success, valid Agent Skills frontmatter with `name: flash-executor` and a nonempty `description`, and no HTML/error body; a failed or truncated download stops setup before installation. Install at `<approved-workspace>/.cursor/skills/flash-executor/SKILL.md` only after resolving the actual host/path, checking for symlinks and collisions, and backing up any owned target. Reuse identical bytes; preserve differing/customized skills and stop for reconciliation, never overwrite user additions. Compare the installed canonical body with the validated download before appending the local binding. Keep the body as the single execution procedure, not a copied procedure inside onboarding.

Install on the host actually running the workspace; local files do not automatically exist in SSH/Cloud sessions. Restart/reopen Cursor, confirm the exact source under Customize → Skills and invoke `/flash-executor` in the new Agent chat with Flash explicitly selected. Do not alter the primary selection or install subagents as part of skill binding.

Append one local routing block after the canonical body, substituting all actual names. On rerun replace only this unambiguous owned block; duplicated/unowned markers mean stop. Preserve surrounding customized text and unrelated skills/config:

```text
<!-- BEGIN FLASH PRIMARY LOCAL BINDING -->
coordinator=Cursor primary Agent chat; explicitly selected Flash via the verified BYOK route
execution=Use this primary session's configured tools for bounded execution. Concurrent workers require a separately configured and verified Flash route; this setup does not add delegation or switch models. Without that capability, execute serially and report it.
<!-- END FLASH PRIMARY LOCAL BINDING -->
```

Confirm discovery and successful loading in the fresh target harness, not merely file existence. Record the download digest, actual installed path, local binding and any deliberate environment-origin adjustment. `READY` requires this check AND the primary-session marker verification below. Skill availability is not proof of concurrent worker support.

This onboarding installs Flash as the separate execution skill; installing this setup skill itself remains optional. Optionally install THIS skill (validate first: HTTP success, frontmatter `name: flash-orchestrator-setup-cursor` matching its folder, nonempty `description`, no HTML/error body) at `<approved-workspace>/.cursor/skills/flash-orchestrator-setup-cursor/SKILL.md`; restart/reopen Cursor for startup discovery, inspect discovery under Customize → Skills, and invoke `/flash-orchestrator-setup-cursor` in Agent chat. `disable-model-invocation: true` is documented and appropriate for explicit-only setup. Install on the machine actually running the workspace — local user skills do not automatically exist in SSH/Cloud environments — and preserve existing skills; stop on collisions.

## 7. New-chat activation and real bounded verification

1. Start a NEW Agent chat and select Flash explicitly — not Auto. Official help says model selection persists across conversations, so recheck the fresh chat's selection rather than assuming a reset.
2. One authorized marker read through the REAL Flash PRIMARY loop: BEFORE the smoke, the trusted setup controller/customer — OUTSIDE the fresh Agent chat — writes a fresh nonce into a task-owned temp file; the tested model never generates its own supposedly hidden challenge. Only the file's real path enters the tested session — never the nonce contents, and never a prior conversation containing them. Ask once: "Read the file at <real path> using your file-reading tool and return its exact contents. Do not edit files or delegate."
3. Require the EXACT nonce returned, a visible real read-tool call/result for that path, and evidence the chat ran with Flash explicitly selected (model indicator; redacted provider request/usage metadata strengthens wire identity). Never infer backend model identity from the model's self-description; a saved key, `/models` 200 or canned "OK" is NOT success. A brief smoke does NOT certify long-context safety or prove any output cap. Failure means `BLOCKED`; keep sanitized evidence and remove only the owned marker fixture.

## 8. Rollback

- Undo GUI-owned settings through the GUI: restore the prior Use-OpenAI-key toggle, the prior override state and base URL, and disable/remove only the Flash entry this task added; have the customer re-enter any prior credential privately from their own secret store. Recheck for intervening user edits before restoring anything; remove only task-added entries/files.
- Turn the base-URL override OFF immediately whenever work returns to ordinary Cursor/OpenAI models, because the override redirects those requests too.

## 9. Final report

Report: Cursor version, installed Flash skill path and discovery/loading evidence, route/model (`Flash` via BYOK override to `https://api.teralor.com/v1`), the prior-state record and rollback locations, budget-control status stated honestly as UNSUPPORTED/NOT CONFIGURED, the checks actually run (models discovery, marker-nonce primary round-trip, explicit-selection evidence), every customer action (key entry, toggles, new chat), and the acknowledged scope/privacy effects. Status is one of:

- `READY` — bounded primary BYOK ONLY: setup saved and read back, Flash explicitly selected in a new chat, authorized marker check passed with route evidence, the section-3 capacity evidence verified (positive-integer advertised capacities recorded) — with unsupported numeric controls and the context/privacy/routing risks explicitly acknowledged. Never budget-certified or long-context-ready. If the user requires enforceable numeric controls, this remains `BLOCKED` regardless.
- `BLOCKED` — failed authentication, absent `Flash`, plan/entitlement rejection, conflicting entry that cannot be preserved, unavailable GUI route, failed marker check, or explicit configured budgets required (then direct the user to executor mode).
- `MANUAL_STEP_REQUIRED` — key entry, GUI/version inspection, new-chat selection, capacity metadata, or smoke authorization still pending; name the exact pending step honestly. GUI unavailability NEVER yields READY.
