Windmillに新しいTriggerCrud型のトリガーを追加する際、バックエンドからCLI、画面、同期やキャプチャ機能まで必要な変更箇所を確認できる開発チェックリストです。
- 新しい外部サービスのトリガーを追加したいとき
- 実装箇所の抜け漏れを点検したいとき
- トリガー追加のPR前に検証したいとき
Windmillで外部サービスの接続情報や設定をリソースとして管理し、秘密情報を変数参照で扱うためのスキルです。
MUST use when managing resources.
実行スコア 未検証
インストール方法を見るWindmillで、データベースや外部サービスへの接続情報をリソースとして管理するためのスキルです。リソースファイルの形式や必須項目を確認し、PostgreSQL、MySQL、Slack、S3、HTTP/API、Kafka、NATS、MQTTなどの設定例に沿って内容を組み立てます。パスワードやAPIキーなどの秘密情報はファイルに直接書かず、Windmillの変数に保存して $var:<path> で参照します。スクリプトやフローの実行引数では、リソースや変数を $res:<path>、$var:<path> の文字列として渡す方法も扱います。既存の型が合わない場合は、カスタムリソース型の定義方法を確認できます。
Windmillのワークスペースで接続設定を整理したいときや、スクリプト・フローから保存済みの資格情報を安全に参照したいときに向いています。OAuthリソースや独自の接続型を扱う際の形式確認にも使えます。
秘密情報はリポジトリ内のファイルに平文で保存せず、ワークスペース上の秘密変数として作成し、そのパスを参照します。参照先の変数やリソースを実行時の実行者が読み取れない場合、ジョブは失敗します。リソースのデプロイはリモート状態を変更するため、明示的に依頼された場合に限ります。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Resources store credentials and configuration for external services.
Resource files use the pattern: {path}.resource.json
Example: f/databases/postgres_prod.resource.json
{
"value": {
"host": "db.example.com",
"port": 5432,
"user": "admin",
"password": "$var:g/all/db_password",
"dbname": "production"
},
"description": "Production PostgreSQL database",
"resource_type": "postgresql"
}
value - Object containing the resource configurationresource_type - Name of the resource type (e.g., "postgresql", "slack")An agent, as the Agents page lists it, is a resource of type ai_agent. Its value holds the
agent's provider, system prompt, tools and memory settings, and a flow step uses a saved agent by
linking its path.
Reference variables in resource values:
{
"value": {
"api_key": "$var:g/all/api_key",
"secret": "$var:u/admin/secret"
}
}
Reference formats:
$var:g/all/name - Global variable$var:u/username/name - User variable$var:f/folder/name - Folder variableNever put a secret (password, API key, token) inline in a resource value. Store it in a secret variable and reference that variable as $var:<path>.
$var:<path> is a reference, not a value: it resolves to the variable's value at run time. Never invent a value for a variable..variable.yaml holding it would be committed. Ask the user to create the secret on the workspace instead, e.g. wmill variable add '<value>' <path> (a secret by default), then reference it by path.Reference other resources:
{
"value": {
"database": "$res:f/databases/postgres"
}
}
A script or flow argument typed as a resource (schema format: resource-<type>) is passed as
the bare string $res:<path> — the whole argument value. Same for a variable, with
$var:<path>. This applies everywhere job arguments are supplied: wmill script run/preview,
wmill flow run/preview, the runScriptByPath / runFlowByPath API, a schedule's args, a
trigger's configured static args.
{
"db": "$res:f/databases/postgres_prod",
"api_token": "$var:g/all/api_token"
}
The reference is resolved when the job runs, under the job's run-as identity — the caller for an ordinary run, but the configured principal for a schedule, a trigger, or a runnable set to run on behalf of someone else. The run fails if that identity cannot read the referenced resource or variable.
Never wrap it in an object. The resolver only rewrites a JSON value that is a string
starting with $res: / $var:; keys are never inspected. These are all wrong and are passed
through to the script unchanged:
{ "db": { "$res": "f/databases/postgres_prod" } }
{ "db": { "resource": "f/databases/postgres_prod" } }
{ "db": "f/databases/postgres_prod" }
The string may sit anywhere a string can — a top-level argument, a nested object field
({ "gh_auth": { "token": "$var:g/all/gh_token" } }), or an array element (array elements are
walked only while nested at most two levels deep, and only for arrays of at most 1000 items).
The prefix must be on the string itself.
{
"resource_type": "postgresql",
"value": {
"host": "localhost",
"port": 5432,
"user": "postgres",
"password": "$var:g/all/pg_password",
"dbname": "windmill",
"sslmode": "prefer"
}
}
{
"resource_type": "mysql",
"value": {
"host": "localhost",
"port": 3306,
"user": "root",
"password": "$var:g/all/mysql_password",
"database": "myapp"
}
}
{
"resource_type": "slack",
"value": {
"token": "$var:g/all/slack_token"
}
}
{
"resource_type": "s3",
"value": {
"bucket": "my-bucket",
"region": "us-east-1",
"accessKeyId": "$var:g/all/aws_access_key",
"secretAccessKey": "$var:g/all/aws_secret_key"
}
}
{
"resource_type": "http",
"value": {
"baseUrl": "https://api.example.com",
"headers": {
"Authorization": "Bearer $var:g/all/api_token"
}
}
}
{
"resource_type": "kafka",
"value": {
"brokers": "broker1:9092,broker2:9092",
"sasl_mechanism": "PLAIN",
"security_protocol": "SASL_SSL",
"username": "$var:g/all/kafka_user",
"password": "$var:g/all/kafka_password"
}
}
{
"resource_type": "nats",
"value": {
"servers": ["nats://localhost:4222"],
"user": "$var:g/all/nats_user",
"password": "$var:g/all/nats_password"
}
}
{
"resource_type": "mqtt",
"value": {
"host": "mqtt.example.com",
"port": 8883,
"username": "$var:g/all/mqtt_user",
"password": "$var:g/all/mqtt_password",
"tls": true
}
}
The Windmill Hub publishes resource types for most services, and an instance gets them by syncing with the hub. When none fits the service:
c_<name> holding the service's connection fields (base URL, account or region identifiers, credentials), as in "Custom Resource Types" below, and ask the user before creating it: every resource of that type and every script taking one depends on its fields.A custom type's name starts with c_: the hub's types reach every instance under their plain names, so the prefix keeps a custom type from clashing with one synced later. Scripts and flows refer to the full name: format: resource-c_custom_api, RT.CCustomApi in TypeScript, a c_custom_api TypedDict in Python.
Create custom resource types with JSON Schema:
{
"name": "c_custom_api",
"schema": {
"type": "object",
"properties": {
"base_url": {"type": "string", "format": "uri"},
"api_key": {"type": "string"},
"timeout": {"type": "integer", "default": 30}
},
"required": ["base_url", "api_key"]
},
"description": "Custom API connection"
}
Save as: c_custom_api.resource-type.json
OAuth resources are managed through the Windmill UI and marked:
{
"is_oauth": true,
"account": 123
}
OAuth tokens are automatically refreshed by Windmill.
export async function main(db: RT.Postgresql) {
// db contains the resource values
const { host, port, user, password, dbname } = db;
}
class postgresql(TypedDict):
host: str
port: int
user: str
password: str
dbname: str
def main(db: postgresql):
# db contains the resource values
pass
# List resources
wmill resource list
# List resource types with schemas
wmill resource-type list --schema
# Get specific resource type schema
wmill resource-type get postgresql
# Deploy resources to the workspace — destructive to remote state, so only run when
# the user explicitly asks to deploy/publish/push. Depending on how the repo is wired,
# deploy via `git push` or `wmill sync push` (see the Deploying section in AGENTS.wmill.md).
wmill sync push
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Windmillに新しいTriggerCrud型のトリガーを追加する際、バックエンドからCLI、画面、同期やキャプチャ機能まで必要な変更箇所を確認できる開発チェックリストです。
WindmillのAIチャットを変更するときに、ツールやプロンプト、結果の返し方、コンテキスト量を整理し、評価で変更前後の挙動を比べるための指針です。
WindmillのAI生成モード向けに、実際の利用要求に沿ったベンチマークケースを作成・実行します。生成結果を決定的な検証とLLM評価で確認し、AIチャットやcopilotの変更前後を比較できます。
Windmill CLIのコマンドを使い、スクリプトやフローなどの管理、ジョブの実行履歴確認、失敗原因の調査を進めるためのリファレンスです。
モジュールのインターフェースを小さく保ちながら、内部に複雑な処理をまとめる設計を支援します。テストしやすさや変更のしやすさを考え、処理の境目を整理できます。
変更内容を確認し、対象ファイルだけを選んで、形式や長さの規則に沿ったConventional Commits形式のGitコミットを作成するスキルです。