arkcli-code-example

A code-example generator for calling a named ARK foundation model through software. It creates examples in supported programming languages and saves them to local files.

In plain words
What is it for?
Use it when you already know the model name and need starter code for an SDK call, such as a Python example or a curl command.
Why use it?
It removes the need to write a model's basic SDK or command-line request from scratch.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/volcengine/ark-cli/arkcli-code-example
Any agent
npx skills add volcengine/ark-cli --skill arkcli-code-example
Clone the repo
git clone --depth 1 https://github.com/volcengine/ark-cli

Made for: Claude Code, Codex.

Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,332 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found 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 $0.00116 $0.01332
Opus 5 $0.00058 $0.00666
Sonnet 5 $0.00023 $0.00266
Haiku 4.5 $0.00012 $0.00133

Measured 2d ago against content hash 34b34c9c354d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

arkcli-code-example 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/demo-code/python.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

description: "arkcli +code-example:为指定基础模型生成多语言(Python / Go / Java / Node / curl)调用示例代码并写入本地文件。数据源是火山方舟 OpenTOP OpenGetSampleCode。当用户需要拿某个基础模型的 SDK / curl 调用示例、保存为本地接入模板时使用。反触发:TTS/ASR/语音模型没有 arkcli 示例代码路径,不能靠补版本解决,只能转 m
skills/arkcli-code-example/SKILL.md · 67 lines

How it starts

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

arkcli +code-example

前置条件: 先阅读 ../arkcli-shared/SKILL.md 了解认证、全局参数和安全规则。

为指定基础模型生成多语言 SDK 调用示例代码,同时写入本地文件。数据源是火山方舟 OpenTOP OpenGetSampleCode

什么时候用

  • 用户说"生成示例代码 / SDK 示例 / curl 命令 / 怎么调用这个模型",且已经知道模型名
  • 想把某个基础模型的多语言调用模板保存到本地

反路由(不要用本命令):

  • 只是想试模型效果 → ../arkcli-chat/SKILL.md(文本/多模态对话)或 ../arkcli-gen/SKILL.md(出图/视频)
  • 还不知道模型名 → 先 ../arkcli-models/SKILL.md models search/get
  • 需要先创建接入点 → ../arkcli-deploy/SKILL.md
  • 语音模型(TTS / ASR / 配音 / 朗读 / 播客 / 音色 / 实时语音交互,或 doubao-seed-tts-* / doubao-seed-asr-* / seedasr-*)→ 不使用 +code-examplemodels search 能搜到不代表 OpenGetSampleCode 有示例;不要把后端 ModelVersion required 理解成"补一个版本就能生成",应说明当前 arkcli 不支持语音模型示例代码。

快速开始

# 拿某基础模型的全部语言示例(写入 ./ark-examples/<model>/)
arkcli +code-example --model doubao-seedream-5-0

# 指定版本 + 只看 Python + 结构化输出
arkcli +code-example --model doubao-seedream-5-0 --version 260128 --language python --format json
  • --model 必填,可传基础模型名或合并 ID(doubao-seedream-5-0-260128
  • --version 可选;不传时 CLI 自动推导(合并 ID 拆版本 → 找 ArkModels 匹配 → GetFoundationModel 取 PrimaryVersion 兜底),全都拿不到才报错要求显式传 --version
  • 内部机制:接口约束 ModelVersion 必填,缺失时 CLI 走上述回退链自动补齐;custom model 走 PrimaryVersion 兜底时 scenario 自动切 finetune_inference,foundation model 无论显式版本或 PrimaryVersion 兜底一律保持 quick_access
  • --language 可选:python / go / java / node / curlshellcurl 别名),默认全部
  • --output-dir 可选,默认 ./ark-examples/<model>
  • --format json 输出结构化条目(含 language / io_type / install / code
  • 语音模型没有 arkcli 示例代码路径;命中 TTS / ASR / 语音交互时停在 arkcli models search <keyword> 的发现说明,不要继续调用本命令

0.1.17 变更:旧版 --endpoint-id 已移除——新数据源按基础模型取码,不再支持按已有接入点 ID 取码。如需指向某 endpoint,生成后把代码里的 model="..." 手动改成你的 ep-xxx

命令一览

命令 说明
arkcli +code-example --model <name> [--version <ver>] [--language <lang>] [--output-dir <dir>] [--format json] 生成多语言示例代码并写入本地

Read the full file on GitHub · 67 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 67 lines · 116 tokens per session scan A 34b34c9c354d

Subscribe to this mod's changes

arkcli-code-example is a skill published in the GitHub repository volcengine/ark-cli (112 stars, last pushed 5d ago), licensed Apache-2.0. It adds 116 tokens to every session and 1,332 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

happiness-skill

当用户问「怎么才能更幸福/为什么得到了还不满足/怎么减少焦虑」时调用。 核心理念: 幸福是缺憾感清空的默认状态, 是可训练的技能; 欲望是与自己的契约(得到前不快乐), 同时只留一个重大欲望; 活在当下。 不适用于: 临床抑郁等需要专业治疗的场景(本书方法不能替代医疗)。 Triggers: 幸福/不快乐/欲望/焦虑/知足/活在当下/happiness/desire/anxiety.

kangarooking/cangjie-skill · 136 tokens

create-business

Guided journey from raw idea to a validated, positioned, priced business with a chosen beachhead. Orchestrates ten skills phase by phase - jobs-to-be-done, mom-test, design-sprint, lean-startup, good-strategy-bad-strategy, blue-ocean-strategy, obviously-awesome, hundred-million-offers, monetizing-innovation…

wondelai/skills · 211 tokens

jobs-to-be-done

Discover what customers truly need by analyzing the "job" they hire your product to do. Use when the user mentions "customer discovery", "why customers churn", "what job does this solve", "competing against luck", "product-market fit", "switching behavior", "milkshake moment", or "functional vs emotional jobs". Also…

wondelai/skills · 137 tokens

asc-subscription-localization

Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.

rorkai/app-store-connect-cli-skills · 60 tokens

pcbway

PCBWay PCB fabrication and assembly — turnkey/consigned assembly, design rules, ordering workflow. Alternative to JLCPCB for manufacturing. Use with KiCad. Use this skill when the user mentions PCBWay, needs turnkey assembly (PCBWay sources parts by MPN), has parts not available on LCSC, needs assembled boards with…

aklofas/kicad-happy · 119 tokens

scienceworld-growth-focuser

Use when you have planted a seed or need to track a plant's growth stage (sprouting, flowering, reproduction). Applies the 'focus on' action to a specific plant or biological entity to signal intent and monitor its development. Trigger after planting or when you need to observe life cycle progression in the…

zjunlp/SkillNet · 71 tokens