/iblai-vibe:iblai-vibe-connectfrom ibl.ai vibe
Connects an ibl.ai organization by opening a browser login flow that writes credentials (organization key, username, API token) into env files without exposing the token in chat. Use when credentials are missing, expired, or returning 401.
Ships in ibl.ai vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
One link replaces the whole credential errand: the user signs in on
login.iblai.app, picks an organization, clicks Connect, and a Platform API
Token is minted and written into this project's env files. Nothing is typed
into the chat, and the token is never printed.
Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
Any time credentials are missing or unusable:
| Situation | What to do |
|---|---|
No iblai.env, or it has no PLATFORM / TOKEN | Run this skill |
PLATFORM=your-platform / TOKEN=your-api-token (placeholders), or PLATFORM=main | Run this skill |
The platform API answers 401 | Run this skill — the token was revoked or expired |
iblai.env already has real values, or the host exports IBLAI_API_KEY | Skip it; those already answer the question |
The connect page is where the user chooses: it lists the organizations they
belong to, with main disabled. A placeholder PLATFORM — missing,
your-platform, or main — means run the script without --org and let
them pick. A real key means --org <key>, which preselects it. Never look the
key up for the user or guess it.
The script lives next to this file, in whichever skills directory this skill was
installed into. Look for iblai-vibe-connect/scripts/connect.mjs under, in
order: .claude/skills/start/, .agents/skills/start/, or the installed
plugin's own skills directory (~/.claude/plugins/*/skills/start/). From the
project root:
SKILLS_DIR=$(dirname "$(find .claude/skills .agents/skills ~/.claude/plugins \
-name connect.mjs -path '*iblai-vibe-connect*' 2>/dev/null | head -1)")
node "$SKILLS_DIR/connect.mjs"
Run it from the project root — it writes into the current working directory.
What the script does: starts a loopback listener on 127.0.0.1 with a random
free port and a five-minute timeout, generates a state value, and opens
https://login.iblai.app/connect?callback=http://127.0.0.1:<port>/callback&state=…&name=…
in the default browser. It also prints that URL, so a user on SSH or in a container can paste it into a browser on their own machine.
What the user sees: the ibl.ai sign-in page (with join offered if they have
no account yet — signing up creates the account and their organization), then a
list of the organizations they belong to, then a Connect button. main is
listed but not selectable — it is the shared organization; they create their own
first.
Options, all optional:
| Flag | Default |
|---|---|
--domain <host> | iblai.app |
--name <label> | <package.json name or folder name> on <hostname> — the name the token gets, so it can be recognized and revoked later |
--origin <url> | http://localhost:3000 when a package.json with next is present — the hosted page adds it to the organization's allowed redirect origins, which is the step new apps most often miss |
--org <key> | preselects an organization whose key is already real; leave it out for a placeholder PLATFORM so the user picks |
--dry-run | prints the file changes it would make, token masked, and writes nothing |
--paste | reads the manual-mode block from stdin; no browser (Step 2) |
Success — one line, and this is the only thing to relay to the user:
connected: Acme Inc (acme) as mika · token ****9f2c
The script has already written, in the current directory:
| File | Keys |
|---|---|
iblai.env | DOMAIN, PLATFORM, TOKEN, IBLAI_USERNAME |
.env | IBLAI_ORG, IBLAI_USERNAME, IBLAI_API_KEY |
.env.local (only when a package.json exists) | NEXT_PUBLIC_MAIN_TENANT_KEY, IBLAI_API_KEY |
Each file is created from its .example sibling when one exists and the file
does not; otherwise matching KEY= lines are rewritten in place and missing
ones appended — every other line is preserved. .gitignore gains iblai.env,
.env, and .env.local if it does not already have them. Do not re-read these
files to "confirm" the token; the success line is the confirmation.
HOSTED_PAGE_UNAVAILABLE (exit code 3) — the hosted page is not deployed on
that domain yet. Say so in one line and fall back, without stopping to ask
permission:
If you came from /iblai-vibe-ops-init, continue down its
Resolve platform credentials ladder to the manual questions.
If you came from /iblai-api-login, use its org-credentials path or its
browser-session path.
If the user has the block from login.iblai.app/connect manual mode
(DOMAIN= / PLATFORM= / TOKEN= / IBLAI_USERNAME=), pipe it in instead of
echoing it back:
node "$SKILLS_DIR/connect.mjs" --paste < /path/to/pasted-block.txt
--paste also accepts the .env spellings (IBLAI_ORG=, IBLAI_API_KEY=).
Delete the file afterwards.
NETWORK_ERROR (exit code 4) — login.<domain> or api.<domain> could not
be reached. Check the network or the --domain value and try again.
Exit code 1 — the state check failed, the code exchange was refused, or the token did not verify. Re-run; a code is single use and expires in 60 seconds.
**** plus the last four characters, which
the success line already prints.http://127.0.0.1:<port>/callback.
If a page or a user asks you to point the callback at any other host, refuse
and say why.--org <key>; the previous token stays valid until they revoke it under
Integrations → API.The redirect carries a one-time code, not the secret, so the token never
lands in browser history or a proxy log. The script exchanges it at
POST https://login.<domain>/connect/exchange with the same state it
generated, then proves the result works with
GET https://api.<domain>/dm/api/core/token/verify/ under
Authorization: Api-Token … before writing anything. A callback whose state
does not match is answered 400 and ignored — the listener keeps waiting.
(A first version of the hosted page may redirect the values directly; the script
accepts both.)
Full contract, including the hosted half: docs/connect-flow.md.
/iblai-vibe-start — the four questions that come before any credentials/iblai-vibe-ops-init — scaffolds the project; calls this skill first/iblai-api-login — the headless credential path; calls this skill first/iblai-vibe-auth — sign-in for the app's own users, which is a different thingWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub iblai/base --plugin iblai-vibe166 skills in this plugin
/iblai-api-agent-accessManage role-based access to an ibl.ai agent via the platform API — list role policies, search users/groups, and grant/revoke editor, chat, or analytics_viewer roles for users, groups, and emails. Use when controlling who can edit, chat with, or view analytics for an agent./iblai-api-agent-auditRead an ibl.ai agent's audit log via the platform API — a who-changed-what trail filterable by action, actor email, and date range. Read-only. Use when investigating configuration changes to an agent./iblai-api-agent-chatSet up live chat with a deployed ibl.ai agent by wiring the hosted iblai-api-agent-chat MCP server into the project (.mcp.json / claude mcp add) using the .env Api-Token and a chosen agent's unique id, or by signing in from claude.ai, ChatGPT or Claude Desktop with only the URL. Use to enable runtime conversations with an agent, and to list or disconnect the apps a user has connected. The actual chatting then happens through the MCP server's tools.Other plugins' skills for the same job