Communityコーディング&開発github.com

モデルプロバイダの追加

非対話型のワンライナー設定でモデルプロバイダを追加し、ライブで検証します。機密情報を公開しません。

モデルプロバイダの追加 とは?

このスキルは、OpenClaw エコシステム内でモデルプロバイダ(OpenAI など)を安全かつ検証可能な方法で追加するためのものです。API キーやシークレットは決して画面に表示したりディスクに永続化したりせず、`SecretRef`(環境変数またはファイル参照)としてのみ設定に組み込みます。設定の変更はすべて `openclaw config` コマンドを通じて行われ、即座にバリデーションと監査が行われます。また、プロバイダの追加後には `openclaw agent` または `openclaw infer model run` を使用したライブテストが自動実行され、設定が正しく動作することを確認します。このスキルは CLI ベースの OpenClaw 環境で動作し、`doctor --lint` による診断やプラグイン管理(例: codex ハーネスプラグインの有効化)も含まれており、CI/CD パイプラインや非対話型の自動セットアップに最適です。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/custodian-skills/add-model-provider

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

モデルプロバイダを追加する

シークレットの値を決して表示したり永続化したりしないでください。認証情報は SecretRef(環境変数またはファイルソース)としてのみ設定に入力されます。ディスク上の設定ファイルを手動で編集しないでください。すべての変更は openclaw config を通じて行われ、バリデーションと監査が行われます。すべての実行は、確認可能な Prove 結果、または証明できなかった理由の正確な説明で終了します。

セッション内の config_set/config_set_ref ツールアクションは、models.* および secrets.* に対してポリシーでブロックされています。以下のコマンドには信頼できるシェル(exec)を使用してください。set_default_model は、デフォルトルートを変更することが許可されている唯一のセッション内アクションであり、保存前にライブテストを実行します。

情報収集

openclaw config get models --json          # 初回セットアップ前は "Config path not found" が通常です
openclaw models list --agent <agentId>     # マルチエージェントロスターでは --agent が必要です
openclaw models auth list --agent <agentId>
openclaw config schema --json | jq '.properties.models'   # 書き込み前に正確なプロバイダパスを確認します
openclaw plugins list   # OpenAI ルートには codex ハーネスプラグインが必要です。今すぐ有効化/インストールしてください。証明の途中では行わないでください

ターゲットプロバイダのハーネスプラグインがないか無効な場合は、ここで対処してください(openclaw plugins enable codex または openclaw plugins install @openclaw/codex)。これにより、後で Prove ステップが停止しなくなります。プラグインの有効化はゲートウェイのホットリロードで認識されます。

認証契約を決定します。API キープロバイダは models.providers.<id>.apiKey に対する SecretRef を受け取ります。サブスクリプション/OAuth プロバイダ(ChatGPT/Codex、Claude サブスクリプション)は代わりに openclaw models auth login --provider <id> を使用し、API キーパスを指定してはいけません。

変更

API キーの例(OpenAI)、キーはオペレーターによって 0600 ファイルにステージングされています。まず --dry-run で検証してから書き込みます:

openclaw config set secrets.providers.openai_key_file --provider-source file --provider-path /path/to/openai.key --provider-mode singleValue --dry-run
openclaw config set secrets.providers.openai_key_file --provider-source file --provider-path /path/to/openai.key --provider-mode singleValue
openclaw config set models.providers.openai.apiKey --ref-provider openai_key_file --ref-source file --ref-id value

ゲートウェイプロセスの環境変数にキーがある場合の代替手段:

openclaw config set models.providers.openai.apiKey --ref-provider default --ref-source env --ref-id OPENAI_API_KEY

デフォルトのモデルを変更するには、セッション内アクション set_default_model を使用します(デフォルト以外のエージェントの場合は agentId を指定)。保存前にルートをライブテストします。生の設定書き込みでデフォルトを変更しないでください。

修復

openclaw doctor --lint

doctor --lint は exit code 1 で終了して問題を報告することがあります。レポートを読んで残りのチェックを続行してください。通常の doctor および doctor --non-interactive は設定/状態を書き込む可能性があります。承認前に診断に使用しないでください。修復が必要な場合は、明示的な承認を得てから openclaw doctor --fix --non-interactive を実行し、その後 Gather リードを再実行してください。

証明

ロスターセーフなテスト(すべてのセットアップで動作します。自分のエージェント ID または設定済みの任意のエージェントを使用してください):

openclaw agent --agent <agentId> --model openai/gpt-5.4 -m "厳密に "PROVIDER-PROOF-OK" と返信してください"

シングルエージェントインストールでは、代わりに軽量な補完テストを使用できます。これには --agent フラグがなく、マルチエージェントロスターでは "no explicit owner" で失敗するため、そこで再試行しないでください:

openclaw infer model run --gateway --model openai/gpt-5.4 --prompt "厳密に "PROVIDER-PROOF-OK" と返信してください"

要求された正確な応答が返ってくることを期待します。モデル ID と実時間を記録します。既知の依存関係: OpenAI ルートは実行時に codex ハーネスプラグインを必要とします。テストがランタイムが利用できないことを報告した場合は、openclaw plugins install @openclaw/codex を実行してゲートウェイを再起動し、再度テストしてください。

報告

追加したプロバイダ、書き込んだ SecretRef パス(値は絶対に含めない)、モデル ID とレイテンシを含むテスト結果、およびデフォルトのモデルが変更されたかどうかを報告します。テストが失敗した場合は、正確なエラーと次に試すべきコマンドを報告してください。

詳細については、https://docs.openclaw.ai/providers/models および https://docs.openclaw.ai/providers/openai を参照してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

claw-score

Audit or refresh OpenClaw maturity scorecard docs from root taxonomy, maturity scores, and QA evidence artifacts without using maintainer discrawl data or committed inventory reports.

関連スキル