一键导入
kb-models
Inspect live routes and manage optional user-local OpenAI-compatible/LiteLLM extra routes through the kbrouter CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Inspect live routes and manage optional user-local OpenAI-compatible/LiteLLM extra routes through the kbrouter CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Single user-facing KB completion command. Takes a feature, plan, or manifest from its current state through planning, work, post-work finalization, and configured delivery: local completion, pushed PR, or explicitly configured direct integration and sync.
Configure optional portable per-project lower-tier-attempt and delivery policy.
Large-initiative coordinator for KB workflows. Use for app migrations, framework rewrites, major architecture changes, multi-subsystem initiatives, multiple brainstorms/manifests, long backlogs, or queued execution across related workstreams.
Internal post-work quality and learning phase. Runs kb-review -> resolution gate -> follow-up resolution -> proof/demo evidence -> compound -> learn -> evolve -> memory refresh/compact -> cleanup after kb-work finishes all slices. Normally invoked by kb-work or kb-complete; not the primary user-facing completion command.
Deprecated compatibility alias for kb-complete. Use when an older prompt or workflow says 'kb finish'; delegate the same input to kb-complete and report the kb-complete result.
Functional-test strategy and test-quality audit for KB workflows. Use when deciding whether a slice needs functional/e2e/browser/API workflow tests, when existing tests may be mocked theater, or when user-visible behavior must be verified without manual QA.
| name | kb-models |
| description | Inspect live routes and manage optional user-local OpenAI-compatible/LiteLLM extra routes through the kbrouter CLI. |
| argument-hint | [show|doctor|discover|select|configure optional routes] |
Use kbrouter models to inspect live routes and configure optional user-local
extras. The current master automatically chooses host-native models; this skill
does not maintain a native model list or assign native models to planner tiers.
Resolve the router once per session without crawling the filesystem: use
kbrouter/kbrouter.exe when command -v/Get-Command succeeds; otherwise
use $HOME/.kb/bin/kbrouter on POSIX or $HOME\.kb\bin\kbrouter.exe on
Windows when present and executable. If neither exists, report
router-unavailable: binary-not-found; do not auto-download, auto-build, or
search sibling repos/drives. A custom installer --router-dir must be placed
on PATH. Use the resolved executable for all commands below.
Ordinary kb-start, planning, and work automatically discover host-native
routes and any already-configured eligible extras. Do not offer route setup,
create catalogs, or ask connection questions during normal startup.
When the user explicitly asks to set up or add routes:
unknown unless explicitly declared self-hosted or provider-hosted.
Capability and policy metadata keep conservative defaults; never put
connection values or secrets in a plan or tracked project policy.automatic
(recommended), self-hosted-first, or native-first.Generic MCP model dispatch is not implemented. Do not offer or claim it until a versioned dispatch adapter and conformance fixtures exist.
When a user asks to add local models, keep it to one concrete route at a time. Ask only for the missing values needed by the command: alias, model ID, endpoint, and optional auth environment-variable name. Common defaults:
http://127.0.0.1:1234/v1http://127.0.0.1:4000/v1http://<host-or-ip>:4000/v1Use this template for a local route with no auth:
kbrouter models add --scope user --alias local.coder --model <model-id> --endpoint http://127.0.0.1:4000/v1 --hosting self-hosted --retention none --training-use no --trust-provenance "user-local LiteLLM"
Use this template when the endpoint requires a token. Store the token in the environment first; never put the token value in the command, docs, plans, or handoffs:
kbrouter models add --scope user --alias local.coder --model <model-id> --endpoint http://127.0.0.1:4000/v1 --auth-env LOCAL_LITELLM_API_KEY --hosting self-hosted --retention none --training-use no --trust-provenance "user-local LiteLLM"
For a private endpoint, route execution also needs attended project approval. Show the command and pause; do not answer the confirmation for the user:
kbrouter models approve --alias local.coder --project-root <project-root>
Then verify without mutation first:
kbrouter models doctor --project-root <project-root>
Use --probe only when the user explicitly wants a bounded live endpoint/model
presence check:
kbrouter models doctor --project-root <project-root> --probe
If the user wants local routes preferred for this project, save only the user-local source preference:
kbrouter models priority --project-root <project-root> --mode self-hosted-first
Leave the mode as automatic when the user has no strong preference. Do not
write endpoints, model IDs, auth env names, or trust approvals into tracked
project files.
kbrouter models show or kbrouter models doctor.kbrouter models discover --run-root <run-root> --current-model <id>.kbrouter models select --run-root <run-root> --run-id <id> --tier <small|medium|large> [--attempt-tier <next-lower-tier>] --task-family <id> --tool <id> --context-size <n> --risk <normal|broad> [--prefer self-hosted|native] [--override use|require|ignore --alias <alias>] --json. --tier is the planned correction/authority tier. --attempt-tier is a work-time request only and is never written into a planner manifest.kbrouter models add --scope user .... Production user state always lives under the operating-system user's ~/.kb; a repository cannot redirect credential-consuming commands to its own catalog.kbrouter models approve --alias <alias>. add --approve-endpoint is the one-step attended equivalent. Both require a live console confirmation bound to the canonical project path, route fingerprint, endpoint origin, auth environment-variable name, and expiry. Redirected/noninteractive approval is refused. Approvals have fixed expiries and live in user-local trust.json, never in the route catalog or project.kbrouter models revoke --alias <alias> or record a project-bound denial with kbrouter models deny --alias <alias>.kbrouter models priority --project-root <path> --mode automatic|self-hosted-first|native-first.kbrouter models ignore-routing --scope user|project.kbrouter models clear --scope user|project; reset is an alias.kbrouter models doctor is static and non-networked. Add --probe only for an attended, bounded endpoint/model-presence check.kbrouter models calibrate --alias <alias>; it is attended and does not dispatch inference.--attempt-tier or make a lower-tier attempt unless portable project policy
explicitly enables the pilot/opt-in and kb-work admits the slice.Trying Small for a bounded, objectively proved change; Medium correction fallback.show, doctor, or discover.use <model>, require <model>, and ignore model routing are
natural-language, run-scoped overrides passed to models select; they are
not kbrouter models use/require subcommands and are never persisted.use <model> overrides saved user-local project source preference for the run, tries that model first
when eligible, then keeps the ordinary safe fallback ladder.require <model> is a run-scoped exact pin: if unavailable, pause only that
slice instead of silently substituting another route. It bypasses any enabled
lower-tier attempt. It is the only hard pin, but never bypasses trust,
destination, retention, credential, tool, filesystem, or proof boundaries.prefer self-hosted (prefer local shorthand) or prefer native is a
run-scoped source preference inside trust, destination, authority, tools,
context, proof, and risk constraints.ignore model routing uses the current model and ordinary proof gates only;
it bypasses lower-tier attempts.kb-work decides whether a lower-tier attempt is safe before passing
--attempt-tier. The selector validates requested candidates; it never infers
eligibility from “code,” file extensions, price, or a declared model class.models.json as route configuration and trust.json as the separate approval boundary. Never infer or renew trust from catalog contents.show output are redacted. They may identify aliases/models and trust class, but never endpoints or auth environment-variable names.dispatch-qualified; only an
exact route-bound receipt linked to deterministic proof makes it
dispatch-proven and eligible for capability credit.