ai-model-nodejs

ai-model-nodejs is a skill for Claude Code, Codex from sutchan/Agent-Skills-Hub. It costs 230 tokens per session (6,358 once invoked), scanned A, a copy of ai-model-nodejs, MIT.

Guidance for using the CloudBase Node.js SDK to call AI models from server-side programs such as cloud functions, Express, Koa, NestJS, CloudRun, or scheduled jobs. It covers text models and the SDK's image-generation interface.

In plain words
What is it for?
Building backend AI features, long-running agent jobs, scheduled tasks, model proxies, orchestration flows, and server-side image generation with CloudBase.
Why use it?
It helps place AI calls in the correct runtime and keeps server-only secrets on the backend. It also distinguishes backend work from browser-based AI features and WeChat Mini Programs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building backend AI features, long-running agent jobs, scheduled tasks, model proxies, orchestration flows, and server-side image generation with CloudBase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sutchan/agent-skills-hub/ai-model-nodejs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sutchan/Agent-Skills-Hub --skill ai-model-nodejs
Clone the repo
git clone --depth 1 https://github.com/sutchan/Agent-Skills-Hub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-model-nodejs

README.md
[![agentmods](https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/ai-model-nodejs/github.svg)](https://agentmods.dev/skills/sutchan/agent-skills-hub/ai-model-nodejs)
Your own site
<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/ai-model-nodejs"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/ai-model-nodejs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-model-nodejs

Your own site · 80×15
<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/ai-model-nodejs"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/ai-model-nodejs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 230 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00230 $0.06358
Opus 5 $0.00115 $0.03179
Sonnet 5 $0.00046 $0.01272
Haiku 4.5 $0.00023 $0.00636

Measured 8d ago against content hash 8a05ac1b2fb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ai-model-nodejs scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Runtimes without a CloudBase SDK (Python, Go, PHP, curl, etc.) → use the `http-api-cloudbase` skill (it now includes the `ai_model` OpenAPI spec for direct HTTP calls to the AI model endpoint; do NOT wrap this SDK behi
Origin

This is a copy

98% identical to ai-model-nodejs — 205 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/cloudbase/references/ai-model-nodejs/SKILL.md · 452 lines

How it starts

The opening of the file, as written. The whole thing — 452 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sibling skills (local only)

Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.

If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.

When to use this skill

Use this skill for calling AI models from Node.js backends, cloud functions, or CloudRun services via @cloudbase/node-sdk.

🧭 Runtime-plane fit. This is the right skill when the AI call truly belongs on the server: image generation (the only SDK that supports it), long-running agent jobs, orchestration across multiple tools, scheduled tasks, or flows that must keep secrets server-side. If the user is building a Web page / frontend AI chat UI, do NOT wrap this SDK behind a backend proxy — route to ai-model-web and call the model directly from the browser. For WeChat Mini Programs use ai-model-wechat. Routing is decided by runtime plane first; the concrete model (deepseek-*, glm-*, hunyuan-*, kimi-*, …) only affects the model field.

Use it when you need to:

  • Integrate AI text generation into a backend service
  • Generate images with the Hunyuan Image model
  • Call AI models from CloudBase cloud functions or CloudRun
  • Do server-side AI processing (agent orchestration, batch jobs, scheduled tasks)

Do NOT use for:

  • Browser/Web apps → use the ai-model-web skill
  • WeChat Mini Program → use the ai-model-wechat skill
  • Runtimes without a CloudBase SDK (Python, Go, PHP, curl, etc.) → use the http-api-cloudbase skill (it now includes the ai_model OpenAPI spec for direct HTTP calls to the AI model endpoint; do NOT wrap this SDK behind an HTTP proxy)

⛔ STOP — ai.createModel(...) argument is not a vendor / model name

Read this before writing any createModel(...) line. Agents frequently hallucinate this argument. There are exactly three legal shapes. Anything else is a bug.

Read the full file on GitHub · 452 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 452 lines · 230 tokens per session scan A 8a05ac1b2fb1

Subscribe to this mod's changes

ai-model-nodejs is a skill published in the GitHub repository sutchan/Agent-Skills-Hub (2 stars, last pushed today), licensed MIT. It adds 230 tokens to every session and 6,358 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 98% identical to ai-model-nodejs, differing in 205 lines, and is treated as a copy.

Related

Other skills, from other repositories

content-hash-cache-pattern

Cache expensive file-processing results (PDF parsing, OCR, text extraction, image analysis) keyed by a SHA-256 hash of file content rather than file path, so renamed files still hit the cache and changed content auto-invalidates it. Use when building a file-processing pipeline that reprocesses the same files across…

shennawardana23/skillme · 89 tokens

notebooklm

Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…

teng-lin/notebooklm-py · 79 tokens

gemini-live-api

Generates a Gemini LiveAPI client service class in the user's chosen programming language. Use when the user wants to build, scaffold, or integrate a client that connects to the Gemini Enterprise LiveAPI websocket endpoint, handles session setup/resumption, bearer token refresh, and sending/receiving…

google/skills · 119 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens

creating-openlineage-extractors

Create custom OpenLineage extractors for Airflow operators. Use when the user needs lineage from unsupported or third-party operators, wants column-level lineage, or needs complex extraction logic beyond what inlets/outlets provide.

astronomer/agents · 51 tokens

routerbase-model-gateway

Configure RouterBase as an OpenAI compatible model gateway for AI apps, with routing, fallback, media generation, and credential handling patterns.

cosmicstack-labs/mercury-agent-skills · 33 tokens