CtrlK
BlogDocsLog inGet started
Tessl Logo

ai-model-web

Use this skill when a browser/Web app (React, Vue, Angular, Next, Nuxt, static sites, SPAs, dashboards, AI chat UI) needs AI models via @cloudbase/js-sdk. Default routing for page/页面/Web/前端/frontend/网页/H5 AI — call directly from browser, do NOT propose a Node.js proxy. Covers generateText and streamText. Models via ai.createModel with groups cloudbase, hunyuan-exp, or custom-*. Model IDs (deepseek-v4-flash, deepseek-v3.2, hunyuan-2.0-instruct-20251111, glm-5, kimi-k2.6) go in the model field. MUST run two-step preflight before code — see body. Keywords: 页面, Web, 前端, React, Vue, Next, Nuxt, SPA, AI chat UI, generateText, streamText, createModel, hunyuan-exp, Token Credits, TokenHub, Hunyuan, DeepSeek, GLM, Kimi, MiniMax. NOT for Node.js backend (use ai-model-nodejs), Mini Program (use ai-model-wechat), or image generation (Node SDK only).

72

Quality

88%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

High

Do not use without reviewing

The canonical home for this skill is ai-model-web in TencentCloudBase/CloudBase-AI-Toolkit

SKILL.md
Quality
Evals
Security

Quality

Content

77%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is highly actionable and the preflight workflow is exemplary in its sequencing and validation, but it is held back by repeated restatement of the createModel rule and by being a long single-file monolith with no progressive disclosure to reference files. Splitting the deep reference material and de-duplicating the createModel guidance would materially improve it.

Suggestions

Consolidate the createModel argument guidance: it is restated in the STOP section, 'Available Providers and Models', the decision procedure, and Best Practices #3 — state the three legal values once and cross-reference from the other locations to cut repetition.

Extract the Type Definitions and the detailed two-step preflight procedure into reference files (e.g. references/types.md, references/preflight.md) and link to them from SKILL.md, so the top-level file stays an overview for this 380-line skill.

Tighten the Initialization section's getLoginState vs getSession explanation: the same rationale appears in both the blockquote and the 'Important notes' list — keep the gotcha once and drop the duplicate wording.

DimensionReasoningScore

Conciseness

Mostly efficient and free of beginner-concept padding, but the createModel-argument rule is restated in the STOP section, 'Available Providers and Models', the decision procedure, and Best Practices #3, and the getLoginState/getSession gotcha is explained twice — tightening this repetition would help.

3 / 5

Actionability

Provides fully executable, copy-paste-ready code for initialization, generateText, streamText, error handling, plus concrete callCloudApi invocations for DescribeAIModels/UpdateAIModel/CreateAIModel and full TypeScript type definitions covering the common cases.

5 / 5

Workflow Clarity

The two-step preflight is a clearly sequenced workflow (Step 0 env id → ① eligibility → ② group readiness) with explicit pass/fail checkpoints, feedback loops (missing model → DescribeManagedAIModelList → UpdateAIModel → retry), and a self-verify checklist (Best Practice #13: tsc, build, agent-browser, confirm usage non-zero).

5 / 5

Progressive Disclosure

Section headers are clear, but this is a ~380-line monolith with no bundle reference files; the Type Definitions, provider/model catalog, and full preflight deep-dive are inlined rather than split into one-level-deep reference files the rubric expects for a skill this size.

3 / 5

Total

16

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, highly activating description: it pairs an explicit 'Use this skill when' trigger with concrete SDK actions, a comprehensive bilingual keyword set, and crisp negative-routing against sibling skills. Its only soft spot is keyword-stuffing density, but every term serves activation.

DimensionReasoningScore

Specificity

Lists multiple concrete SDK-specific actions — 'Covers generateText and streamText', 'Models via ai.createModel', 'MUST run two-step preflight before code' — giving comprehensive coverage rather than vague abstraction.

5 / 5

Completeness

Explicitly answers both what ('calling AI models in browser/Web applications via @cloudbase/js-sdk', generateText/streamText) and when ('Use this skill when a browser/Web app ... needs AI models') with concrete trigger phrases.

5 / 5

Trigger Term Quality

Both the opening sentence and the explicit 'Keywords:' list give comprehensive natural-term coverage with synonyms (页面/Web/前端/frontend/网页/H5, React/Vue/Next/Nuxt/SPA) plus the relevant vendor names.

5 / 5

Distinctiveness Conflict Risk

Clear niche (browser/Web AI via @cloudbase/js-sdk) with explicit 'NOT for Node.js backend (use ai-model-nodejs), Mini Program (use ai-model-wechat), or image generation' routing, minimizing conflict with sibling skills.

5 / 5

Total

20

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

15

/

16

Passed

Repository
TencentCloudBase/CloudBase-AI-Toolkit
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.