ai-toolkit-rules
Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…
Capability-aware model routing for Codex, Copilot, Claude and provider APIs. Triggers: model routing, model selection, reasoning effort, approved fallback, cost, escalation.
Claude Code
$ npx -y skills add softspark/ai-toolkit --skill model-routing-patterns --agent claude-code
Codex
$ npx skills add softspark/ai-toolkit --skill model-routing-patterns -a codex -y
Cursor
$ npx skills add softspark/ai-toolkit --skill model-routing-patterns -a cursor -y
Gemini CLI
$ npx skills add softspark/ai-toolkit --skill model-routing-patterns -a gemini-cli -y
GitHub Copilot
$ npx skills add softspark/ai-toolkit --skill model-routing-patterns -a github-copilot -y
OpenCode
$ npx skills add softspark/ai-toolkit --skill model-routing-patterns -a opencode -y
Windsurf
$ npx skills add softspark/ai-toolkit --skill model-routing-patterns -a windsurf -y
name: model-routing-patterns description: "Capability-aware model routing for Codex, Copilot, Claude and provider APIs. Triggers: model routing, model selection, reasoning effort, approved fallback, cost, escalation." effort: medium user-invocable: false allowed-tools: Read
Choose routes from measured quality, latency and cost under the user's approved model and spending policy. An explicit model choice overrides automatic routing. This skill never authorizes a model-tier, permission or budget change.
Apply the same policy across Codex, Copilot and Claude: retain the model selected by the native client. Provider API IDs, editor picker labels and agent aliases are separate namespaces; do not translate between them by resemblance. For a cross-provider application route, validate capabilities and availability on each provider, and obtain authorization before transferring data or changing spend. The project inventory is `kb/reference/model-compatibility.md`.
<!-- CLAUDE_CODE_ONLY_START -->
Apply this section only in Claude Code. Other clients use their native agents and keep their configured models and reasoning effort. Never call the Claude Codex plugin from Codex, Antigravity or another client.
Check availability before choosing an executor. The Codex route requires all three: the `codex@openai-codex` plugin is installed, effectively enabled for the current project, and `codex:codex-rescue` is callable through the current Agent tool. The toolkit SessionStart hint checks local metadata only; it does not prove runtime availability, authentication, model access or security access. An existing cache directory alone is insufficient. If the hint is absent, verify those conditions from the client's plugin status and agent catalog.
When unavailable or disabled, use installed native agents with their configured models and effort. Do not install or enable a plugin, force a Codex command, or change the current session's model to satisfy this policy. If delegation itself is unavailable, do the authorized work in the current session and report that limitation. Explicit user model choices always take precedence.
The toolkit's Claude defaults use these roles when available:
| Work | Executor | |------|----------| | Planning, coordination and acceptance | Native orchestrator, Opus `high` | | Bounded implementation, tests and routine fixes | Native implementation agent, Sonnet `high`, or the available Codex plugin | | Defensive source and configuration review | For an approved read-only review, use available Codex `gpt-6.2-astra` at `xhigh`, or the configured native security auditor | | Hard debugging | Available Codex at `xhigh`, or the native debugger, Opus `xhigh` |
Use Codex proactively for substantial independent implementation or diagnosis; do not require a failure first, and keep trivial edits with the current executor. Retain the native domain role, file ownership and review criteria when selecting the Codex executor. If the selected model is unavailable, report it. A native auditor can review the same source under the same scope when the approved routing policy permits it. An access denial or safety refusal ends that route.
Dispatch with `Agent(subagent_type="codex:codex-rescue", prompt="--fresh ...")`. Include the task, working directory, owned paths, relevant evidence, acceptance criteria and verification commands. For the approved defensive review, request read-only source inspection, mitigations and isolated regression-test suggestions. Pass `--model gpt-6.2-astra --effort xhigh` for that review, or `--effort xhigh` for hard debugging. Ordinary coding keeps the configured Codex model and effort unless the user chose otherwise. These flags control the Codex worker, not the Sonnet forwarding wrapper. Do not use the retired Spark alias or substitute a plugin command for the agent.
Request read-only work explicitly for audits or diagnosis; write access is appropriate only for an authorized implementation task. Codex's sandbox and approval restrictions still apply. Permission or authentication failures return to the supervisor; they do not authorize bypasses or a new account/provider. Keep the review within the auditor's defensive scope and existing permissions. Preserve the caller's restrictions and report any unavailable capability.
The supervisor owns lifecycle and verification. A background job identifier is not completion: collect the final result using the plugin's documented status and result controls, keyed to that job. Resume only the identified prior task; use a fresh task for independent work. Empty output, failed startup and partial results are failures to resolve, not successful delegation. Do not redispatch failed writes until their partial changes have been inspected. Verify the diff, tests and required review before acceptance, then finish or cancel owned work. The forwarding wrapper must only forward; do not ask it to inspect or monitor.
When creating agents, keep native Claude model fields valid. Codex is a separate executor, not a Claude `model:` value or an automatic Claude Team member. Reuse the installed plugin instead of generating another wrapper or editing its cache. <!-- CLAUDE_CODE_ONLY_END -->
| Model | Claude API ID | API effort default | |-------|---------------|--------------------| | Claude Opus 5.5 | `claude-opus-5-5` | `medium` | | Claude Fable 5.2 | `claude-fable-5-2` | `high` | | Claude Sonnet 5.5 | `claude-sonnet-5-5` | `high` | | Claude Haiku 5.5 | `claude-haiku-5-5` | `medium` |
Codex lists `gpt-6.2-astra` for demanding work and `gpt-6.2-sol` for everyday coding. `gpt-6.1-terra` covers writing, visual understanding and computer use, and `gpt-6-luna` covers focused tasks. Earlier Astra and Sol models remain listed. Check the account's model picker for actual availability.
These are dated identifiers, not a runtim
AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling.
Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…
Searches past coding sessions for observations, decisions, context. Triggers: mem-search, recall session, past work, prior…
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG, EAA, ARIA, contrast, keyboard, screen…
Creates new specialized agents with frontmatter, tools, delegation. Triggers: new agent, create agent, agent scaffold,…
Analyzes code quality, complexity, patterns across codebase. Triggers: quality report, hotspot scan, code analysis, architecture…
API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.