CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

ai-model-web

Use this skill when a browser/Web app (React, Vue, Next, Nuxt, static sites, SPAs, dashboards, AI chat UI, 页面, 前端, 网页) needs AI models via @cloudbase/js-sdk. Default routing for Web/frontend AI — call directly from the browser, do NOT propose a Node.js proxy. Covers generateText and streamText; models via ai.createModel with groups cloudbase, hunyuan-exp, or custom-*, model id in the `model` field. MUST run two-step preflight before code — see body. NOT for Node.js backend (use ai-model-nodejs), Mini Program (use ai-model-wechat), or image generation (Node SDK only).

69

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

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

SKILL.md
Quality
Evals
Security

Quality

Content

70%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 content is exceptionally actionable and the preflight workflow is a model of sequenced validation with explicit checkpoints and recovery loops, but it pays for this with heavy redundancy — key guardrails are restated four to five times across sections, and the Best Practices, Error Handling, and Type Definitions sections are largely recap or material available from the SDK itself. As a single 387-line monolith with no bundle files, it also inlines reference-grade material that progressive disclosure would split out.

Suggestions

Deduplicate the repeated guardrails ('Models is a full replacement', 'never assume a model is enabled', 'custom- prefix required', anonymous-auth denial, PascalCase/camelCase fallback) into one canonical statement each, and cut the Best Practices items that restate earlier sections verbatim.

Move the Type Definitions and the provider/model catalog into a references/ file (e.g. references/models.md) and keep SKILL.md as a routing + preflight overview with one-level-deep pointers.

Drop or shrink the trivial try/catch 'Error Handling Pattern' example, replacing it with SDK-specific error guidance (e.g. distinguishing preflight failure from model-call failure, which currently only appears in Best Practice #11).

DimensionReasoningScore

Conciseness

The body is noticeably verbose through systematic repetition and padded sections, even though everything is accurate: "Models is a full replacement — resend everything" is stated in five places (preflight ②, the UpdateAIModel block, custom onboarding, Best Practices #1), "Never assume the model is already enabled" in four, the anonymous-auth denial in four, and "MUST start with `custom-`" in four; the 13-item "Best Practices" section largely recaps earlier sections verbatim, the "Error Handling Pattern" demonstrates a trivial try/catch Claude already knows, and the "Type Definitions" section duplicates types the SDK itself ships (per the body's own rule #12). This fits 'several unnecessary explanations or padded sections' rather than the mostly-efficient anchor 3.

2 / 5

Actionability

Guidance is fully executable: exact MCP invocations with parameters ("callCloudApi(service=\"tcb\", action=\"DescribeAIModels\", params={ EnvId })"), machine-checkable pass conditions ("postpayPackageId starts with pkg_tcb_tokencredits_", "status is NOT in [3, 4]"), a concrete purchase URL, correct/wrong code tables for createModel arguments, and copy-paste-ready initialization, generateText, and streamText examples with commented expected outputs. Common cases — including the fallback path ("If the call returns InvalidParameter, fall back to camelCase") — are covered.

5 / 5

Workflow Clarity

The "Mandatory Two-Step Preflight" is a clearly sequenced workflow with explicit validation checkpoints and feedback loops: Step 0 obtains the EnvId, preflight ① gives binary branch outcomes ("❌ Not satisfied → stop writing code and surface this to the user", "✅ Satisfied → proceed to preflight ②"), and preflight ② is a numbered decision procedure with explicit jump conditions ("If the target model ... is missing, jump to step 4") plus a terminal self-verification checklist ("Run tsc --noEmit + the project build + open the page with agent-browser and actually trigger the AI call"). Error recovery loops (InvalidParameter → camelCase fallback, re-validate after enable) are present.

5 / 5

Progressive Disclosure

There are no bundle files (no references/, scripts/, or assets/), and the 387-line body inlines material that belongs in separate reference files: the full "Type Definitions" API reference, the provider/model catalog, and the custom-onboarding guide. This matches anchor 3 ('content that should be separate is inline') rather than 2 because the body itself is well-sectioned with clear headers and its external references (sibling skills like `auth-web-cloudbase`, `../auth-tool-cloudbase/SKILL.md`, `web-development/browser-testing.md`) are one level deep and clearly signaled — and it is not 4 because the bulk of the API reference and catalog detail sits inline in SKILL.md instead of being split out.

3 / 5

Total

15

/

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.

An exemplary description: it names the exact SDK surface (generateText, streamText, createModel group values, the `model` field), gives a broad set of natural trigger terms including Chinese synonyms, and draws sharp boundaries against sibling skills with explicit not-for clauses. Both 'what' and 'when' are answered explicitly and concretely.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions with comprehensive coverage: "Covers generateText and streamText; models via ai.createModel with groups cloudbase, hunyuan-exp, or custom-*, model id in the `model` field" plus the mandatory "two-step preflight before code". It is not a 4 because the skill's entire action surface (routing, methods, group values, model field, preflight) is explicitly named with no minor gaps, matching the 'multiple specific concrete actions; comprehensive coverage' anchor.

5 / 5

Completeness

Both 'what' and 'when' are explicit: what — "Covers generateText and streamText; models via ai.createModel with groups cloudbase, hunyuan-exp, or custom-*"; when — "Use this skill when a browser/Web app ... needs AI models via @cloudbase/js-sdk", reinforced by negative triggers ("NOT for Node.js backend ... Mini Program ... image generation"). Not a 4 because the when-clause is explicit and concrete rather than merely present.

5 / 5

Trigger Term Quality

Trigger terms are comprehensive with synonyms and even non-English variants users would naturally say: "browser/Web app (React, Vue, Next, Nuxt, static sites, SPAs, dashboards, AI chat UI, 页面, 前端, 网页)". It is not a 4 because essentially no common natural phrasing for this domain is missing — framework names, app types, and both English and Chinese layman terms are present.

5 / 5

Distinctiveness Conflict Risk

The niche is clearly anchored to "@cloudbase/js-sdk" browser calls and explicitly disambiguates every adjacent sibling skill: "NOT for Node.js backend (use ai-model-nodejs), Mini Program (use ai-model-wechat), or image generation (Node SDK only)". Conflict risk is minimal because the routing boundary (browser direct call, "do NOT propose a Node.js proxy") is stated explicitly. Voice is the standard third-person 'Use this skill' form, not first/second person, so no specificity penalty applies.

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.

Validation — 15 / 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

Path

config/.claude/skills/ai-model-web/SKILL.md

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.