/iblai-vibe:iblai-vibe-profilefrom ibl.ai vibe
Adds a user profile dropdown for the navbar and a full settings page with grouped tabs (Profile, Records, AI & data, Account) to a Next.js app.
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.
Add user profile features -- a compact avatar dropdown for your navbar and a full settings page whose sidebar groups its tabs under four headings: Profile (Basic, Social), Records (Gradebook, Education with Credentials and Skills sub-tabs, Experience with a Resume sub-tab, Purchases), AI & data (Memory, History, Usage) and Account (Privacy, Security, Advanced) — several of them feature-gated per organization (see the tab table below).

Template: the dropdown this skill creates is bundled as
assets/profile-dropdown.tsx.
Navbar: If the user wants a navbar with the profile dropdown, guide them to
/iblai-vibe-navbarfirst. That skill creates the full navbar with logo, page links, notification bell, and profile dropdown.
Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
Before running this skill, ask the user:
Are you starting a new project from scratch? vibe-starter (https://github.com/iblai/base/tree/main/skills/start/iblai-vibe-ops-init/assets/vibe-starter) already ships the profile dropdown and /profile page wired up, alongside auth, navbar, and account/notifications. Want to use that instead?
If yes, copy the bundled starter template from the installed
iblai-vibe-ops-init skill's assets/vibe-starter/ directory (it sits
alongside this skill in your skills directory; in the vibe repo it lives
under skills/start/), or fetch it from the vibe repo if those assets
are not installed -- tell the user which path you took -- then skip this
skill:
cp -a <skills-dir>/iblai-vibe-ops-init/assets/vibe-starter/. .
# or, without local assets:
git clone --depth 1 https://github.com/iblai/base.git vibe-tmp && cp -a vibe-tmp/skills/start/iblai-vibe-ops-init/assets/vibe-starter/. . && rm -rf vibe-tmp
pnpm install --ignore-scripts
Run with
--ignore-scriptsto skip package lifecycle (postinstall) scripts.
If they prefer to add the profile features to an existing app, continue below.
/iblai-vibe-auth)@iblai/mcp in .mcp.json)Before proceeding, check for a iblai.env
in the project root. Look for PLATFORM, DOMAIN, and TOKEN variables.
If the file does not exist or is missing these variables, tell the user:
"You need an iblai.env with your platform configuration. Download the
template and fill in your values:
curl -o iblai.env https://raw.githubusercontent.com/iblai/vibe/refs/heads/main/iblai.env"
Copy assets/profile-dropdown.tsx
into components/iblai/profile-dropdown.tsx.
| File | Purpose |
|---|---|
components/iblai/profile-dropdown.tsx | Avatar dropdown for the navbar: profile, the organization row (admins only), and logout |
The dropdown reads userData and tenants from localStorage. Admin status
is derived from the tenants array by matching the current organization key
against is_admin. The avatar is fetched internally by the SDK from the user
metadata, keyed on username (use user_nicename) — with a Gravatar
fallback (enableGravatarOnProfilePic) and then initials.
The dropdown shows: Profile (opens the SDK profile modal), the
organization row (admins only — see Step 4), and Logout. The
dedicated "Account" item is off (showAccountTab={false}); account settings
live on the separate /account page.
The modal the dropdown opens carries the full tab set below, Usage
included — the dropdown has no prop to turn that one off, so mount
UserProfileModal yourself with showLlmUsageTab={false} if you need to.
Step 2 creates the dropdown only. You must create the profile page
manually using the Profile component (not UserProfileModal, which renders
as a dialog).
Import Profile from @iblai/iblai-js/web-containers (the framework-agnostic
bundle, NOT the /next bundle). This renders an inline, full-page profile
editor with sidebar navigation on desktop and tabbed navigation on mobile.
// app/(app)/profile/page.tsx
"use client";
import { useEffect, useState } from "react";
import { Profile } from "@iblai/iblai-js/web-containers";
import { resolveAppTenant } from "@/lib/iblai/tenant";
export default function ProfilePage() {
const [tenantKey, setTenantKey] = useState("");
const [tenants, setTenants] = useState<any[]>([]);
const [username, setUsername] = useState("");
const [isAdmin, setIsAdmin] = useState(false);
const [ready, setReady] = useState(false);
useEffect(() => {
try {
const raw = localStorage.getItem("userData");
if (raw) {
const parsed = JSON.parse(raw);
setUsername(parsed.user_nicename ?? parsed.username ?? "");
}
} catch {}
const resolved = resolveAppTenant();
setTenantKey(resolved);
try {
const tenantsRaw = localStorage.getItem("tenants");
if (tenantsRaw) {
const parsed = JSON.parse(tenantsRaw);
setTenants(parsed);
const match = parsed.find((t: any) => t.key === resolved);
if (match) setIsAdmin(!!match.is_admin);
}
} catch {}
setReady(true);
}, []);
if (!ready || !tenantKey) {
return (
<div className="flex flex-1 items-center justify-center">
<p className="text-sm text-gray-400">Loading profile...</p>
</div>
);
}
return (
<div className="mx-auto w-full flex-1 overflow-auto px-4 py-8 md:w-[75vw] md:px-0">
<div className="rounded-lg border border-[var(--border-color)] bg-white overflow-hidden">
<Profile
tenant={tenantKey}
tenants={tenants}
username={username}
isAdmin={isAdmin}
onClose={() => {}}
customization={{
showPlatformName: true,
useGravatarPicFallback: true,
}}
targetTab="basic"
/>
</div>
</div>
);
}
bg-white rounded-lg border container so it renders as a card
against the gray page background (--sidebar-bg: #fafbfc).Profile vs UserProfileModal: Profile renders inline (full page).
UserProfileModal renders as a dialog overlay. Use Profile for a
dedicated /profile route.h-full), and
the sidebar and the content panel only scroll independently when that
parent is bounded — h-[80vh] or min-h-[640px] on the card is enough.@iblai/iblai-js/web-containers (NOT /next).Switching organizations happens in the sign-in app, not in the dropdown. The dropdown has two pieces:
showTenantSwitcher) — the name of the
organization the user is in. The dropdown looks tenantKey up in
userTenants (the tenants list from localStorage) and shows its
platform_name, or the key. It hides itself when userTenants holds no
organization but main, so pass both. For an admin of that organization
outside main (its is_admin entry, or an RBAC grant to manage its users,
groups, roles, policies or invites), clicking the row opens the profile
modal on the organization's settings.
The template shows it to admins only (showTenantSwitcher={isAdmin}),
as the reference app does.showOrganizationsLink, on by default) — opens the
sign-in app's organization chooser in a new tab; picking one there signs
the user in to it and returns them to this app. onOrganizationsClick
overrides where it goes. The template turns it off: a single-org app
pins its organization, so moving the session elsewhere makes no sense.
Turn it on for a multi-org app (/iblai-vibe-auth, "Going multi-org").There is no switch callback any more: UserProfileDropdown dropped
onTenantChange when switching moved into the sign-in app.
The
mainorganization displays as "Community". The row dropsmainfromuserTenantsbefore the lookup, sotenantKey="main"falls back to the SDK's built-in name. Not a bug; other organizations show their own name.
get_component_info("UserProfileDropdown")
get_component_info("Profile")
get_component_info("MediaBox")
get_component_info("ResumeTab")
Both Profile and Account render the same shell, so what you learn here
holds for /iblai-vibe-account too:
lg and up): a 280px sidebar — an identity card (the user's
avatar, name and email, or the organization's logo and key, plus a role
chip) over grouped navigation — beside a content column with a fixed
header (the active tab's title and description), a scrolling panel, and a
footer that appears only on the tabs that submit a form (Basic and
Social).Home/End jump to the first and last.For end-to-end selectors: Profile's items are ARIA tabs
(role="tab", aria-selected, aria-controls="<targetTab>-tabpanel",
roving tabIndex) inside nav[aria-label="Profile tabs"] — the small-screen
strip is a second tablist labelled "Profile tabs mobile", so scope your
queries to one of them. Account's items are plain buttons marked
aria-current="page" inside nav[aria-label="Organization settings"] — see
the account skill.
The sidebar tabs the Profile component renders, with their sidebar group,
the targetTab id and when each appears:
| Tab | Group | targetTab id | Shown when | Notes |
|---|---|---|---|---|
| Basic | Profile | basic | Always | Full name, email, title, about, language + the Features switches |
| Social | Profile | social | Always | Social links |
| Gradebook | Records | gradebook | customization.showGradebookTab | Credentials + skills gradebook |
| Education | Records | education | Always | Sub-tabs: Education / Credentials / Skills |
| Experience | Records | experience | Always | Sub-tabs: Experience / Resume |
| Purchases | Records | purchases | Organization has monetization enabled | Purchase history |
| Memory | AI & data | memory | enableMemoryTab prop AND organization memsearch on | The user's own global memories + capture/personalization toggles (the admin view of the same data is /iblai-vibe-memory) |
| History | AI & data | chatHistory | Own profile, or a viewer who may read this user's chats (admin / watcher) | Conversations + Exports — documented in /iblai-vibe-history |
| Usage | AI & data | llmUsage | showLlmUsageTab (default on) and the viewer is not a pure watcher | The viewed user's AI spend, tokens and requests — see below |
| Privacy | Account | privacy | Organization allows user chat-privacy control | Default Incognito Setting — Normal / Anonymized / Incognito for every conversation; the whole feature is /iblai-vibe-incognito |
| Security | Account | security | Own profile only | Password reset, account deletion |
| Advanced | Account | advanced | Tauri desktop with localLLMProps.isAvailable | Local LLM models — see /iblai-vibe-local-llm |
Tab shots: Basic · Social · Gradebook · Education · Experience · Resume · Purchases · Memory · History · Usage · Privacy · Security

What one person's AI has cost, in the profile itself — no analytics page, no admin rights needed to look at your own:
| Piece | What it shows |
|---|---|
| Range control | Today / 7 days / 30 days / 90 days / All time, plus a refresh button |
| KPI tiles | Spend, Tokens (with tokens per request), Requests, Avg cost per request |
| Spend over time | Column chart, bucketed by day / week / month depending on the range, gap-filled so empty days still read as zero; arrow keys read each bar out loud |
| By model / By service | Share of spend per model and per service, long tails folded into "Other" |
| Recent activity | The latest traces, newest first, 10 per page; expand a row to see its steps (model, input/output/total tokens, cost, latency) |
It always follows the profile on screen. The tab sends the viewed user's
username on every request, so opening someone else's profile shows their
usage, not the organization's total and not yours. The header says whose it
is ("Usage for ashlynn12" when previewing, "Only your own activity is
shown" on your own profile).
Who may see it:
/watchedgroups/#list permission without being an
organization admin) never get the tab at all — cost reporting excludes
them, the same way the analytics tabs do.showLlmUsageTab={false}.Empty periods get an empty state with "Show last 90 days" / "Show all time" shortcuts; an unreachable tracing backend gets "temporarily unavailable" with a retry, an expired session gets "Sign in again".
GET {dm_url}/api/analytics/llm-usage/ with username={user} — metrics
for the tiles, chart and breakdowns, traces for recent activity,
observations for the steps under a row. The endpoints, the per-user hooks
that wrap them (useUserLlmUsageSummary and friends) and the error contract
are in references/profile-api.md;
the REST twin is
/iblai-api-analytics
and the organization-wide view of the same data is
/iblai-vibe-analytics.
Everything behind the tabs — the service layer, the RTK Query hooks, the career/resume backend contract, MediaBox, and the standalone ResumeTab / EducationTab / ExperienceTab — is in references/profile-api.md. Per-user custom data is /iblai-vibe-user-metadata; memory is /iblai-vibe-memory-guide; REST: iblai-api-profile.
<UserProfileDropdown> PropsThe generated dropdown component. Import from @iblai/iblai-js/web-containers/next.
| Prop | Type | Description |
|---|---|---|
email | string | Required. User email (from userData.user_email); used for the Gravatar avatar fallback |
username | string | Username — use user_nicename (the avatar metadata fetch keys on it) |
mainPlatformKey | string | Required. Main/community org key (config.mainTenantKey()) |
tenantKey | string | Active org key — the organization row looks it up in userTenants |
currentTenant | Tenant? | Accepted but not read by the dropdown; the organization row comes from tenantKey and userTenants |
userTenants | Tenant[] | The full tenants list from localStorage — names the organization row, which hides when it holds nothing but main |
userIsAdmin | boolean | Shows admin badge + gates the organization row |
userIsStudent | boolean? | true when the viewer sees the member view — !isAdmin, or !adminMode when you have a User/Admin switch. Labels the dropdown's switch row "User" or "Admin" |
enableGravatarOnProfilePic | boolean? | Gravatar fallback when the user has no uploaded image (default true) |
showProfileTab | boolean | Show profile link |
showAccountTab | boolean | Show the dedicated "Account" item (keep false — account lives on /account) |
showTenantSwitcher | boolean | Show the current-organization row (needs tenantKey and userTenants); gate on userIsAdmin |
showLogoutButton | boolean | Show logout button |
showHelpLink | boolean | Show the Help item (opens the help URL in a new tab). Renders only once metadataLoaded is true, and not when metadata.show_help === false or no URL resolves |
helpCenterUrl | string? | Fallback help URL, used when the org metadata has neither support_url nor help_center_url |
onHelpClick | (url: string) => void | Called with the resolved URL when Help is clicked |
showLearnerModeSwitch | boolean? | Show the User/Admin switch row. Also needs userIsAdmin and LearnerModeSwitchComponent; never shown on the main org. The row is xl:hidden — put the inline switch in the navbar from xl up |
LearnerModeSwitchComponent | ComponentType? | The control the row renders — a bare <Switch> bound to useAdminMode() (/iblai-vibe-admin). Not AdminModeSwitch: the row already prints the "User"/"Admin" label |
currentSPA | string? | Current app id (e.g. "mentor") — used for conditional SDK rendering |
currentPlatformBaseDomain | string? | Base domain for custom-domain settings (config.platformBaseDomain()) |
authURL | string | Auth service URL |
onLogout | () => void | Logout callback |
showOrganizationsLink | boolean? | Show the Organizations item, which opens the sign-in app's organization chooser (default true; false in a single-org app) |
onOrganizationsClick | () => void | Overrides where Organizations goes (default: the chooser at authURL) |
onTenantUpdate | (tenant: Tenant) => void | Called when organization data updates -- must set app_tenant in localStorage |
className | string? | Additional CSS class |
dropdownClassName | string? | CSS class for dropdown panel |
avatarSize | number? | Avatar size in pixels |
metadata | { support_url?: string; help_center_url?: string; show_help?: boolean } | Org metadata (useTenantMetadata({ org }).metadata). Help URL precedence: support_url → help_center_url → helpCenterUrl |
metadataLoaded | boolean? | Whether metadata has finished loading (useTenantMetadata().metadataLoaded); the Help item waits for it |
enableMemoryTab | boolean? | Show AI memory management tab |
enableCatalogInvite | boolean? | Enable catalog invite feature |
enableRbac | boolean? | Enable RBAC permission checks |
isModalOpen | boolean? | Control profile modal open state externally |
onModalOpenChange | (open: boolean) => void | Callback when modal open state changes |
defaultActiveTab | string? | Default tab when profile modal opens — any id from the Profile tabs table, e.g. llmUsage |
onAccountDeleted | () => void | Callback after account deletion |
<Profile> Props (Full-Page Profile)Import from @iblai/iblai-js/web-containers.
| Prop | Type | Description |
|---|---|---|
tenant | string | Org key |
username | string | Username |
isAdmin | boolean | Admin flag |
onClose | () => void | Close callback |
customization | object | See below |
targetTab | string | Initial tab id — see the Profile tabs table (basic, social, gradebook, education, experience, purchases, memory, chatHistory, llmUsage, privacy, security, advanced) |
enableMemoryTab | boolean? | Show the Memory tab (still requires organization memsearch to be on) |
showLlmUsageTab | boolean? | Show the Usage tab — defaults to true; pure watchers never see it either way |
localLLMProps | object? | Props for local LLM tab (Tauri desktop only) |
currentSPA | string? | Current app id (e.g. "mentor") — used for conditional SDK rendering |
onAccountDeleted | () => void | Callback after account deletion |
{
showMentorAIDisplayCheckbox?: boolean; // Show the "Display Agent Sidebar" switch
showUsernameField?: boolean; // Show username field (read-only)
showPlatformName?: boolean; // Show platform/tenant name badge
useGravatarPicFallback?: boolean; // Use Gravatar when no profile pic
showGradebookTab?: boolean; // Show the Gradebook tab
showLeaderboardDisplayCheckbox?: boolean; // @deprecated — ignored, see below
}
The Basic tab's switches sit in a section called Features. It holds one
switch, Display Agent Sidebar (showMentorAIDisplayCheckbox), with an
info icon explaining what it turns on: "Keeps the AI agent panel beside
whatever you are working on, so you can ask questions without leaving the
page." The old Display Leaderboard switch was removed —
showLeaderboardDisplayCheckbox still type-checks so existing callers keep
compiling, but it renders nothing.
<UserProfileModal> Props (Profile + Account Modal)For a profile editing modal (used by the MentorAI reference app), import
UserProfileModal from @iblai/iblai-js/web-containers/next. This is a
dialog that combines profile editing and account settings in one overlay.
targetTab alone decides which half renders: the Profile ids
(basic, social, education, experience, resume, memory,
chatHistory, llmUsage, security, advanced) open the profile, the
Account ids (organization, management, api, secrets, virtualMachine, billing,
monetization, datasets; the retired integrations opens Secrets) open organization settings.
| Prop | Type | Description |
|---|---|---|
isOpen | boolean | Whether the modal is visible |
onClose | () => void | Close callback |
params | { tenantKey: string; mentorId?: string; isAdmin?: boolean } | Organization key, optional agent ID and admin flag |
authURL | string | Auth service URL (from config.authUrl()) |
| Prop | Type | Description |
|---|---|---|
tenants | Tenant[] | The user's full tenants list from localStorage |
targetTab | string | Initial tab — any id from the two lists above (default basic) |
showLlmUsageTab | boolean | Show the profile's Usage tab (default true) |
enableMemoryTab | boolean | Show the profile's Memory tab (needs organization memsearch) |
showGradebookTab | boolean | Show the profile's Gradebook tab |
showBenchmarks | boolean | Show the Account side's Benchmarks tab (default false; each app opts in) |
showMentorAIDisplayCheckbox | boolean | Show the Basic tab's Display Agent Sidebar switch |
showPlatformName | boolean | Show organization name badge |
useGravatarPicFallback | boolean | Use Gravatar when no profile pic |
currentSPA | string | Current app identifier (e.g., "agent") |
currentPlatformBaseDomain | string | Base domain for custom domain settings |
currentPlan | string | Current plan name, shown by the Billing tab (which appears when the organization's paywall is on — there is no billingURL prop) |
onTenantUpdate | (tenant: Tenant) => void | Called when organization is updated |
onBillingTabRequest | () => Promise<void> | void | Called when billing tab is opened -- fetch billing data |
onUpgradeClick | () => void | Called when upgrade button is clicked |
onAccountDeleted | () => void | Called after account deletion |
helpUrl | string | Help-center address for the API page's Help link (UserProfileDropdown fills it from its Help item) |
Run /iblai-vibe-ops-test before telling the user the work is ready, and give
every page, control and state this skill added its own checkpoint — one Playwright
test titled <ID> · … in e2e/journeys/, listed in e2e/coverage.json;
pnpm e2e:coverage must pass:
pnpm build -- must pass with zero errorspnpm test -- vitest must pass/profile in the browser as /iblai-vibe-ops-test says: open it,
use every control this skill added, read the console, check the phone width.$0.00 across every range means the account genuinely has no traced AI
calls, while an error card means the request failed (check the browser
console for the status).mentorReducer and mentorMiddlewareinitializeDataLayer(): 5 args (v1.2+)@reduxjs/toolkit: Deduplicated via webpack aliases in next.config.tstenants array in localStoragebg-white and
bg-gray-50 internally. Do NOT override these. Instead, wrap the component
in a white container so it renders correctly against the gray page background./iblai-vibe-account, /iblai-vibe-billing).
The Profile page's own Purchases tab shows the user's purchase
history and only appears when the organization has monetization enabled.Profile takes targetTab at its word and renders an empty
panel for a hidden tab (Account is the one that falls back to the first
tab you may see), so check the gate before deep-linking.Profile for a username that is not the
signed-in user) drops Security and turns the copy neutral — "Spend,
tokens and requests across conversations" instead of "your". History and
Usage stay, gated on what the viewer may read.assets/profile-dropdown.tsx (opens in a new tab)assets/profile-page.png (opens in a new tab)profile-page.png (opens in a new tab)references/profile-api.md (opens in a new tab)test.json (opens in a new tab)user-profile/user-profile-basic.png (opens in a new tab)user-profile/user-profile-education.png (opens in a new tab)user-profile/user-profile-experience.png (opens in a new tab)user-profile/user-profile-gradebook.png (opens in a new tab)user-profile/user-profile-history.png (opens in a new tab)user-profile/user-profile-memory.png (opens in a new tab)user-profile/user-profile-privacy.png (opens in a new tab)user-profile/user-profile-purchases.png (opens in a new tab)user-profile/user-profile-resume.png (opens in a new tab)user-profile/user-profile-security.png (opens in a new tab)user-profile/user-profile-social.png (opens in a new tab)user-profile/user-profile-usage.png (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