本文へ移動
cccskills
無料GitHub で公開日本語紹介

secrets

外部サービスとの接続に必要なAPIキーやOAuth認証情報を、所有者や利用範囲に応じて登録・参照し、安全に扱うためのルールを示すスキルです。

原文原文の説明を見る

Connect external services and keep app credentials scoped. Use before adding an API key, OAuth connection, provider setup, or server-side request that needs a user's or workspace's credential.

BuilderIO/agent-nativeスター 7,526(GitHub 7,526 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 外部サービスのAPIキーを登録したいとき
  • OAuth接続をアプリに追加したいとき
  • サーバー側で認証情報を参照したいとき
  • 認証情報のスコープを決めたいとき

日本語での紹介

できること

外部サービスに接続するとき、認証情報の所有者と利用範囲を整理し、適切な接続方法を選ぶためのルールを示します。まず既存のワークスペース接続を確認し、OAuthでは共通の認可・トークンフローを使います。アプリ独自のAPIキーが必要な場合は、共有のSecrets機能に登録し、user・org・workspaceの中から必要最小限のスコープを選びます。認証情報はサーバー側のアクションやヘルパーでリクエストのユーザー・組織情報に基づいて参照し、必要なプロバイダーへのリクエストにだけ渡します。

こんなときに便利

APIキー、OAuth接続、プロバイダー設定を追加するときや、ユーザーまたはワークスペースの認証情報を使うサーバー処理を作るときに役立ちます。認証情報をどこに登録し、どう読み出すかを実装前に確認したい開発者にも向いています。

使い方の例

  • 「このアプリで使うAPIキーを適切なスコープで登録して」
  • 「OAuth接続を追加する方法を確認して」
  • 「サーバーアクションで認証情報を安全に参照して」

注意点

アプリのサーバーモジュールから共有Secrets機能を使います。ユーザーやワークスペースのキーを環境変数から読んだり、クライアント側の状態、ログ、エラー文などに含めたりしないでください。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md3.5 KB

SKILL.md(原文)

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

Secrets

Rule

Credentials belong to the user, organization, workspace, or deployment that owns them. Reuse the strongest shared connection or credential flow available; never copy a value into app code or client-visible state.

Choose the credential source

  1. Check the workspace connection catalog first. If the provider is already connected, request the app grant and resolve its vault-backed credential reference through the workspace-connection API.
  2. For OAuth, use the shared authorization and token flow. Do not store access or refresh tokens as ordinary settings or API-key values.
  3. If the app truly needs its own API key, register it with the shared secrets surface. Do not build a parallel key form or storage table.
  4. Use deployment configuration only for a secret owned by the deployed app, such as a webhook verification secret. LLM inference keys are an app-owned exception: self-hosted apps may use provider keys from deployment env as a shared fallback, while scoped user or organization keys take precedence. Hosted-workspace deployments backed by a shared database must not share those env keys across apps or tenants. This exception does not authorize using env credentials to access user-owned provider data.

Register an app-local API key

Register the key once so Settings can manage it and the app can describe why it is needed. Supported scopes are user, org, and workspace; choose the narrowest scope that matches who owns the credential and how the app resolves it. Put the registration in a server module imported by a loaded server plugin.

import { registerRequiredSecret } from "@agent-native/core/secrets";

registerRequiredSecret({
  key: "EXAMPLE_SERVICE_API_KEY",
  label: "Example service API key",
  description: "Connects this app to the example service.",
  docsUrl: "https://example.com/api-keys",
  scope: "user",
  kind: "api-key",
  required: true,
});

Use kind: "oauth" for an OAuth-backed connection and set oauthProvider and oauthConnectUrl for the shared Connect flow. Set required only when the app cannot perform its primary workflow without that connection. A validator may check a key before save; never log or include the value in a validation error.

Resolve credentials on the server

Resolve credentials only inside server-side actions or server helpers, using the request's user and organization context. Keep a missing key separate from a failed credential-store lookup: ask the user to connect the provider only when the credential is absent; make a store failure retryable.

For an app-local key, use resolveSecretDetailed() from @agent-native/core/server in the request context. Check lookupFailed before checking value; do not turn a failed lookup into a setup prompt.

Never read a user's or workspace's API key from process.env, or add a raw environment fallback to a scoped lookup. Do not put credentials in action arguments or results, agent messages or hidden context, application state, browser storage, client bundles, logs, or error text. Send them only in the provider request that needs them, and redact provider responses before returning an error.

Related skills

  • security — protect access to app data and external requests.
  • actions — expose server-side operations to both the agent and UI.

レビュー

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

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

a2a-assets

無料概要あり

複数のアプリやMCPホストからブランド画像・動画を生成、調整、書き出し、挿入する作業を支援します。ライブラリ選択や修正依頼も扱います。

  • スライド用のブランド画像を作りたいとき
  • 既存素材をフィードバックに合わせて直したいとき
  • 動画素材を生成して書き出したいとき
BuilderIO/agent-native7,5262026年10月26日 更新

account-health

無料概要あり

特定の顧客企業について、契約と製品利用の数値を照らし合わせ、根拠や不足情報を明記した健全性レポートをまとめます。

  • 顧客の健全性を確認したいとき
  • 契約席数と実利用を比べたいとき
  • 更新前に利用状況を整理したいとき
BuilderIO/agent-native7,5262026年10月26日 更新

actions

無料概要あり

アプリの操作をエージェントと画面の両方から呼び出せるアクションとして実装し、API連携や画面のデータ取得を一貫した形で追加するスキルです。

  • 新しいアプリ操作を追加したいとき
  • 外部APIと連携したいとき
  • 画面からデータを取得したいとき
BuilderIO/agent-native7,5262026年10月26日 更新

adding-a-feature

無料概要あり

新機能をUI・エージェント用アクション・説明資料・画面状態の4領域でそろえ、利用者とエージェントのどちらからも一貫して使えるようにするチェックリストです。

  • 新機能追加の作業範囲を整理したいとき
  • UIとエージェント操作をそろえたいとき
  • 画面状態の同期漏れを防ぎたいとき
BuilderIO/agent-native7,5262026年10月26日 更新

adhoc-analysis

無料概要あり

複数のデータソースを照合して、傾向や指標、根拠をまとめた分析結果を作成します。必要に応じて、再実行できるダッシュボードとして保存できます。

  • 商談と通話記録を照合したいとき
  • 顧客の利用状況を横断して調べたいとき
  • 繰り返し更新できる分析を保存したいとき
BuilderIO/agent-native7,5262026年10月26日 更新

admin-surfaces

無料概要あり

Analyticsの管理画面で、機能フラグの状態確認と切り替え、ダッシュボード利用状況の調査、接続先アプリのデータベース管理を行います。

  • アプリごとの機能フラグを確認・変更したいとき
  • ダッシュボードの所有者や利用状況を調べたいとき
  • 接続済みアプリのテーブルを管理したいとき
BuilderIO/agent-native7,5262026年10月26日 更新

BuilderIO のスキルをすべて見る

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