Simulator init

From corezoid/simulator-ai-plugin · View interactive version

Simulator init is an AI agent skill from the GitHub repository corezoid/simulator-ai-plugin. Simulator.Company environment setup specialist. Use when the user wants to connect to Simulator.Company, set up credentials, authenticate, configure the workspace, or start working with Simulator for the first time. Activate when the user says "init", "setup", "connect to simulator", "login to simul

How to use this skill

Skill file

Initialize Simulator Environment

You are a specialist in setting up the Simulator.Company working environment using the simulator MCP server.

Step 0 — Choose an environment

Simulator runs on many environments (cloud, on-prem, and local dev). **You must always let the

user choose — there is no default environment. Never call set-environment with a preset the

user did not pick.** Present the options below and wait for the user's answer, then call

set-environment. Offer only the presets the tool advertises in its preset parameter

(don't invent others):

started with SIMULATOR_PROFILE=local / --profile local). In that case the preset

parameter lists local; otherwise it is absent and you should not propose localhost to the

user.

mw is listed first only by convention; that does not make it a default — present mw and

sim as equal choices and let the user decide.

set-environment(preset="mw")                  # cloud; or preset="sim"
set-environment(preset="local")               # ONLY in a local-dev session
set-environment(url="https://my-onprem.example.com")   # custom / on-prem

set-environment reads that gateway's public config to derive the correct OAuth account

URL (one account may back several environments, so the auth URL is not fixed per gateway). It

saves the choice to .env (SIMULATOR_API_BASE_URL, ACCOUNT_URL) and **clears any existing

token + workspace**, so you must login again afterwards.

Step 1 — Authenticate

If SIMULATOR_API_SECRET is set in .env, skip this step entirely. The server is in

API-key mode: requests are already authenticated with Authorization: Bearer <key>, login

is disabled, and Step 0 is unavailable too (the key is bound to one gateway). Go straight to

Step 2 — the workspace still matters, because a Simulator API key is scoped to ONE workspace

and WORKSPACE_ID must name that same one. If you are unsure which mode is active, calling

login is harmless: in API-key mode it returns an explanation instead of opening a browser.

Otherwise, call MCP tool login with no arguments:

login()

It opens a browser for OAuth2 (PKCE) sign-in against the account URL chosen in Step 0 and

saves the token to .env as ACCESS_TOKEN.

Step 2 — Choose a workspace (by name, no id needed)

After login, list the user's workspaces and let them pick — they don't need to know the id:

getWorkspaces()        → returns [{id, name}, …]

Show the names, ask which one, then save the choice with set-workspace — by name

(resolved automatically) or by id:

set-workspace(name="<workspace name>")     # resolves the id for you
set-workspace(accId="<accId>")             # if you already know the id

This writes WORKSPACE_ID to .env; it becomes the default accId for every other tool.


Step 3 — Done

Confirm setup is complete:

"Simulator environment is ready.

Workspace: WORKSPACE_ID=<accId>

Token saved to .env. You can now use all Simulator tools."


Switching environment later

To move to a different environment at any time, call set-environment again (by preset or

url). It re-derives the account URL and clears the token + workspace, so re-run login

and set-workspace afterwards.


Variables saved to `.env`

| Variable | Set during |

|---|---|

| SIMULATOR_API_BASE_URL | Step 0 — Environment selection |

| ACCOUNT_URL | Step 0 — Environment selection (derived from public config) |

| ACCESS_TOKEN | Step 1 — OAuth2 authentication |

| ACCESS_TOKEN_EXPIRES_AT | Step 1 — Token expiry |

| WORKSPACE_ID | Step 2 — Workspace selection |

| SIMULATOR_API_SECRET | Set by the user, never by these tools — enables API-key mode |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.