yodaos-project/aiui/aiui-cloud-apis

Claude Code and agent skill by yodaos-project/aiui

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

English coding-agent guidance for the six AIUI app-facing Rokid OpenAPI operations: getProfile, invokeAgentApi, checkUserAuth, saveThirdToken, getThirdToken, and getAIUICacheMessage. Use this skill when code imports createOpenAPI from the built-in open module. Detailed per-API contracts are in references/.

Install

npx vskill@latest install yodaos-project/aiui/aiui-cloud-apis

SKILL.md

AIUI Cloud OpenAPI

Use this skill for AIUI app/page code that calls the agent-facing Rokid OpenAPI through the built-in open runtime module. Server-side integrations use separate documentation.

Start here

ts
import { createOpenAPI } from 'open';
const api = await createOpenAPI();
  • open is a QuickJS/Ink runtime built-in, not an npm package.
  • Do not import from @yodaos-pkg/ink, call fetch('/openapi/...'), or assume api is global.
  • Guard import, initialization, and API calls with try/catch.
  • The runtime injects authentication. Do not manually pass or log access_token or x-request-agent-id.
  • Operations with a request body require the exact { body: requestBody } wrapper. No-body operations receive no argument.

Choose an API

NeedRuntime callDetailed reference
Account ID, name, avatar, or phoneapi.account.getProfile()`references/get-profile.md`
Invoke a Lingzhu agent / stream outputapi.agent.invokeAgentApi({ body })`references/invoke-agent-api.md`
Check sensitive-information permissionapi.auth.checkUserAuth()`references/check-user-auth.md`
Save a third-party tokenapi.agent.saveThirdToken({ body })`references/save-third-token.md`
Get the current agent's third-party tokenapi.agent.getThirdToken()`references/get-third-token.md`
Consume one cached AIUI messageapi.agent.getAIUICacheMessage()`references/get-aiui-cache-message.md`

For shared protocol rules and the complete operation index, read `openapi-reference.md`. Before implementing a specific operation, read its corresponding file under references/; those files are authoritative for operation-specific request, response, field, event, and error details.

Minimal call shapes

ts
const profile = await api.account.getProfile();
const auth = await api.auth.checkUserAuth();
const token = await api.agent.getThirdToken();
const cached = await api.agent.getAIUICacheMessage();
const saved = await api.agent.saveThirdToken({
body: { company: 'third-party-company', token: 'access-token-value' }
});
const stream = api.agent.invokeAgentApi({
body: { agent_id: 'agent-id', question: 'Hello' }
});

saveThirdToken requires { body: { company, token, refreshToken?, meta?, expireInMs? } }. company and token are required; success is code === 1 with data === null. expireInMs is an optional millisecond TTL that defaults to 2592000000 (30 days) when omitted. Tokens are sensitive and are cached for the current user/company.

invokeAgentApi returns an EventSource immediately—never await it. Reuse one conversation_id for the lifetime of an open agent session. For its SSE stream, parse each event.data, append only non-empty step: 'content' message.content, exclude thought, inspect metadata for tools, and surface error event message.content to the user. Handle both tool_call_finsh and tool_call_finish.

Safety rules

  • Treat mobile, token, and refreshToken as sensitive. Null-check restricted fields, mask phone numbers, and never log/persist/expose credentials.
  • checkUserAuth is informational, not a hard gate. Continue the flow when it is false or unavailable, while checking restricted fields defensively.
  • getThirdToken with code === 1 and data === null is a successful no-token state.
  • getAIUICacheMessage with code === 1 and data === null is an empty-cache state. Retrieval deletes atomically; do not blindly retry.
  • Display a non-empty profile.notification verbatim and visibly.

Common mistakes

Do not flatten request-body fields, await the SSE method, generate a new conversation ID for every message, pass arguments to no-body methods, concatenate thought output, invent undocumented response fields, or treat an informational permission failure as a transport failure.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
54
Repository forks
20
7-day trend score
25

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 9 Oct 2026, a month ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/yodaos-project/aiui/aiui-cloud-apis/badge)](https://verified-skill.com/skills/yodaos-project/aiui/aiui-cloud-apis)

Something wrong with this skill or its page? Tell us.