본문으로 건너뛰기
cccskills
무료GitHub에 공개

resources

Manage Windmill resources that hold external service settings and credentials. Define resource files, reference existing resources and variables in runs, and keep passwords, API keys, and tokens in secret variables instead of writing them into resource files.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

MUST use when managing resources.

windmill-labs/windmill스타 18,281(GitHub 18,281 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Define a database or service connection as a Windmill resource
  • Reference a saved resource or variable in a script or flow run
  • Keep passwords and API tokens out of resource files
  • Describe a custom resource type when no built-in type fits

포함된 파일(1)

  • SKILL.md8.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Windmill Resources

Resources store credentials and configuration for external services.

File Format

Resource files use the pattern: {path}.resource.json

Example: f/databases/postgres_prod.resource.json

Resource Structure

{
  "value": {
    "host": "db.example.com",
    "port": 5432,
    "user": "admin",
    "password": "$var:g/all/db_password",
    "dbname": "production"
  },
  "description": "Production PostgreSQL database",
  "resource_type": "postgresql"
}

Required Fields

  • value - Object containing the resource configuration
  • resource_type - Name of the resource type (e.g., "postgresql", "slack")

Agents

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.

Variable References

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 variable

Secrets

Never 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.
  • A resource that references a variable needs the variable to exist first, so create or deploy the variable before the resource.
  • A secret's plaintext never goes in a file of the repo: a .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.

Resource References

Reference other resources:

{
  "value": {
    "database": "$res:f/databases/postgres"
  }
}

Passing a Resource or Variable as a Run Argument

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.

Common Resource Types

PostgreSQL

{
  "resource_type": "postgresql",
  "value": {
    "host": "localhost",
    "port": 5432,
    "user": "postgres",
    "password": "$var:g/all/pg_password",
    "dbname": "windmill",
    "sslmode": "prefer"
  }
}

MySQL

{
  "resource_type": "mysql",
  "value": {
    "host": "localhost",
    "port": 3306,
    "user": "root",
    "password": "$var:g/all/mysql_password",
    "database": "myapp"
  }
}

Slack

{
  "resource_type": "slack",
  "value": {
    "token": "$var:g/all/slack_token"
  }
}

AWS S3

{
  "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"
  }
}

HTTP/API

{
  "resource_type": "http",
  "value": {
    "baseUrl": "https://api.example.com",
    "headers": {
      "Authorization": "Bearer $var:g/all/api_token"
    }
  }
}

Kafka

{
  "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"
  }
}

NATS

{
  "resource_type": "nats",
  "value": {
    "servers": ["nats://localhost:4222"],
    "user": "$var:g/all/nats_user",
    "password": "$var:g/all/nats_password"
  }
}

MQTT

{
  "resource_type": "mqtt",
  "value": {
    "host": "mqtt.example.com",
    "port": 8883,
    "username": "$var:g/all/mqtt_user",
    "password": "$var:g/all/mqtt_password",
    "tls": true
  }
}

When No Resource Type Fits

The Windmill Hub publishes resource types for most services, and an instance gets them by syncing with the hub. When none fits the service:

  • If the instance is reported as not having synced the hub's types, mention that a superadmin can sync them: the hub most likely has one for the service. That holds for a type a hub script takes too: it is missing here until the sync, so say so before asking for a resource of it. Create one of your own only if the user still wants it, since after a sync the workspace would hold both.
  • Otherwise, or when the user prefers it to syncing, propose a custom resource type named 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 plain variable instead of a resource is fine when the user asks for it; without that, default to the resource, its secret in a variable it references.

Custom Resource Types

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

OAuth resources are managed through the Windmill UI and marked:

{
  "is_oauth": true,
  "account": 123
}

OAuth tokens are automatically refreshed by Windmill.

Using Resources in Scripts

TypeScript (Bun/Deno)

export async function main(db: RT.Postgresql) {
  // db contains the resource values
  const { host, port, user, password, dbname } = db;
}

Python

class postgresql(TypedDict):
    host: str
    port: int
    user: str
    password: str
    dbname: str

def main(db: postgresql):
    # db contains the resource values
    pass

CLI Commands

# 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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Plan the code changes needed to add a TriggerCrud-based trigger to Windmill. The checklist covers backend, database, API, CLI, frontend, capture, and validation work so the new trigger can be managed across the product.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add a Kafka, GCP, or Azure style trigger to Windmill
  • Find all product areas affected by a new trigger kind
  • Review implementation and validation steps before a trigger PR
windmill-labs/windmill1.8만2026년 10월 26일 업데이트

ai-chat

무료

Improve Windmill’s AI chat by reviewing its tools, prompts, result shapes, and context usage. The guidance helps place shared instructions where chat and CLI can use them, reduce repeated token costs, and compare behavior before and after changes with A/B evaluations.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Edit Windmill chat tools or system prompts
  • Reduce chat context window usage
  • Benchmark a chat behavior change
windmill-labs/windmill1.8만2026년 10월 26일 업데이트

ai-evals

무료

Create and run black-box benchmarks for Windmill AI generation modes such as flows, apps, scripts, CLI, and global requests. Each case exercises the production path, checks hard requirements, and uses an LLM judge to assess user-facing behavior before and after changes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding a benchmark case for an AI mode
  • Comparing AI chat behavior before and after a change
  • Checking copilot changes with realistic requests
windmill-labs/windmill1.8만2026년 10월 26일 업데이트

Use this reference to work with Windmill resources from the command line, including scripts, flows, datatables, and workspace settings. It also covers listing jobs, inspecting details and logs, retrieving results, and rerunning or restarting executions when investigating failures.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Inspecting a failed job and its logs
  • Reviewing recent runs and retrieving job results
  • Managing scripts and flows from the command line
windmill-labs/windmill1.8만2026년 10월 26일 업데이트

Use this skill to shape modules with small interfaces and substantial behavior behind them. It helps you decide where a seam belongs, reduce complexity exposed to callers, and make code easier to test and maintain.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing a module interface
  • Finding places to simplify a module
  • Choosing where behavior should vary
windmill-labs/windmill1.8만2026년 10월 26일 업데이트

commit

무료

Use this skill to review pending changes, select only the relevant files for staging, and create a focused Git commit. It formats the single-line message with a Conventional Commits type such as feat, fix, or docs, and checks the resulting status.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Committing a new feature
  • Recording a bug fix
  • Committing documentation changes
windmill-labs/windmill1.8만2026년 10월 26일 업데이트

windmill-labs의 스킬 모두 보기

이 스킬의 문제 신고