Summary
arkcli 共享执行协议:首次配置入口、业务命令执行前的认证闸门、命令路由与选择顺序、输出/安全/二次确认规则。深度细节(身份解析、AK-SK 边界、API Key 恢复、实名闸门、profile 默认与漂移、临时数据面执行上下文、版本检查与显式升级、全局 flags、故障分流)按需在 references/…
volcengine/ark-cli
arkcli ?
npx skills add volcengine/ark-cli --skill arkcli-shared
arkcli 共享执行协议:首次配置入口、业务命令执行前的认证闸门、命令路由与选择顺序、输出/安全/二次确认规则。深度细节(身份解析、AK-SK 边界、API Key 恢复、实名闸门、profile 默认与漂移、临时数据面执行上下文、版本检查与显式升级、全局 flags、故障分流)按需在 references/…
Other skills from volcengine/ark-cli · top by installs.
npx skills add volcengine/ark-cli
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
main
Parsed from SKILL.md frontmatter.
Files included with this skill beyond the listing page.
SKILL.md
15,189 B
SUMMARY.md
620 B
本 skill 是 arkcli 的统一执行协议入口。所有 arkcli-* skill 在执行前都应先读取本文件。
分层约定:本文正文只放"几乎每个任务都命中"的规则。稀有路径 / 查表类细节下沉到 reference,命中对应场景时再读:
| 场景 | 读哪个 |
|---|---|
| "我的 / my xxx" 自指资源过滤 | [../arkcli-auth/references/identity-resolution.md](../arkcli-auth/references/identity-resolution.md) |
| AK/SK 态能调什么 / 数据面 API Key 报错恢复 | [../arkcli-auth/references/auth-modes.md](../arkcli-auth/references/auth-modes.md) |
| 开通 / 部署 / 精调前的实名检查 | [../arkcli-auth/references/realname-gate.md](../arkcli-auth/references/realname-gate.md) |
|+chat/+gen/+deploy的默认资源与漂移 nudge | [references/profile-defaults.md](references/profile-defaults.md) |
| 临时传入 Profile / API Key / Base URL / Endpoint / 模型名 | [references/execution-context.md](references/execution-context.md) |
| 版本是否最新 / 刷新版本信息 / 显式升级 arkcli | [references/update.md](references/update.md) |
| 全局 flags 速查 | [references/global-flags.md](references/global-flags.md) |
| 报错不知归类 / 故障分流 | [references/troubleshooting.md](references/troubleshooting.md) |
--profile / ARK_PROFILE / 全局 flags / .env 谁覆盖谁)不对时,先看 [../arkcli-config/SKILL.md](../arkcli-config/SKILL.md)../arkcli-profile/SKILL.md](../arkcli-profile/SKILL.md)../arkcli-resources/SKILL.md](../arkcli-resources/SKILL.md)../arkcli-auth/SKILL.md](../arkcli-auth/SKILL.md)arkcli 是产品 CLI,不是 OpenAPI Action 浏览器;不要从 Action 名反推命令设计npm i @volcengine/ark-cli -g(公开版)references/update.md](references/update.md);update.mode 的读取、写入与 automatic gate 仍走 [../arkcli-config/SKILL.md](../arkcli-config/SKILL.md)当 AI Agent 通过任意 arkcli-* 业务 skill 执行 arkcli 命令时,必须使用下面的单命令环境变量前缀。它既标记调用来源和 owning skill,也冻结本次 Skill workflow 的 CLI 版本:不做隐式 registry 更新检查、不打印更新提示、不在任一子命令结束后调度 automatic apply。人类直接在终端调用 arkcli 时不要手动补这些变量。
ARKCLI_NO_UPDATE_NOTIFIER=1 \
ARKCLI_CALLER_TYPE=ai_agent \
ARKCLI_CALLER_NAME=<agent-id> \
ARKCLI_SKILL_NAME=<current-arkcli-skill> \
arkcli <command> ...
约定:
ARKCLICALLERNAME 使用稳定 Agent ID,例如 codex / claude-code / opencode / openclaw / trae / cursor;无法可靠判断时用 unknown_agentARKCLISKILLNAME 填当前业务 skill 名,例如 arkcli-gen / arkcli-chat / arkcli-models / arkcli-deployarkcli-shared 填进 ARKCLISKILLNAME,归因必须落到实际 owning skill;仅当本 skill 直接处理版本检查或显式升级时,它就是 owning skill,使用 ARKCLISKILLNAME=arkcli-sharedARKCLINOUPDATE_NOTIFIER=1 的兼容变量名虽然只写了 notifier,但契约覆盖全部隐式更新活动:缓存读取/刷新、提示和 automatic 调度;它不阻止用户明确要求的 arkcli update / arkcli update --checkarkcli 子命令都必须带完整前缀,不能只给第一条加;这样多命令 workflow 从开始到结束都使用同一已安装版本export 到整个 shell 会话,避免串到后续无关命令arkcli 是唯一的二进制:
arkcli profile create --type platform --set-default # 新建火山 profile(旧 config init/switch 已 deprecated)
arkcli profile use <name> # 切换默认 profile
切换 profile 会联动切换登录身份、API Key、控制面路由等全部上下文。详细命令树看 [../arkcli-profile/SKILL.md](../arkcli-profile/SKILL.md)。判断当前租户:arkcli profile show 看 tenant 字段。
优先按用户目标判断,而不是按命令名思考:
| 用户目标 | 路径 | 关键点 |
|---|---|---|
| 试用模型 / 快速验证效果 | auth → resources / models(可选)→ [+chat](../arkcli-chat/SKILL.md) / [+gen](../arkcli-gen/SKILL.md) |
Plan lane 用模型名;Platform lane 用 Endpoint |
| 专项多模态理解(转写/抽取/字幕/框目标…) | auth → [+understand](../arkcli-understand/SKILL.md) |
有明确产出形态时走 understand,不是 chat |
| 语音模型发现 / 选型(TTS / ASR / 播客 / 音色 / 实时语音交互) | auth → [models search](../arkcli-models/SKILL.md) |
仅支持广场检索;不支持 +chat / +gen / +deploy / +code-example / usage / pricing / onboard |
| 正式接入 / 稳定调用 | auth → models → [infer endpoint list](../arkcli-infer-endpoint/SKILL.md) → 没有就 [+deploy](../arkcli-deploy/SKILL.md) |
核心资源是 Endpoint,不是 +chat/+gen |
| 排查存量调用 / 看消耗 | auth → [usage](../arkcli-usage/SKILL.md) |
— |
| 本地 AI Agent 集成 | [+connect](../arkcli-connect/SKILL.md) |
— |
易混动词路由(避免选错 skill):
arkcli-plans](../arkcli-plans/SKILL.md);用 / 消耗 / 还剩多少额度 → [arkcli-usage](../arkcli-usage/SKILL.md)arkcli-profile](../arkcli-profile/SKILL.md);配置排障 / 老 yaml → [arkcli-config](../arkcli-config/SKILL.md)+chat;生成图/视频 → +gen;有产出形态的理解 → +understanddoubao-seed-tts-* 等广场语音模型 → 只允许 models search 做发现与选型说明;不要转 +chat / +gen / +deploy / +code-example / usage / pricing。不要主动补充控制台 / OpenAPI / SDK 等非 arkcli 接入路径或链接,除非用户另问"官方文档在哪里"。如果用户只是要"把一个音频文件转文字"且未要求使用广场语音模型,可另走 +understand asr;不要把 +understand 解释成支持广场 ASR 模型。命令选择顺序(始终按此):
arkcli <domain> <verb> 或 arkcli +<workflow>arkcli api(不要把 Raw API Explorer 当默认入口)除 arkcli auth ...、arkcli profile list/show、arkcli +connect list、arkcli update ... 外,默认认为业务命令需要先过认证检查。不要跳过认证检查就连续重试一串业务命令。
arkcli auth status;已登录就继续目标命令tenant 选登录命令- 火山(tenant=volc 或未设置):直接 Bash 执行 arkcli auth login volc-sso - 执行前一句话告知用户"检测到未登录,正在启动 SSO 登录,请在浏览器完成授权";Bash 调用设 timeout=600000(10 分钟);成功后立即回到原始任务,不要停在 auth 结果 - SSO 同时覆盖控制面 BFF 和数据面,所以默认走 SSO;AK/SK 登录通道 0.1.16 暂关。CI / agent / 沙箱(非 TTY)走 arkcli auth login --no-browser 两段式:Phase 1 跑它拿 authorizepending JSON 里的 authorizeurl 转发给用户,待其浏览器授权后回粘 base64 授权码,再跑 arkcli auth login --no-browser --code <授权码> 完成(细节见 [../arkcli-auth/SKILL.md](../arkcli-auth/SKILL.md))。不要在非 TTY 直接指望它阻塞等粘贴(旧版会 EOF 崩) - 启动 SSO 失败(无浏览器 / open 失败 / 端口占用 / 超时)→ 不原地重试,把 stderr 原样贴回用户、请其手动在终端登录后回来 - 登录流程细节、whoami、apikey 选择见 [../arkcli-auth/SKILL.md](../arkcli-auth/SKILL.md)
追加闸门 / 错误恢复(命中才读,避免常驻):
+deploy / infer endpoint create / train finetune create / models activate)→ 第一步先做实名检查,见 [../arkcli-auth/references/realname-gate.md](../arkcli-auth/references/realname-gate.md)../arkcli-auth/references/auth-modes.md](../arkcli-auth/references/auth-modes.md)../arkcli-auth/references/identity-resolution.md](../arkcli-auth/references/identity-resolution.md)--format 支持 json、yaml、table、csv、jsonl、pretty;脚本场景优先用 json/yaml,需要抽字段时配合 --transformstdout 只放结构化结果;解释 / 调试 / 错误都走 stderrarkcli api 调用--help:支持 Client Preview 才能用 --dry-run;不支持时改用只读命令核对并取得明确确认,绝不生成不存在的 flag意图澄清只解决“用户要操作哪个真实目标”,不代替写操作授权。用户目标已经唯一,或可从 本轮输入与当前权威结果安全确定时,不要额外提问。确有歧义时遵守以下硬规则:
高危操作(删除资源、变更凭证、产生费用等)需要二次确认。CLI 自动检测环境:交互式终端显示 Y/N 提示;非交互式(Agent 调用)返回 ExitValidation 错误、type="requires_confirmation"。
当 arkcli 返回 ExitValidation 且 type="requires_confirmation" 时:
hint 字段提取,或通用提示"即将执行高危操作,确认继续吗?"--yes flag 重试当前会触发二次确认的命令:plans personal rotate-apikey、plans team rotate-apikey、models activate <model-name>、profile delete <profile-name>、profile project [<project-name>]、config delete <profile-name>。后续新增高危命令遵循同一约定。
arkcli api 当默认入口references/execution-context.md](references/execution-context.md) 判断;正式接入仍走 +deploymodels search 发现能力。--project-name 与 --region。持久上下文通过 arkcli profile create/use 管理,单次切换使用 --profile。references/ 放身份解析 / AK-SK 边界 / API Key 恢复 / 实名闸门