Connect Openrouterのロゴ

Connect Openrouter

組織
Senuto
connect-openrouter

Step-by-step guide to connect OpenRouter API so you can use LLM-powered skills (SERP clustering with cluster naming, PAA question clustering, semantic clustering). Use when user says "connect OpenRouter," "set up OpenRouter," "OpenRouter setup," "OpenRouter API key," or "how to connect to OpenRouter." No API cost — setup only.

概要

公開者Senuto
リポジトリnodeshub-seo-skills
スキル名connect-openrouter
スター
41
フォーク
7
同梱ファイル
1
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    SenutoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Connect Openrouter」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Senuto/nodeshub-seo-skills/tree/main/.claude/skills/connect-openrouter
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Senuto/nodeshub-seo-skills.git /tmp/nodeshub-seo-skills
mkdir -p .claude/skills
cp -r /tmp/nodeshub-seo-skills/.claude/skills/connect-openrouter .claude/skills/connect-openrouter
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでConnect Openrouterを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にConnect Openrouterを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Connect Openrouterは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Connect with OpenRouter

First action: Run the banner:

bash
python3 -c "import sys; sys.path.insert(0,'.claude/skills/nod-nodeshub-api/scripts'); from banner import print_banner; print_banner('Connect OpenRouter')"

Walk the user through connecting OpenRouter so they can use LLM-powered features in skills like nod-serp-clusters and nod-paa-miner. Do it step by step, asking for confirmation before continuing.

⛔ CRITICAL SECURITY RULE — NEVER ASK THE USER TO PASTE THE API KEY INTO CHAT

Anything the user types into the chat leaves their machine — it's sent to the LLM provider, written to local session logs (~/.claude/projects/<slug>/*.jsonl) in plain text, and may appear in telemetry, backups, or IDE sync. A secret that touches the chat context is a leaked secret. An OpenRouter key with credit attached can be burned by anyone who gets it.

You MUST:

  • Never write "paste it here," "paste the key," "send me the key," or similar.
  • Never offer to save a key the user pastes.
  • If the user pastes a key anyway, stop, refuse to use it, tell them the key is now compromised and they should revoke it at openrouter.ai/keys immediately, then re-run setup with a new key saved locally.

The user saves the key themselves (Step 2). You only read the file afterwards to verify.

Privacy: The API key is stored in .claude/settings.local.json (gitignored).


Step 0: Check if OpenRouter is already connected

Run:

bash
python3 -c "
import sys, os
sys.path.insert(0, '.claude/skills/nod-nodeshub-api/scripts')
from openrouter_client import _load_key_from_settings
key, source = _load_key_from_settings()
if key:
    print(f'OpenRouter key found in {source}')
    print(f'Key: {key[:12]}...')
    print('Already connected.')
else:
    print('No OpenRouter key found.')
"
  • If key found: Ask the user: "OpenRouter is already connected. Do you want to change the key or are you done?"
  • If no key: Continue with Step 1.

Step 1: Get your API key

Tell the user — do not ask them to paste anything here:

  1. Open openrouter.ai/keys.
  2. Sign in (Google, GitHub, or email).
  3. Click "Create Key".
  4. Copy the key (starts with sk-or-v1-...).

Pricing: OpenRouter is pay-per-use. Most skills use google/gemini-2.5-flash-lite which costs fractions of a cent per call. Add $5 credit to start — it lasts a long time for cluster naming.

Then say: "Copy the key to your clipboard. Do not paste it into this chat. Go to Step 2."


Step 2: The user saves the key locally (NOT via chat)

Give the user these two options. They run one themselves — you never see the key.

Option A — one-line terminal command (recommended):

Tell the user to open their terminal in the repo root, prepend a space (so it's skipped by shell history if HISTCONTROL=ignorespace/ignoreboth is set), paste their key in place of <paste-your-key-here>, and run:

bash
 python3 .claude/skills/nod-nodeshub-api/scripts/save_openrouter_key.py "<paste-your-key-here>"

This saves the key to .claude/settings.local.json under env.OPENROUTER_API_KEY and runs a quick verification call.

If their shell doesn't respect ignorespace, they can run history -d <n> afterwards to wipe that line.

Option B — edit the file manually:

Tell the user to open .claude/settings.local.json in their editor and add/merge:

json
{
  "env": {
    "OPENROUTER_API_KEY": "<paste-your-key-here>"
  }
}

Reply "done" (not the key) when saved.

Expected output:

Saved OpenRouter API key to .claude/settings.local.json
Test response: OK
Setup OK.

If verification fails: Check that the key is correct and has credit. The test call uses ~1 token.

Ask: "Did you see 'Setup OK'? If you see any error, paste it here."


Step 3: Verify with a real skill

Suggest a quick test:

bash
# Quick test: cluster 3 keywords (costs ~1 NodesHub token + tiny OpenRouter cost)
python3 .claude/skills/nod-serp-clusters/scripts/cluster.py \
  --keywords "seo tools,keyword research,serp analysis" \
  --output /tmp/test-cluster \
  --levels 1

Or if they don't have NodesHub tokens, test OpenRouter directly:

bash
python3 -c "
import sys
sys.path.insert(0, '.claude/skills/nod-nodeshub-api/scripts')
from openrouter_client import OpenRouterClient
client = OpenRouterClient()
print(client.chat('Name this group of topics in 2-3 words: SEO, keywords, SERP analysis'))
"

Summary

  • Get key: openrouter.ai/keys → Create Key → copy.
  • Save: python3 .claude/skills/nod-nodeshub-api/scripts/save_openrouter_key.py "sk-or-v1-..." — saves to gitignored .claude/settings.local.json.
  • Used by: nod-serp-clusters (cluster naming), nod-paa-miner (question clustering), semantic clustering.
  • Default model: google/gemini-2.5-flash-lite — fast and cheap.

Which skills need OpenRouter?

SkillRequired?What for
nod-serp-clustersYesLLM names each cluster
nod-paa-miner --clusterOptionalGroups questions by topic
Semantic clusteringYesEmbeddings + cluster naming

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Connect Openrouter」では何ができますか?

Step-by-step guide to connect OpenRouter API so you can use LLM-powered skills (SERP clustering with cluster naming, PAA question clustering, semantic clustering). Use when user says "connect OpenRouter," "set up OpenRouter," "OpenRouter setup," "OpenRouter API key," or "how to connect to OpenRouter." No API cost — setup only.

TypingMindでConnect Openrouterを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Connect Openrouterはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにConnect Openrouterをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Senuto/nodeshub-seo-skills/tree/main/.claude/skills/connect-openrouterを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Connect Openrouterを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Connect Openrouterで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもConnect Openrouterを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Connect Openrouter」は無料ですか?

SenutoがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇