/ktms:integratefrom Keystone (KTMS)
Migrates service LLM calls from vendor SDKs (OpenAI, Anthropic, Gemini) to the self-hosted Keystone gateway. Covers client module setup, key management, effort-based routing, attribution, error handling, and testing.
Ships in Keystone (KTMS). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keystone speaks the OpenAI wire format on HTTP /v1, the Anthropic Messages API on
/v1/messages, and its own gRPC API on :9090. A service
needs a client key (ktms_…, scope generate) and the gateway's address; it never names vendor
models, it asks for an effort and Keystone's rules pick the chain.
ktms MCP server is connected, call health and list_models to see what is
served; otherwise ktms health and ktms models list.ktms keys mint NAME --team org/team, or the
MCP tool mint_key with write tools on). It is shown once: it goes into the secret store,
never into the repository or this chat.KTMS_BASE_URL (or KTMS_GRPC_ADDR) and KTMS_API_KEY from the environment; add both to the
example env file and the deployment config./v1, its key
the KTMS key, and metadata.user_id is the attribution.auto (a judge picks the effort), auto:low|medium|high, or
auto:<placement>:<effort> with placement nodes-first, nodes-only, cloud-first,
cloud-only. In gRPC set effort. An exact model id bypasses the rules; embeddings always need
one.user becomes user_id (per-user limits and reports); metadata.action_id
names the call site as <service>.<feature> in usage reports. gRPC has attributes and
action_id.max_tokens (gRPC max_output_tokens); keep structured output with
response_format json_schema.Retry-After on 429, back off on 503, never retry configuration errors
(no_capable_model, no_vendor_key, not allowed for key).X-KTMS-Rule, X-KTMS-Vendor and the response's model (the model that answered) at
debug level.Retry-After, a 503 and a 502.ktms route explain NAME --effort low --attr k=v (or the MCP tool explain_route) for each
effort the service uses: the chain must not end in no_vendor_key.ktms chat --effort low "hello" with the service's key shows the rule and vendor that served it.Sources: OpenAI-compatible HTTP API, Anthropic Messages API, Calling Keystone, Error contract.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/assessSurvey the system you run in - its services and their LLM calls, deployment, data stores, secrets, observability and GPUs - and explain how Keystone (KTMS) fits into it - where it runs, what each service changes, what it brings and costs here, and which skill to run next. Read-only. Use when asked whether or how KTMS fits a project, an infrastructure or a machine, or where to start with KTMS./configureConfigure Keystone (KTMS) routing from a plain description - models and prices, rules per effort with fallbacks, client keys and policies, vendor keys, spend limits, teams - as a ktms config file planned and applied with ktms config or the ktms MCP tools. Use when asked to add a model, change routing, set limits or keep KTMS configuration in a repository./deploynpx claudepluginhub ai-process/ktms --plugin ktmsOther plugins' skills for the same job