本文へ移動
cccskills
無料GitHub で公開

openrouter

Choose OpenRouter models and routers, query live catalog data, use structured outputs and batch inference, and debug routing with metadata. Use when working with OpenRouter APIs, openrouter/auto, openrouter/free, model discovery, pricing, providers, batch jobs, or structured JSON responses.

インストール方法を見る

含まれるファイル(14)

  • SKILL.md5.0 KB
  • references/batch.md1.7 KB
  • references/models-scripts.md2.3 KB
  • references/routing.md2.9 KB
  • references/SOURCE.md468 B
  • scripts/.gitignore14 B
  • scripts/compare-models.ts3.6 KB
  • scripts/get-endpoints.ts3.3 KB
  • scripts/lib.ts2.3 KB
  • scripts/list-models.ts1.3 KB
  • scripts/package-lock.json16.0 KB
  • scripts/package.json129 B
  • scripts/resolve-model.ts4.9 KB
  • scripts/search-models.ts1.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

openrouter

One API for hundreds of models. Prefer live catalog data over memory; model IDs and prices change.

Core Principles

  • Resolve informal names with scripts/resolve-model.ts before coding against a slug.
  • Prefer a concrete model when quality, cost, or providers must be fixed. Use openrouter/auto when the task type varies. Use openrouter/free only for zero-cost experiments.
  • Singular model picks one slug (or router). Plural models: [...] is the fallback chain — different field, different behavior.
  • Pay the selected model's rate for routers — no router surcharge. Default auto cost band is roughly low if unset.
  • Send HTTP-Referer and X-Title on app requests (OpenRouter app attribution). Opt in to routing visibility with X-OpenRouter-Metadata: enabled. Cache hits omit metadata.
  • Filter for capabilities (tools, structured_outputs, modalities) before picking a model; pin with provider.require_parameters when the feature is mandatory.
  • Batch is for async bulk work (24h window, ~50% token pricing). Sync API for streaming, multimodal base64, and OpenRouter-orchestrated web search.

When to Use

  • Pick, compare, or price models on OpenRouter
  • Wire openrouter/auto, openrouter/free, fallbacks, or provider prefs
  • Structured JSON (response_format / json_schema)
  • Submit or poll Batch API jobs
  • Debug which model/provider actually served a request

When NOT to Use

  • Non-OpenRouter providers or local-only inference
  • Model vibe-checks / launch-day evals → model-bench
  • Deep product research unrelated to OpenRouter APIs

Implementation Guide

  1. Auth: OPENROUTER_API_KEY from https://openrouter.ai/keys — required for chat/batch; optional for most model list scripts; required for get-endpoints.ts.
  2. Discover models: from this skill’s scripts/ directory, run npm install once, then follow references/models-scripts.md. Or GET https://openrouter.ai/api/v1/models with filters (sort, supported_parameters, output_modalities).
  3. Route the request:
    • Fixed slug: resolve live, then set model
    • Auto: model: "openrouter/auto" + optional plugins: [{ id: "auto-router", cost_tier, allowed_models, excluded_models }]
    • Free pool: model: "openrouter/free" (or slug:free for a specific free variant)
    • Fallbacks: models: ["primary", "backup", ...] — not the model field
    • Multi-turn auto: pass session_id (or rely on message fingerprint) for model/provider stickiness
  4. Structured outputs: response_format: { type: "json_schema", json_schema: { name, strict: true, schema } }. Confirm structured_outputs on the model; use require_parameters: true to avoid unsupported endpoints. Non-streaming can use response-healing plugin.
  5. Observe: header X-OpenRouter-Metadata: enabled → openrouter_metadata (strategy, endpoints, attempts, pipeline). Auto task type lives at pipeline stage data task_type.
  6. Batch: see references/batch.md. JSON key order: endpoint, model, provider?, then requests.

Minimal auto + metadata pattern (agents get this wrong without the header + plugin id):

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "HTTP-Referer: https://your-app.example" \
  -H "X-Title: Your App" \
  -H "Content-Type: application/json" \
  -H "X-OpenRouter-Metadata: enabled" \
  -d '{
    "model": "openrouter/auto",
    "session_id": "conv-1",
    "plugins": [{"id": "auto-router", "cost_tier": "medium"}],
    "messages": [{"role": "user", "content": "Refactor this function for clarity"}]
  }'

Review Checklist

  • Model ID resolved from live catalog, not memorized
  • Required params present in supported_parameters (or require_parameters)
  • Router choice matches constraint needs (fixed vs auto vs free)
  • model vs models (fallback array) used correctly
  • Metadata enabled when debugging routing
  • Batch vs sync chosen for latency/modalities correctly

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

adhd

無料

Formats output for ADHD-friendly action — lead with the next step, number tasks, restate state, cut fluff. Use when named (adhd), when the user mentions ADHD or focus/executive-function constraints, or when they ask for steps they can execute immediately.

日本語の概要は準備中です。原文の説明を表示しています。

nateslabach/skills62026年9月29日 更新

Devil's-advocate attack on AI workflow designs — threat model, assumption challenges, code critiques, and hypothetical redesigns with no file edits. Use for "attack this design", devil's advocate, or hostile challenge on agents/tools/summarization/tokens. Not for PR peer review (code-review) or self-review that applies fixes (ai-systems-review). Prefer: this skill → decide → ai-systems-review.

日本語の概要は準備中です。原文の説明を表示しています。

nateslabach/skills62026年9月29日 更新

Hostile self-review of recently written AI workflow code that then applies fixes (agents, tools, chat context, summarization, tokens, attachments). Use after generating AI systems code, or when asked to self-review and harden it. Not for PR peer review (code-review) or no-edit devil's-advocate attacks (adversarial-challenge). Prefer: adversarial-challenge → decide → this skill.

日本語の概要は準備中です。原文の説明を表示しています。

nateslabach/skills62026年9月29日 更新

Writes in ASD-STE100 simplified technical English — short sentences, plain words, active voice. Use when the user wants terse technical prose, names this skill, or asks for STE100.

日本語の概要は準備中です。原文の説明を表示しています。

nateslabach/skills62026年9月29日 更新

branding

無料

Builds personal brand assets using Seth Godin's frameworks: signature symbol, slogan, surprise (Purple Cow), salient idea, and signature story. Use when named (branding), or when the user asks for a brand symbol, slogan, tagline, Purple Cow, counterintuitive angle, core idea, brand story, or personal brand positioning.

日本語の概要は準備中です。原文の説明を表示しています。

nateslabach/skills62026年9月29日 更新

Disables the AI's default hedging, diplomatic softening, and social-nicety layers to deliver cold, unfiltered, consequentialist analysis on any topic. Use when the user wants the AI's actual assessment without padding, regardless of how harsh or uncomfortable the honest answer is.

日本語の概要は準備中です。原文の説明を表示しています。

nateslabach/skills62026年9月29日 更新

nateslabach のスキルをすべて見る

このスキルの問題を報告する