vibe
Developer toolkit for vibe coding AI apps on the ibl.ai platform. Scaffold a production-ready Next.js app with iblai-app-cli and the @iblai/iblai-js SDK: SSO auth, AI chat, profiles, notifications, and analytics wired up out of the box. Pre-built components, Claude Code skills, and a hosted backend at iblai.app. Deploy in minutes.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/iblai/vibe with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/iblai/vibe'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/iblai--vibe)HTML
<a href="/listings/iblai--vibe"><img src="/api/listings/iblai--vibe/badge.svg" alt="findsafeskills safety rating" /></a>Install
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 25 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- {
- "name": "iblai",
- "owner": {
- "name": "ibl.ai",
- "url": "https://ibl.ai"
- },
- "metadata": {
- "description": "Skills for building on and operating the ibl.ai platform."
- },
- "plugins": [
- {
- "name": "iblai-vibe",
- "source": "./",
- "description": "Build apps on ibl.ai and operate the platform headlessly \u2014 136 skills (iblai-vibe-* with visual components, iblai-api-* headless), the /iblai-vibe-start intake, and the @iblai/mcp SDK-docs server.",
- "category": "development",
- "keywords": [
- "ibl.ai",
- "agents",
- "sso",
- "nextjs",
- "rest-api"
- ]
- }
- ]
- }
README.md · README · 330 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- <!-- AI agents: when a user points you at this repository or has these skills installed, read AGENTS.md, then begin with the four questions in skills/start/iblai-vibe-start/SKILL.md before touching any file. -->
- <div align="center">
- <a href="https://ibl.ai"><img src="https://ibl.ai/images/iblai-logo.png" alt="ibl.ai" width="300"></a>
- # ibl.ai/base
- Ship AI-powered apps fast — and run the platform behind them. Backend included.
- [](https://github.com/iblai/vibe/releases/latest)
- [](docs/skill-kinds.md)
- [](https://nextjs.org)
- [](https://www.typescriptlang.org)
- [](https://tailwindcss.com)
- [](https://claude.ai/code)
- [](https://openai.com/codex)
- [](https://cursor.com)
- [](skills/ship/iblai-vibe-ops-build/SKILL.md)
- [](#license)
- </div>
- > **Note:** This toolkit runs against the hosted `iblai.app` environment. If you'd like a license to the full platform codebase to run locally or self-host, reach out to our team at [ibl.ai/contact](https://ibl.ai/contact).
- ---
- Build the app you actually need on [ibl.ai](https://ibl.ai) — sign-in, an AI
- agent to talk to, users and admins, custom data, memory, analytics, billing —
- as a website and as macOS, Windows, iOS, and Android apps. Or run the platform
- with no UI at all. One install; your coding agent does the rest.
- ## Three steps
- **1. Install the skills** in the agent you already use.
- ```bash
- npx skills add iblai/base --all # Claude Code, OpenAI Codex, Cursor, OpenCode, Copilot …
- ```
- Claude Code users can install the plugin instead (same skills, plus the SDK-docs
- MCP server, updated with `/plugin update`): `/plugin marketplace add iblai/vibe`
- then `/plugin install iblai-vibe@iblai`.
- **2. Say hello.**
- ```text
- /iblai-vibe-connect
- /iblai-vibe-auth
- /iblai-vibe-agent-chat
- /iblai-vibe-project
- /iblai-vibe-profile
- /iblai-vibe-account
- /iblai-vibe-analytics
- /iblai-vibe-notification
- /iblai-vibe-invite
- /iblai-vibe-workflow
- /iblai-vibe-local-llm
- /iblai-vibe-course-access
- /iblai-vibe-course-create
- /iblai-vibe-onboard
- /iblai-build
- /iblai-test
- /iblai-vibe-ops-upgrade
- /iblai-vibe-rbac
- /iblai-vibe-agent-search
- /iblai-vibe-agent-setting
- /iblai-vibe-agent-access
- /iblai-vibe-agent-api
- /iblai-vibe-agent-dataset
- /iblai-vibe-agent-disclaimer
- /iblai-vibe-agent-embed
- /iblai-vibe-agent-history
- /iblai-vibe-agent-llm
- /iblai-vibe-agent-memory
- /iblai-vibe-agent-prompt
- /iblai-vibe-agent-safety
- /iblai-vibe-agent-task
- /iblai-vibe-agent-tool
- ```
- What each skill does:
- - `/iblai-vibe-connect` -- connects the project to an ibl.ai organization via a one-click browser flow, writing the org key + a minted API token into the env files (the token never passes through the chat). Runs first, before building.
- - `/iblai-vibe-auth` -- adds authentication and configures the app for ibl.ai login.
- - `/iblai-vibe-agent-chat` -- adds the full in-process agent chat surface.
- - `/iblai-vibe-project` -- adds the in-process Projects surface (project landing page with chat input, files, instructions, assigned agents).
- - `/iblai-vibe-profile` -- adds profile UI and profile settings flows.
- - `/iblai-vibe-account` -- adds account and organization settings.
- - `/iblai-vibe-analytics` -- adds analytics dashboards and reporting views.
- - `/iblai-vibe-notification` -- adds notifications UI and notification center flows.
- - `/iblai-vibe-invite` -- adds user invitation dialogs for tenant admin.
- - `/iblai-vibe-workflow` -- adds agent workflows: the organization's list (opened from an agent) and the visual editor (`WorkflowsList`, `WorkflowEditor`).
- - `/iblai-vibe-local-llm` -- defines the contract for adding on-device LLM inference (Ollama / Foundry) to a Tauri desktop build: Tauri command names, event names, and the React hook shape the SDK consumes via `localLLMProps`.
- - `/iblai-vibe-course-access` -- adds edX course-content pages with outline sidebar, tab strip, iframe, and access control.
- - `/iblai-vibe-course-create` -- drives the ibl.ai Course Creation API to programmatically generate, edit, and publish edX courses.
- - `/iblai-vibe-onboard` -- designs and builds a high-converting questionnaire-style onboarding flow.
- - `/iblai-vibe-ops-build` -- builds and runs the app on desktop and mobile (macOS, Windows x64 + ARM64 / Surface, Linux, iOS, Android).
- - `/iblai-vibe-ops-test` -- builds, tests and touch tests the app in a real browser before it is presented to the user.
- - `/iblai-vibe-ops-upgrade` -- upgrades the `@iblai/iblai-js` SDK and vibe skills to the latest versions.
- - `/iblai-vibe-scaffold` -- scaffolds a new app or adds features; holds the base + agent project templates and documents the assembly steps.
- - `/iblai-vibe-iconography` -- generates every app-icon size (Tauri desktop, iOS, Windows MSIX, macOS) from a single source image.
- - `/iblai-vibe-windows-msix` -- builds and distributes a Tauri app as a Windows MSIX package (sideloading or Microsoft Store).
- - `/iblai-vibe-deslop` -- audits and hardens an existing codebase for production readiness (two-phase audit then safety-tiered fixes).
- - `/iblai-vibe-rbac` -- reference for the default RBAC roles (student, tenant admin, mentor editor, analytics viewer, etc.), the platform's action-definitions endpoint, and the SDK components (`<Admin>`, `<RolesTab>`, `<PoliciesTab>`) that render the Roles + Policies management UI.
- - `/iblai-vibe-agent-search` -- adds the agent search/browse page (starred, featured, custom, and default agents).
- - `/iblai-vibe-agent-setting` -- adds the agent Settings tab (Basic, Discovery, Capabilities and Welcome Screen sub-tabs, plus copy and delete) built on `AgentSettingsProvider`.
- - `/iblai-vibe-agent-access` -- adds the agent Access tab (role-based access control for editor and chat roles).
- - `/iblai-vibe-agent-api` -- adds the agent API tab (API key management).
- - `/iblai-vibe-agent-dataset` -- adds the agent Datasets tab (searchable dataset table with upload).
- - `/iblai-vibe-agent-disclaimer` -- adds the agent Disclaimers tab (user agreement and advisory).
- - `/iblai-vibe-agent-embed` -- adds the agent Embed tab (embed code, custom styling, shareable links).
- - `/iblai-vibe-agent-history` -- adds the agent History tab (conversation history with filters and export).
- - `/iblai-vibe-agent-llm` -- adds the agent LLM tab (model provider selection).
- - `/iblai-vibe-agent-memory` -- adds the agent Memory tab (enable/disable memory and manage memories).
- - `/iblai-vibe-agent-prompt` -- adds the agent Prompts tab (system prompts and suggested prompts).
- - `/iblai-vibe-agent-safety` -- adds the agent Safety tab (moderation prompts and flagged content).
- - `/iblai-vibe-agent-task` -- adds the agent Tasks tab (schedule automated periodic agent tasks with run logs).
- - `/iblai-vibe-agent-tool` -- adds the agent Tools tab (enable/disable agent tools).
- ### Security Skills
- 8 authorized-use security skills covering reconnaissance, source-code
- audits (OWASP Top 10), OSINT, disk forensics, incident triage, cloud
- configuration auditing, dependency vulnerabilities, and prompt-injection
- testing.
- /iblai-vibe-start
- ```
- Four questions — new project or existing code · one organization, many, or none ·
- who signs in · what it's about (users · memories · agents · organizations). Then
- it connects your ibl.ai organization (one click in the browser, or two pasted
- values — the token never enters the chat) and builds. Thirty seconds after you
- sign in you are chatting with your own agent, with users, an admin area, custom
- user and organization settings, memory, analytics, and billing already wired.
- **3. Ship.** `/iblai-vibe-ops-deploy` gives you a URL. `/iblai-vibe-ops-build`
- gives you macOS, Windows, iOS, and Android.
- New to ibl.ai? [ibl.ai/join](https://ibl.ai/join) creates your account and your
- organization — free to start. Want the details of every step?
- [Getting started →](docs/getting-started.md)
- ## What you get
- vibe-starter, the app `/iblai-vibe-start` sets up for the common case:
- - **Sign-in** with ibl.ai SSO, pinned to your organization
- - **Home is a chat** with your agent; `/agents` to browse; `/setup` to pick or create one
- - **Users and admins** — profile, a User/Admin switch, an admin area (people, invites, roles, analytics, billing, memory, organization)
- - **Custom data** per user and per organization, stored on the platform — no database of your own
- - **Memory, analytics, notifications, billing** — the platform's own, already on the page
- - **Tests** (Vitest + Playwright) and a server helper for anything the components don't cover
- Every piece is a skill you can also add to an existing app.
- ## Six things almost every app touches
- Whatever you build, you will read or write these. Each has a component skill
- and a headless twin that does the same thing over REST:
- | | With a screen | Headless |
- |---|---|---|
- | **Custom data per user** — preferences, flags, onboarding, app state | `/iblai-vibe-user-metadata` | `/iblai-api-profile-metadata` |
- | **The user's profile** — name, bio, image, résumé | `/iblai-vibe-profile` | `/iblai-api-profile` |
- | **Memory** — user-global, per user × agent, agent knowledge | `/iblai-vibe-memory-guide` → `/iblai-vibe-memory`, `/iblai-vibe-agent-memory` | `/iblai-api-agent-memory` |
- | **Custom data per organization** — branding, toggles, defaults | `/iblai-vibe-org-metadata` | `/iblai-api-org` |
- | **Agent configuration** — create; identity, visibility, capabilities | `/iblai-vibe-agent-create` → `/iblai-vibe-agent-setting` | `/iblai-api-agent-create`, `/iblai-api-agent-setting` |
- | **Analytics** — usage, transcripts, costs, audit, reports | `/iblai-vibe-analytics` | `/iblai-api-analytics` |
- Not sure whether you want the per-user, per-agent, or per-organization one?
- [Which scope stores what →](docs/catalogue.md#core)
- ## The skills, by folder
- Two families in one install: **🖥️ `iblai-vibe-*`** mounts a visual component in
- your app; **🔌 `iblai-api-*`** does the same thing headlessly over REST — for a
- script, a CI job, or your own backend. [How they differ →](docs/skill-kinds.md)
- | Folder | What it covers | Skills |
- |---|---|---|
- | [`start/`](skills/start) | The first conversation, connecting your organization, sign-in, the starter | 11 |
- | [`agents/`](skills/agents) | Chat, browse, create, and configure agents — every settings tab | 61 |
- | [`users/`](skills/users) | Profiles, custom user data, memories, roles and admins, invitations, the official apps' first-run journeys | 19 |
- | [`organizations/`](skills/organizations) | Organization settings and metadata, branding, integrations | 10 |
- | [`billing/`](skills/billing) | How you are charged, credits, spend caps, choosing a pricing rail | 5 |
- | [`monetization/`](skills/monetization) | Charge your users: app paywall, item sales, subscriptions, revenue | 7 |
- | [`analytics/`](skills/analytics) | Usage, users, topics, transcripts, costs, reports | 2 |
- | [`content/`](skills/content) | Courses, catalog, credentials, admissions, Open edX Studio, avatar video | 26 |
- | [`ship/`](skills/ship) | Test, deploy, hosting, native builds, app stores | 12 |
- | [`security/`](skills/security) | Authorized-use security work | 8 |
- The full list with one line per skill: [docs/catalogue.md](docs/catalogue.md).
- ## Keep it current
- This repo changes often. Installed skills are a copy — refresh them with the
- install command above, or `/iblai-vibe-ops-upgrade` in Claude Code (your agent
- will suggest it when the copy is more than two weeks old).
- [Details →](docs/keep-current.md)
- ## Learn more
- - [Getting started](docs/getting-started.md) — the journey in detail, and what to do when you already have an app
- - [How sign-in and organizations work](docs/auth-model.md) — one organization, many, or none
- - [Users, agents, organizations](docs/domain-model.md) — the data every app is built on
- - [How money works](skills/billing/iblai-vibe-pricing/SKILL.md) · [Ship anywhere](docs/ship.md) · [The two MCP servers](docs/mcp-servers.md)
- - [Contributing a skill](CONTRIBUTING.md) — including where it goes and how to catalogue it
- Vibe is designed to be built with AI. The [@iblai/mcp](https://www.npmjs.com/package/@iblai/mcp) server gives Claude Code deep knowledge of the ibl.ai platform, and the bundled skills guide you through every common task.
- ### MCP Server
- Add this to your `.mcp.json` at the project root:
- ```json
- {
- "mcpServers": {
- "iblai": {
- "command": "npx",
- "args": ["-y", "@iblai/mcp"]
- }
- }
- }
- ```
- This gives your AI assistant access to:
- ```
- get_component_info("ChatWidget") # Props, usage, examples for any component
- get_hook_info("useAdvancedChat") # Hook parameters and return types
- get_api_query_info("useGetUserMetadataQuery") # RTK Query endpoint details
- get_provider_setup("auth") # Provider hierarchy and setup code
- create_page_template("Dashboard", "mentor") # Generate a page following ibl.ai patterns
- ```
- ### Claude Code Skills
- The scaffolded app ships with skills that teach Claude how to work with your codebase. Instead of reading docs, you tell Claude what you want and the skills provide the context:
- | Skill | Description |
- |-------|-------------|
- | `/iblai-vibe-connect` | Connect the project to an ibl.ai org — one-click browser flow that writes the org key + a minted API token into the env files (no token in the chat) |
- | `/iblai-vibe-auth` | Add SSO authentication (includes CLI installation guide) |
- | `/iblai-vibe-agent-chat` | Add the full in-process agent chat surface |
- | `/iblai-vibe-project` | Add the in-process Projects surface (project landing page — chat input + files + instructions + assigned agents) |
- | `/iblai-vibe-profile` | Add profile dropdown + settings page |
- | `/iblai-vibe-account` | Add account/org settings page |
- | `/iblai-vibe-analytics` | Add analytics dashboard |
- | `/iblai-vibe-notification` | Add notification bell + center page |
- | `/iblai-vibe-invite` | Add user invitation dialogs |
- | `/iblai-vibe-workflow` | Agent workflows: the organization's list + visual editor |
- | `/iblai-vibe-local-llm` | Contract for on-device LLM (Ollama / Foundry) in a Tauri desktop build — command names, event names, hook shape the SDK reads via `localLLMProps` |
- | `/iblai-vibe-course-access` | Add course-content pages (edX user UI) |
- | `/iblai-vibe-course-create` | Generate, edit, and publish edX courses via the ibl.ai Course Creation API |
- | `/iblai-vibe-component` | Overview of all components + app creation paths |
- | `/iblai-vibe-onboard` | Design and build a high-converting onboarding questionnaire flow |
- | `/iblai-landing` | Build a high-converting landing page using a 12-section conversion framework |
- | `/iblai-vibe-ops-build` | Build and run on desktop and mobile (macOS, Windows x64 + ARM64, Linux, iOS, Android) |
- | `/iblai-vibe-ops-test` | Build, test and touch test your app in a real browser before showing work |
- | `/iblai-vibe-ops-upgrade` | Upgrade ibl.ai CLI, SDK, and vibe skills to the latest versions |
- | `/iblai-vibe-scaffold` | Scaffold a new app or add features — the base/agent project templates + the assembly steps |
- | `/iblai-vibe-iconography` | Generate every app-icon size (Tauri desktop, iOS, Windows MSIX, macOS) from one source image |
- | `/iblai-vibe-windows-msix` | Build and distribute a Tauri app as a Windows MSIX (sideload / Microsoft Store) |
- | `/iblai-vibe-deslop` | Audit and harden an existing codebase for production readiness (two-phase audit → safety-tiered fixes) |
- | `/iblai-vibe-rbac` | Reference: default RBAC roles, action-definitions endpoint, and the SDK Roles + Policies components |
- | `/iblai-vibe-agent-search` | Add the agent search/browse page (starred, featured, custom, default) |
- | `/iblai-vibe-agent-setting` | Add the agent Settings tab (name, visibility, copy, delete) |
- | `/iblai-vibe-agent-access` | Add the agent Access tab (RBAC for editor and chat roles) |
- | `/iblai-vibe-agent-api` | Add the agent API tab (API key management) |
- | `/iblai-vibe-agent-dataset` | Add the agent Datasets tab (searchable dataset table with upload) |
- | `/iblai-vibe-agent-disclaimer` | Add the agent Disclaimers tab (user agreement and advisory) |
- | `/iblai-vibe-agent-embed` | Add the agent Embed tab (embed code, custom styling, shareable links) |
- | `/iblai-vibe-agent-history` | Add the agent History tab (conversation history with filters and export) |
- | `/iblai-vibe-agent-llm` | Add the agent LLM tab (model provider selection) |
- | `/iblai-vibe-agent-memory` | Add the agent Memory tab (enable/disable memory and manage memories) |
- | `/iblai-vibe-agent-prompt` | Add the agent Prompts tab (system prompts and suggested prompts) |
- | `/iblai-vibe-agent-safety` | Add the agent Safety tab (moderation prompts and flagged content) |
- | `/iblai-vibe-agent-task` | Add the agent Tasks tab (schedule automated periodic agent tasks with run logs) |
- | `/iblai-vibe-agent-tool` | Add the agent Tools tab (enable/disable agent tools) |
- Skills are in `skills/` (symlinked to `.claude/skills/`). Read them, extend them, or write your own.
- ## Platform Capabilities
- | Feature | Web | macOS | Windows/Surface | iOS | Android |
- |---------|-----|-------|-----------------|-----|---------|
- | SSO Authentication | Yes | Yes | Yes | No | No |
- | AI Chat | Yes | Yes | Yes | Yes | Yes |
- | User Profile | Yes | Yes | Yes | Yes | Yes |
- | Account Settings | Yes | Yes | Yes | Yes | Yes |
- | Analytics Dashboard | Yes | Yes | Yes | Yes | Yes |
- | Notifications | Yes | Yes | Yes | Yes | Yes |
- > **iOS & Android SSO limitation:** Mobile WebViews use a non-standard user-agent that SSO providers reject. Completing the OAuth flow requires a system browser popup (ASWebAuthenticationSession on iOS, Chrome Custom Tabs on Android). This is not yet implemented -- mobile users must authenticate via another method for now.
- ## Deploy Anywhere
- ### Vercel (recommended)
- One-click deploy. Connect your repo, set your environment variables, and push.
- Or deploy with the `vercel` CLI -- see [`/iblai-vibe-ops-deploy`](skills/iblai-vibe-ops-deploy/SKILL.md):
- ```bash
- npx vercel deploy --prod --token="$VERCEL_TOKEN" --yes --public
- ```
- ### Tauri (Desktop & Mobile)
- Build native apps for macOS, Windows, Linux, iOS, and Android:
- Add the Tauri shell (see [`/iblai-vibe-ops-build`](skills/ship/iblai-vibe-ops-build/SKILL.md)), then:
- ```bash
- pnpm exec tauri build # Desktop build for current platform
- pnpm exec tauri ios init # iOS project setup
- ```
- ## Resources
- ## Built with iblai/vibe
- [Agentic OS](https://os.ibl.ai) ([iblai/os](https://github.com/iblai/os)) ·
- [Agentic LMS](https://lms.ibl.ai) ([iblai/lms](https://github.com/iblai/lms)) ·
- [vibe-agent](https://github.com/iblai/vibe-agent) (one creator, one agent, one paywall) ·
- marketing skills in [iblai/vibe-marketing](https://github.com/iblai/vibe-marketing)
- ## License
- MIT — [ibl.ai](https://ibl.ai)
scripts/test-skills-agent.sh · Bundled script · 160 lines · 1 finding marked
- #!/bin/bash
- # Tier-2 skill test: run a skill the way it actually executes — a headless
- # Claude agent following SKILL.md inside a scratch vibe app — then assert the
- # result compiles and builds. Tier-3 (RUN_LIVE=1) boots the built app and runs
- # the real SSO login flow against it.
- #
- # Usage:
- # scripts/test-skills-agent.sh <skill> [<skill>…] # explicit skills
- # scripts/test-skills-agent.sh --changed # skills touched vs origin/main
- #
- # Env:
- # MAX_TURNS agent turn cap (default 40)
- # AGENT_TIMEOUT seconds per skill (default 900)
- # RUN_LIVE=1 after build: pnpm start + Playwright SSO login (needs
- # AUTH_HOST, PLAYWRIGHT_USERNAME, PLAYWRIGHT_PASSWORD,
- # IBLAI_TEST_TENANT_KEY, IBLAI_TEST_API_KEY)
- #
- # Log hygiene: the agent only ever sees dummy credentials; real secrets enter
- # only the live-tier Playwright/server env. Server output goes to a file, never
- # the console. No `set -x` — do not add one.
- set -euo pipefail
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
- STARTER="$ROOT/skills/start/iblai-vibe-ops-init/assets/vibe-starter"
- skill_path() { ls -d "$ROOT"/skills/*/"$1" 2>/dev/null | head -1; }
- WORK="$ROOT/.skill-tests/agent"
- MAX_TURNS="${MAX_TURNS:-40}"
- AGENT_TIMEOUT="${AGENT_TIMEOUT:-900}"
- fail() { echo "✗ $*" >&2; exit 1; }
- note() { echo "• $*"; }
- command -v claude >/dev/null || fail "claude CLI not found (npm i -g @anthropic-ai/claude-code)"
- # ---- resolve target skills ----------------------------------------------
- skills=()
- if [[ "${1:-}" == "--changed" ]]; then
- base="${BASE_REF:-origin/main}"
- git -C "$ROOT" rev-parse --verify -q "$base" >/dev/null || base="main"
- while IFS= read -r dir; do
- [[ -f "$(skill_path "$dir")/SKILL.md" ]] && skills+=("$dir")
- done < <(git -C "$ROOT" diff --name-only "$base"...HEAD -- skills/ | awk -F/ '{print $3}' | sort -u)
- if [[ ${#skills[@]} -eq 0 ]]; then
- echo "test-skills-agent: no skills changed vs $base — nothing to do."
- exit 0
- fi
- else
- [[ $# -ge 1 ]] || fail "usage: $0 <skill>… | --changed"
- skills=("$@")
- fi
- # ---- scratch app helpers -------------------------------------------------
- make_scratch() {
- local dest="$1"
- rm -rf "$dest"
- mkdir -p "$dest"
- # Copy starter sources; link node_modules (agent must not need network).
- (cd "$STARTER" && find . -maxdepth 1 -mindepth 1 \
- ! -name node_modules ! -name .next ! -name test-results ! -name playwright-report \
- -exec cp -a {} "$dest/" \;)
- if [[ -d "$STARTER/node_modules" ]]; then
- # Hardlink clone, not a symlink — Turbopack refuses node_modules symlinks
- # that point outside the project root.
- cp -al "$STARTER/node_modules" "$dest/node_modules"
- else
- (cd "$dest" && pnpm install --frozen-lockfile --ignore-scripts --prefer-offline >/dev/null)
- fi
- # Dummy env — the agent NEVER sees real credentials.
- printf 'NEXT_PUBLIC_MAIN_TENANT_KEY=testtenant\nIBLAI_API_KEY=dummy-not-a-real-key\n' > "$dest/.env.local"
- printf 'DOMAIN=iblai.app\nPLATFORM=testtenant\nTOKEN=dummy-not-a-real-key\n' > "$dest/iblai.env"
- # Make every skill discoverable in the scratch project.
- mkdir -p "$dest/.claude"
- mkdir -p "$dest/.claude/skills"; for d in "$ROOT"/skills/*/*/; do cp -a "$d" "$dest/.claude/skills/"; done
- }
- json_field() { # json_field <file> <expr> (node-evaluated, prints value or empty)
- node -e "const m=require('$1');const v=$2;if(v)console.log(Array.isArray(v)?v.join('\n'):v)" 2>/dev/null || true
- }
- # ---- per-skill run -------------------------------------------------------
- overall=0
- for skill in "${skills[@]}"; do
- [[ -f "$(skill_path "$skill")/SKILL.md" ]] || { echo "✗ $skill: no such skill"; overall=1; continue; }
- scratch="$WORK/$skill"
- note "$skill → scratch $scratch"
- make_scratch "$scratch"
- prompt="Use the $skill skill to add its feature to this app. Follow the skill exactly. Do not ask questions; use placeholder values wherever a real ID, UUID, or credential is required. Stop when the skill's own verification steps pass or cannot proceed further without real credentials."
- log="$scratch/.agent-run.log"
- note "$skill: running agent (max ${MAX_TURNS} turns, ${AGENT_TIMEOUT}s cap)"
- if ! (cd "$scratch" && timeout "$AGENT_TIMEOUT" \
- claude -p "$prompt" --dangerously-skip-permissions --max-turns "$MAX_TURNS" \
- Note: Starts a coding agent with its permission prompts off
- Line 93 on GitHub
- >"$log" 2>&1); then
- echo "✗ $skill: agent run failed or timed out — last 40 lines:"
- tail -40 "$log" | sed 's/^/ /'
- overall=1
- continue
- fi
- note "$skill: typecheck + build"
- if ! (cd "$scratch" && pnpm typecheck >"$scratch/.typecheck.log" 2>&1); then
- echo "✗ $skill: typecheck failed after agent run:"
- tail -30 "$scratch/.typecheck.log" | sed 's/^/ /'
- overall=1
- continue
- fi
- if ! (cd "$scratch" && pnpm build >"$scratch/.build.log" 2>&1); then
- echo "✗ $skill: build failed after agent run:"
- tail -30 "$scratch/.build.log" | sed 's/^/ /'
- overall=1
- continue
- fi
- # Optional assertions from skills/<skill>/test.json
- manifest="$(skill_path "$skill")/test.json"
- if [[ -f "$manifest" ]]; then
- while IFS= read -r f; do
- [[ -z "$f" ]] && continue
- [[ -e "$scratch/$f" ]] || { echo "✗ $skill: expected file missing: $f"; overall=1; }
- done < <(json_field "$manifest" "m.assert_files")
- fi
- # ---- tier 3: live platform (opt-in, real credentials from env) --------
- if [[ "${RUN_LIVE:-0}" == "1" ]]; then
- : "${AUTH_HOST:?RUN_LIVE=1 needs AUTH_HOST}"
- : "${PLAYWRIGHT_USERNAME:?RUN_LIVE=1 needs PLAYWRIGHT_USERNAME}"
- : "${PLAYWRIGHT_PASSWORD:?RUN_LIVE=1 needs PLAYWRIGHT_PASSWORD}"
- : "${IBLAI_TEST_TENANT_KEY:?RUN_LIVE=1 needs IBLAI_TEST_TENANT_KEY}"
- note "$skill: live tier — starting server"
- printf 'NEXT_PUBLIC_MAIN_TENANT_KEY=%s\nIBLAI_API_KEY=%s\n' \
- "$IBLAI_TEST_TENANT_KEY" "${IBLAI_TEST_API_KEY:-}" > "$scratch/.env.local"
- (cd "$scratch" && pnpm start >"$scratch/.server.log" 2>&1) &
- server_pid=$!
- trap 'kill $server_pid 2>/dev/null || true' EXIT
- for _ in $(seq 1 30); do
- curl -sf -o /dev/null "http://localhost:3000" && break
- sleep 1
- done
- # Real SSO login via the starter's own Playwright setup. Minimal reporter,
- # no traces/video/screenshots, sanitized failure output (URLs can carry
- # SSO authorization codes).
- if (cd "$scratch" && APP_HOST="http://localhost:3000" AUTH_HOST="$AUTH_HOST" \
- PLAYWRIGHT_USERNAME="$PLAYWRIGHT_USERNAME" PLAYWRIGHT_PASSWORD="$PLAYWRIGHT_PASSWORD" \
- pnpm exec playwright test e2e/auth.setup.ts --config e2e/playwright.config.ts --project=setup-chromium \
- --reporter=dot --trace=off \
- >"$scratch/.live.log" 2>&1); then
- note "$skill: live SSO login OK"
- else
- echo "✗ $skill: live SSO login failed (details withheld from log — see $scratch/.live.log locally)"
- overall=1
- fi
- kill "$server_pid" 2>/dev/null || true
- trap - EXIT
- fi
- echo "✓ $skill"
- done
- exit "$overall"
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.