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.
npx agentmods add instructions/modelstudioai/cli/agents-mdgit clone --depth 1 https://github.com/modelstudioai/cliWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.03520 | $0.03520 |
| Opus 5 | $0.01760 | $0.01760 |
| Sonnet 5 | $0.00704 | $0.00704 |
| Haiku 4.5 | $0.00352 | $0.00352 |
Grade A, and why
cli AGENTS.md scanned grade A with 0 findings 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 yesterday.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
bailian-cli — AI 维护指南
本文件是 AI agent 维护本仓库时的契约。每次进入项目先读这里,从"业务场景索引"挑一条,再进入对应 docs/agents/*.md 清单。
项目地图
monorepo 现在按"纯逻辑 → 运行时框架 → 命令库 → 产品入口"分层:
packages/core—bailian-cli-core,纯逻辑层:鉴权、配置、HTTP client、错误、类型、文件工具packages/runtime—bailian-cli-runtime,通用 CLI 运行时:createCli、参数解析、registry/help、middleware、error handler、输出、pipeline、Command Pack hostpackages/commands—bailian-cli-commands,可复用命令实现库,只导出 command,不决定产品路径packages/cli—bailian-cli,完整bl产品入口;src/commands.ts组装bl暴露的命令路径packages/kscli—knowledge-studio-cli,Knowledge Studio 专用入口;src/main.ts复用 commands 并重映射为kscli路径packages/bailian-kb-dsh—bailian-kb-dsh,下游宿主适配层(依赖方向朝外):百炼知识库的 DeepSeek Harness (dsh) 插件,消费blCLI 与知识库 API,不在上面这条分层链上;版本、构建、发布都独立,见 docs/agents/dsh-plugin.md
关键文件
packages/cli/src/main.ts # bl 入口,注入 binName/version/clientName/npmPackage
packages/cli/src/commands.ts # bl 产品命令 map,tools/generate-reference.ts 也读它
packages/cli/src/command-pack-policy.ts # bl 的 Command Pack policy
packages/kscli/src/main.ts # kscli 入口和命令 map
packages/commands/src/index.ts # re-export 单个命令实现
packages/commands/src/commands/ # defineCommand({ auth, flags, usageArgs, exampleArgs, run })
packages/runtime/src/create-cli.ts # createCli(commands, options)
packages/runtime/src/registry.ts # 命令树解析 + 动态 help
packages/runtime/src/middleware.ts # auth / telemetry / update / run command
packages/runtime/src/command-packs/ # 通用 Command Pack 加载、校验、隔离安装目录和管理命令
packages/runtime/src/urls.ts # 用户面控制台 URL
packages/core/src/types/command.ts # Command / flags / auth 类型
packages/core/src/config/ # ConfigFile / Settings / source 解析
packages/core/src/auth/ # apiKey / console credential 解析与落盘
packages/core/src/client/ # HTTP client / endpoints / console gateway
Skill / 命令手册随 skills/bailian-*/ 经 bl skill init 安装(装齐 registry 中全部 bailian-*,含共享协议 bailian-protocol)。业务 skill(bailian-cli / bailian-gen / bailian-finetune / bailian-managed-agent / bailian-web-search)执行前读 skills/bailian-protocol/;不要依赖 frontmatter companions(安装器不强制)。tools/generate-reference.ts 从 packages/cli/src/commands.ts 按一级命令归属表分流写入各 skills/<skill>/reference/(纳入 git);tools/sync-skill-metadata.ts 从 packages/cli/package.json 同步各 skills/*/SKILL.md 的 metadata.version。两者由根脚本 pnpm run sync:skill-assets 和 .vite-hooks/pre-commit 执行。hub bailian-cli 的路由表不复述领域命令明细;SKILL 文案 / 安装约定 / hand-off 见 docs/agents/skill-change.md。
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.
- yesterday First seen · 146 lines · 3,520 tokens per session scan A 6e216b43cc0d
cli AGENTS.md is an instructions file published in the GitHub repository modelstudioai/cli (320 stars, last pushed 4d ago), licensed Apache-2.0. It adds 3,520 tokens to every session, about $0.0176 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
ai-toolkit AGENTS.md
Instructions for pipefy/ai-toolkit, covering repository guidelines, documentation map, project structure, import namespace migration: pipefysdk → pipefy and src/pipefysdk/init.py (transitional shim).
superpowers-reasonix AGENTS.md
Instructions for christopherarter/superpowers-reasonix, covering project guidance, skills — stop. load a skill before you act, red flags — these thoughts mean stop. you are rationalizing and priority.
ai-mind AGENTS.md
Instructions for HWYD/ai-mind, covering agents, version spec workspace continuity (mandatory), 项目定位, 事实来源优先级 and 开始大改前先读什么.
finding-unknowns-skills CLAUDE.md
Claude Code instructions for Neeeophytee/finding-unknowns-skills, covering repo notes, what ships, and the gate that decides, version lives in three manifests — move them together, files that must be edited together and shipped guidance is not this file.
vvvv-skills CLAUDE.md
Claude Code instructions for tebjan/vvvv-skills, covering vvvv gamma, when to patch vs code, core concepts, live environment and important conventions.
pi AGENTS.md
AGENTS.md instructions for counterposition/pi, covering agents.md, commands, pattern: pnpm --filter @counterposition/pi-web-search run, single test file and single test by name.