lint-toolchain

A repository-specific agent guide for changing the development toolchain, such as build tools, Node.js, TypeScript, lint rules, formatting, dependencies, and Git hooks.

In plain words
What is it for?
Use it when upgrading tools or dependencies, changing build configuration, modifying lint or format rules, or adjusting Git hooks in the repository.
Why use it?
Toolchain changes can cause mismatched versions, generated-file changes, broken builds, or inconsistent package settings. The guide lists checks for finding those problems.

Agent

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 agents/modelstudioai/cli/lint-toolchain
Clone the repo
git clone --depth 1 https://github.com/modelstudioai/cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.00905
Opus 5 $0.00000 $0.00452
Sonnet 5 $0.00000 $0.00181
Haiku 4.5 $0.00000 $0.00090

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

Security

Grade A, and why

lint-toolchain 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 2d 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.

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.

docs/agents/lint-toolchain.md · 69 lines

How it starts

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

工具链调整

触发条件

  • 升级 Vite+ / TypeScript / Node 版本
  • 调整 vite.config.ts(根 / 各包)
  • 改 lint 规则(Oxlint / Oxfmt / typescript-eslint)
  • 升级或替换依赖
  • 修改 .vite-hooks/ 或 git hooks

必查清单

A. 版本一致性

  • 发布包(cli 等)的 engines.node 与 README 的 Node.js 徽章一致;根/e2e 开发要求(>=22.12)与 CONTRIBUTING 一致
  • pnpm-lock.yaml 同步生成(运行 pnpm install)
  • 各源码包 tsconfig.json(根 + core + runtime + commands + cli + kscli)的 target / module 设置一致

B. lint / format 规则改动

  • 全仓跑 vp check --fix,看是否产生大量自动 reformat
  • 如果产生 mass diff,单独提一个 commit(代码语义改动和 lint reformat 不要混)
  • 已有 warning 的处理:
    • 如果新规则消除了某些旧 warning,确认是否合理
    • 如果新规则产生了新 warning,评估是否要修

C. 构建配置

  • packages/*/vite.config.ts 的 entry / dts / exports 设置符合包类型:
    • library 包(core/runtime/commands):本地 exports 默认指向 src/index.ts;publishConfig.exports 覆盖发布入口为 dist/index.mjs;dts 产物正常生成
    • binary 包(cli/kscli):entry 指向 src/main.ts,有 shebang,exports: true
  • cli / kscli 的 bundle 必须把 workspace 包(bailian-cli-core / bailian-cli-runtime / bailian-cli-commands)当 external(不内联),确认 dist 中仍是 package import
  • cli / kscli 的 binary bundle 第一行必须有 #!/usr/bin/env node shebang

D. 依赖升级

  • 检查 workspace 内部依赖在 dependencies 里仍是 "workspace:*"(不要手改成实际版本号;发布时由 pack/publish 流程解析)
  • 升级后跑 vp check && vp test
  • 升级 @types/node 时注意 Node API 变化(如 fs.existsSync 行为)

E. git hooks / pre-commit

  • .vite-hooks/pre-commit 改动后,pnpm install 重新软链(走 prepare: vp config)
  • 增加 hook 时,确认在干净 clone 后能自动激活
  • pre-commit 会跑 pnpm run sync:skill-assets(generate:reference 含格式化 + sync:skill-version,直接读源码、无需先 build)并 git add skill 资产,最后 vp staged

F. CI / 发版工具

  • tools/release/ 中如有版本/规则相关的硬编码,同步更新
  • 比如 secretPatterns 添加新的敏感值识别

完成后自查

# 完整冒烟
pnpm install --frozen-lockfile
vp check
vp test
node tools/release/check.mjs

常见漏点

  • ✗ 升级 Node engines 但忘了 README 徽章
  • ✗ 改 lint 规则后没全仓 --fix,新人 PR 报红一片
  • ✗ 改 cli/kscli 的 vite config 把 core/runtime/commands 不小心打成 inline,bundle 体积暴涨
  • ✗ Oxlint 配置改了但 IDE 缓存还是旧的(IDE 可能要重启 ts server)
  • ✗ 升级依赖一并升 lockfile,改动量大但没拆 commit

Read the full file on GitHub · 69 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. 2d ago First seen · 69 lines · 0 tokens per session scan A bcb7b2cb2dd2

Subscribe to this mod's changes

lint-toolchain is an agent published in the GitHub repository modelstudioai/cli (320 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 905 tokens. 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.