agentproto/ts/ap-models-auth

Claude Code and agent skill by agentproto/ts

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Manage models, billing profiles, and spend on the agentproto daemon — catalog_models for runnable routes, auth_profile_create/import/set_models for named credentials, harness presets, usage_rollup for spend estimates. Trigger when asked about models, costs, billing, auth profiles, OpenRouter routing, or how much a session spent.

Install

npx vskill@latest install agentproto/ts/ap-models-auth

SKILL.md

The same SKILL.md was published earlier as agentproto/ts/ap-models-auth.

ap-models-auth

When to use

  • Before spawning: which models are actually runnable given the auth profiles on this host.
  • A spawn is rejected or bills through the wrong wallet — check/curate profiles.
  • "How much did we spend this week?" — rolling spend estimates.

Catalog: what is spawnable

json
// Spawnable routes, profile-aware runnable flags
catalog_models({ "adapter": "claude-code", "runnableOnly": true })
// → [{ "vendor": "z-ai", "product": "glm-5.2", "route": "openrouter", "runnable": true }, ...]
// Exhaustive per-provider list (for a picker UI)
catalog_provider_models({ "endpoint": "openrouter" })

Model identity is vendor/product with an optional @route for transport/billing — e.g. z-ai/glm-5.2@openrouter. The route is distinct from the product identity: the same product can exist on several routes with different cost/limits.

Auth profiles: named wallets

json
// What exists (non-secret metadata + keyStatus)
auth_profile_list({ "endpoint": "anthropic" })
// Import an existing credential discovered on this host (claude-code login, env vars, hermes config)
auth_discover_credentials({})
auth_profile_import({ "origin": "claude-code", "endpoint": "anthropic", "id": "anthropic-sub" })
// Create explicitly — the secret is stored, never echoed
auth_profile_create({ "id": "openrouter-env", "endpoint": "openrouter", "method": "api-key", "credential": "sk-or-..." })
// Curate: enable/disable; narrow to a model allowlist
auth_profile_set_enabled({ "id": "openrouter-env", "enabled": false })
auth_profile_set_models({ "id": "openrouter-env", "mode": "allow", "ids": ["z-ai/glm-5.2", "deepseek/deepseek-v4-pro"] })

Profiles are named — spawn with access: { "profileRef": "openrouter-env" } to bill through one. A disabled profile drops every model it would serve to non-runnable, immediately.

Harness presets: pin harness → profile + model

json
harness_preset_create({ "id": "hm-cheap", "harnessSlug": "hermes", "name": "Cheap",
"profileRef": "openrouter-env", "defaultModel": "z-ai/glm-5.2" })
harness_preset_list({ "harnessSlug": "hermes" })

A preset is what a fresh spawn uses when the caller pins neither profile nor model.

Spend: rolling estimates

json
usage_rollup({ "window": "5h", "groupBy": ["profile", "model", "harness"], "probe": false })

basis is always local-estimate: aggregated from per-session snapshots the daemon writes at every turn-end — not the provider's actual bill. Models with no catalog price surface in unpricedTokens rather than being fabricated as $0.

CLI

bash
agentproto models [adapter] # catalog for one adapter
agentproto usage rollup --window 5h

Gotchas

  • usage_rollup is an estimate from local snapshots — it can diverge from the provider's bill (queued turns, retries, unpriced models). Say "estimate" when quoting numbers.
  • Model identity is vendor/product[@route] — z-ai/glm-5.2 and z-ai/glm-5.2@openrouter are different routes with potentially different prices.
  • Auth profile credentials are never returned — only keyStatus, fingerprints, and last-4 digits. If a spawn fails auth, re-check keyStatus on auth_profile_list rather than trying to echo the secret.
  • harness_preset_create rejects a profileRef that does not exist or is disabled, and a defaultModel the profile's allowlist cannot service.
  • profileRef and defaultModel are optional. No profileRef = the harness bills on its own login (claude-code-cloud, or claude-code/codex logged in): a spawn through that default passes no access. No defaultModel = the vendor default (no model sent). A cloud spawn (claude-code-cloud) never resolves a profile or a default preset: it always runs on the daemon user's claude.ai login (a setup-token cannot create cloud sessions), while an explicit model does apply. No manifest signal says a harness has no own login, so a profile-less preset is accepted for every harness.
  • Curated allowlists (mode: "allow") drift as catalogs change — auth_profile_refresh_models re-syncs against the current catalog on demand, nothing does it automatically.

Pointers

  • agentproto — daemon overview.
  • ap-adapters — what each harness can reach; where its creds live.
  • ap-spawn-agent — attach access.profileRef / model at spawn time.
  • cheap-coders — routing to economic models through this machinery.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
10
Repository forks
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/agentproto/ts/ap-models-auth/badge)](https://verified-skill.com/skills/agentproto/ts/ap-models-auth)

Something wrong with this skill or its page? Tell us.