次のような場合に使用: Val(ユーザーが作成したプログラム)が外部サービスと連携するとき **対応サービス:** - チャットアプリ(Slack、Discord、Telegram) - 決済(Stripe) - 開発支援(GitHub、Gmail、Google Sheets) - データベース(Postgres/Supabase/Upstash/Neon) - ウェブ操作自動化(Playwright、Browserbase、Kernel、Steel) - ウェブスクレイピング(ウェブサイトからの自動データ抽出) - PDF生成 - プッシュ通知 - RSS - その他サードパーティAPI(外部企業が提供するサービス連携機能) **カバーする内容:** Val Townの使用ガイド取得、認証情報の入手、動作確認、認証情報の安全な保管、および利用可能なガイドのカタログ
Use when a val talks to an external service — Slack, Discord, Telegram, Stripe, GitHub, Gmail, Google Sheets, Postgres/Supabase/Upstash/Neon, browser automation (Playwright, Browserbase, Kernel, Steel), web scraping, PDF generation, push notifications, RSS, or any other third-party API. Covers the required workflow (fetch the Val Town guide, get credentials, test, store secrets) and the catalog of available guides.
valが外部サービスを使用する場合は、以下の手順に従ってください。 手順を省略したり、学習データの記憶だけを頼りに連携コードを書いたりしないでください。 Val Townのガイドには、プラットフォーム固有のパターンや必要な回避策が記載されており、学習データには含まれていない情報が含まれています。
最初にVal Townのガイドを取得する。
ガイドは https://docs.val.town/guides/ 以下に配置されていますが、スラッグは必ずしもサービス名だけとは限りません。カテゴリ配下にグループ化されているもの(例: databases/neon-postgres/、browser-automation/kernel/)や、サブページに存在するもの(例: slack/agent/)もあります。
URLを推測せず、https://docs.val.town/sitemap-0.xml にあるdocsのサイトマップを取得してください(すべてのdocs URLが一覧されています)。対象サービスに対応する guides/… のエントリを見つけ、連携コードを書く前にそのページを取得してください。
ユーザーが認証情報を取得できるよう支援する。 APIキーの作成ページへの直リンクや、OAuthセットアップの手順をステップごとに提供してください。ユーザーに自力で探させないでください。
最小限のスクリプトで接続をテストする。 機能を構築する前に、1件のレコードを返すだけのシンプルなfetch / SDK呼び出しで動作確認を行ってください。これにより、認証・セットアップの問題と機能上のバグを切り分けられます。
シークレットはenv varに保存する。
値の読み出しには Deno.env.get("KEY_NAME") を使用し、必要なenv varをREADMEに記載してください。そうすることで、ユーザーや(valをリミックスした)他の人が何を設定すべきかを把握できます。
ユーザーが設定する必要のあるenv varを参照する際は、Val TownのenvVar編集画面への直リンク(プリフィル済み)を、以下の形式で独立した行に記載してください(リンクテキストで隠さず、URLをそのまま表示してください。これが行動を促す手がかりとなります):
👉 KEY_NAME をここで追加: https://www.val.town/x/HANDLE/VAL_NAME/environment-variables?key=KEY_NAME
現時点で専用ガイドが存在するサービス(網羅的ではないため、最新情報は手順1のサイトマップを参照してください):
std/email を使用してください — email スキルを参照)std/sqlite を使用してください — sqlite-storage スキルを参照)std/oauth を使用してください)連携コードは、モデルがハルシネーションを起こしやすい場所の筆頭です。 APIは変化し、認証フローは見直され、プラットフォームの制約(ファイルシステムなし、サブプロセスなし)により、単純なアプローチは破綻します。 Val Townのガイドが、プラットフォーム上で現在動作するものに関する信頼できる情報源です。
When a val uses any external service, follow this order — do not skip steps and do not write integration code from training-data memory alone. Val Town's guides have platform-specific patterns and required workarounds that won't be in your training data.
https://docs.val.town/guides/, but the slug isn't always just the service name — some are grouped under a category (e.g. databases/neon-postgres/, browser-automation/kernel/) or live on a sub-page (slack/agent/). Don't guess the URL: fetch the docs sitemap at https://docs.val.town/sitemap-0.xml (it lists every docs URL), find the guides/… entry that matches the service, and fetch that page before writing any integration code.Deno.env.get("KEY_NAME") to read them, and document the required env vars in the README so the user (or anyone remixing the val) knows what to set. Whenever you reference an env var the user needs to set, show the raw, full URL to the prefilled Val Town env var editor on its own line, in this exact format: 👉 Add KEY_NAME here: https://www.val.town/x/HANDLE/VAL_NAME/environment-variables?key=KEY_NAME. Keep the URL visible (not hidden behind link text) — it's the call-to-action.Services with dedicated guides today — not exhaustive, so use the sitemap from step 1 as the current source of truth:
std/email instead — see the email skill)std/sqlite instead — see the sqlite-storage skill)std/oauth instead)Integration code is the most common place models hallucinate. APIs change, auth flows get reworked, and platform constraints (no filesystem, no subprocess) break naive approaches. The Val Town guide is the source of truth for what currently works on the platform.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。