/iblai-vibe:iblai-vibe-adminfrom ibl.ai vibe
Explains the User/Admin view switch, isTenantAdmin() rule, and admin area (users, invitations, roles, analytics, billing, memory, organization) in an ibl.ai app. Use when discussing admin dashboards, user management, permissions, or hiding pages from regular members.
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.
First time here? If
iblai.envhas noARCHITECTURE=, run/iblai-vibe-startfirst (four questions; two minutes) — it decides single-org / multi-org / headless and who signs in, and every skill reads the answer.
Every app on the platform has two audiences: members (they sign in and use the app) and org admins (they manage users, agents, spend, memory, and branding). This skill is the pattern vibe-starter uses for both, and the map of every admin surface the SDK already ships.

Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
tenants list the sign-in stored:
isTenantAdmin() = the is_admin flag on the entry whose key is the
org the app is pinned to. Not the SDK's useIsAdmin(), which answers
for the SDK's current organization — they can differ.adminMode (admin and switched on);
anything that must stay admin-only regardless of the view gates on
isTenantAdmin().Until your app has an admin area, os.ibl.ai is your admin console: Admin mode → settings → Management / Integrations / Billing / Memory / Organization.
| Piece | File | Does |
|---|---|---|
isTenantAdmin(), readTenants() | lib/iblai/tenant.ts | the rule above |
AdminModeProvider, useAdminMode() | lib/iblai/admin-mode.tsx | view state: default Admin, resets on reload |
AdminModeSwitch | components/navbar/admin-mode-switch.tsx | the switch (hidden for members) |
AccountPanel | components/admin/account-panel.tsx | one SDK Account surface opened on a tab, full-width |
/admin/users | app/(app)/admin/users/page.tsx | Users · Groups · Roles · Policies · Teams · Alerts · Applications + InviteUserDialog / InvitedUsersDialog |
/admin/analytics/*, /admin/billing, /admin/memory, /admin/organization | app/(app)/admin/… | /iblai-vibe-analytics, -billing, -memory, -org-metadata surfaces |
| route gate | app/(app)/layout.tsx | admin links only when adminMode; /admin/* redirects home otherwise |
requireAdmin(req) | lib/iblai/platform.ts | server-side proof for admin routes (/iblai-vibe-api) |
Copy the assets: admin-mode.tsx →
lib/iblai/admin-mode.tsx, admin-mode-switch.tsx →
components/navbar/admin-mode-switch.tsx, account-panel.tsx →
components/admin/account-panel.tsx, admin-users-page.tsx →
app/(app)/admin/users/page.tsx, tenant.test.ts →
__tests__/tenant.test.ts. Add readTenants / isTenantAdmin to
lib/iblai/tenant.ts (copy them from vibe-starter). Needs shadcn switch.
In the authenticated layout: read the session once, wrap the tree in
AdminModeProvider, split nav links into member and admin arrays, render the
admin ones only when isAdmin && adminMode, and redirect /admin/* home
otherwise. vibe-starter's app/(app)/layout.tsx is the reference — copy it.
It and the Step 1 switch read their labels with next-intl's
useTranslations("Nav") (catalogs in messages/*.json, config in i18n/), so
an app without next-intl either adds next-intl 4.13.0 with vibe-starter's
i18n/ and messages/ folders and its wiring in next.config.ts (the plugin)
and app/layout.tsx (NextIntlClientProvider), or replaces the t('…') calls
with its own strings.
const liveAdmin = isAdmin && adminMode;
const t = useTranslations("Nav");
const links: NavLink[] = useMemo(() => {
const source = liveAdmin ? [...MEMBER_LINKS, ...ADMIN_LINKS] : MEMBER_LINKS;
return source.map(({ key, ...rest }) => ({ ...rest, name: t(key) }));
}, [liveAdmin, t]);
useEffect(() => {
if (pathname.startsWith("/admin") && !liveAdmin) router.replace("/");
}, [pathname, liveAdmin, router]);
Put <AdminModeSwitch /> in the navbar's right cluster (and in the profile
menu on narrow screens if you have one).
AccountPanel tab="…" mounts the SDK Account on one of: organization,
management, invites, onboarding, apps, api, secrets,
virtualMachine (the Network page), advanced, billing, memory,
monetization. Every admin page also reaches the others through the
panel's own menu, where Invites, Onboarding and Apps sit under Workspace.
The SDK shows every tab but management, invites, billing and
monetization to admins only, billing only while the org's paywall is
on, and monetization only while the org has monetization turned on;
without enableRbac, which vibe-starter does not pass, invites and
monetization are admin-only too. Each is documented by its own skill:
| Admin need | Tab / component | Skill |
|---|---|---|
| Users: role Admin/User, policies, activate/deactivate, search | management → Users | this skill; REST management |
Invite (single, CSV: email, platform_key, company_name, first_name, last_name, user_group, user_group_owner_email; only email is required) | InviteUserDialog, InvitedUsersDialog, or the invites tab | /iblai-vibe-invite |
| The agents new users are onboarded by, and the link to each | onboarding | /iblai-vibe-account |
| Deployed apps: state, address, domains, Delete | apps | /iblai-vibe-account, /iblai-vibe-ops-deploy |
| Roles and policies (custom grants) | management → Roles / Policies (RolesTab, PoliciesTab) | /iblai-vibe-rbac |
| Groups, teams, alerts | management | /iblai-vibe-account |
| Platform API Tokens for your own software | api | /iblai-vibe-account; REST /iblai-api-token |
| Keys from other services: LLMs, Services (Stripe, Google Drive, …), Environment Variables | secrets | /iblai-vibe-account, /iblai-vibe-virtual-machine, /iblai-vibe-credential |
| The addresses agents' virtual machines may reach | virtualMachine | /iblai-vibe-virtual-machine |
| Default agent, feature toggles, help URL | advanced | /iblai-vibe-account |
| Plan, credits, spend caps | billing | /iblai-vibe-billing, /iblai-vibe-pricing |
| Everyone's memories | memory | /iblai-vibe-memory |
| Name, logos, support email + your app's org settings | organization + OrgSettingsForm | /iblai-vibe-org-metadata |
| Sell items | monetization | /iblai-vibe-monetization |
Org-wide analytics, per-agent with ?agent= | AnalyticsLayout + tabs | /iblai-vibe-analytics |
| Directory sync | — (REST only) | scim |
Management (the SDK's Admin) no longer has an Onboarding sub-tab; it is
the onboarding tab of Account, shown to admins only. Admin still
accepts onboardingBasePath so older code compiles, but the prop is
deprecated and ignored: pass it to Account or PlatformAccountSheet.
For an admin, the Invite buttons inside Management (Users, Teams) now
open the Invites tab instead of calling onInviteClick. On vibe-starter's
/admin/users they switch the panel to that tab; the page's own Invite
user button still opens InviteUserDialog.
For sharing one agent with editors/chat users, use the agent's Access tab
(/iblai-vibe-agent-access), not org roles.
Anything an admin does for someone else (write another user's metadata,
create an agent, send a notification) is a server route that first proves
the caller is an admin — requireAdmin(req) from /iblai-vibe-api — then
uses the org's key. Never trust a client-side isAdmin for a write.
pnpm typecheck && pnpm test (__tests__/tenant.test.ts)./admin/users sends you home. Sign in as a member:
no switch at all./admin/users in the browser as /iblai-vibe-ops-test says: the
Management surface and the Invite button are there; open and cancel the
invite dialog./iblai-vibe-rbac — roles, policies, action strings, checkRbacPermission/iblai-vibe-invite — the invitation dialogs/iblai-vibe-account — the SDK Account page as one modal/iblai-vibe-api — admin routesassets/account-panel.tsx (opens in a new tab)assets/admin-mode-switch.tsx (opens in a new tab)assets/admin-mode.tsx (opens in a new tab)assets/admin-users-page.tsx (opens in a new tab)assets/tenant.test.ts (opens in a new tab)iblai-vibe-admin-1-user-mode.png (opens in a new tab)iblai-vibe-admin-2-admin-mode.png (opens in a new tab)iblai-vibe-admin-3-users.png (opens in a new tab)test.json (opens in a new tab)What 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