1
0
Source

MUST use when creating raw apps.

Install

mkdir -p .claude/skills/raw-app && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4168" && unzip -o skill.zip -d .claude/skills/raw-app && rm skill.zip

Installs to .claude/skills/raw-app

About this skill

Windmill Raw Apps

Raw apps let you build custom frontends with React, Svelte, or Vue that connect to Windmill backend runnables and datatables.

Creating a Raw App

wmill app new

This interactive command creates a complete app structure with your choice of frontend framework (React, Svelte, or Vue).

App Structure

my_app__raw_app/
├── AGENTS.md              # AI agent instructions (auto-generated)
├── DATATABLES.md          # Database schemas (run 'wmill app generate-agents' to refresh)
├── raw_app.yaml           # App configuration (summary, path, data settings)
├── index.tsx              # Frontend entry point
├── App.tsx                # Main React/Svelte/Vue component
├── index.css              # Styles
├── package.json           # Frontend dependencies
├── wmill.ts               # Auto-generated backend type definitions (DO NOT EDIT)
├── backend/               # Backend runnables (server-side scripts)
│   ├── <id>.<ext>         # Code file (e.g., get_user.ts)
│   ├── <id>.yaml          # Optional: config for fields, or to reference existing scripts
│   └── <id>.lock          # Lock file (run 'wmill app generate-locks' to create)
└── sql_to_apply/          # SQL migrations (dev only, not synced)
    └── *.sql              # SQL files to apply via dev server

Backend Runnables

Backend runnables are server-side scripts that your frontend can call. They live in the backend/ folder.

Creating a Backend Runnable

Add a code file to the backend/ folder:

backend/<id>.<ext>

The runnable ID is the filename without extension. For example, get_user.ts creates a runnable with ID get_user.

Supported Languages

LanguageExtensionExample
TypeScript.tsmyFunc.ts
TypeScript (Bun).bun.tsmyFunc.bun.ts
TypeScript (Deno).deno.tsmyFunc.deno.ts
Python.pymyFunc.py
Go.gomyFunc.go
Bash.shmyFunc.sh
PowerShell.ps1myFunc.ps1
PostgreSQL.pg.sqlmyFunc.pg.sql
MySQL.my.sqlmyFunc.my.sql
BigQuery.bq.sqlmyFunc.bq.sql
Snowflake.sf.sqlmyFunc.sf.sql
MS SQL.ms.sqlmyFunc.ms.sql
GraphQL.gqlmyFunc.gql
PHP.phpmyFunc.php
Rust.rsmyFunc.rs
C#.csmyFunc.cs
Java.javamyFunc.java

Example Backend Runnable

backend/get_user.ts:

import * as wmill from 'windmill-client';

export async function main(user_id: string) {
  const sql = wmill.datatable();
  const user = await sql`SELECT * FROM users WHERE id = ${user_id}`.fetchOne();
  return user;
}

After creating, tell the user they can generate lock files by running:

wmill app generate-locks

Optional YAML Configuration

Add a <id>.yaml file to configure fields or static values:

backend/get_user.yaml:

type: inline
fields:
  user_id:
    type: static
    value: "default_user"

Referencing Existing Scripts

To use an existing Windmill script instead of inline code:

backend/existing_script.yaml:

type: script
path: f/my_folder/existing_script

For flows:

type: flow
path: f/my_folder/my_flow

Calling Backend from Frontend

Import from the auto-generated wmill.ts:

import { backend } from './wmill';

// Call a backend runnable
const user = await backend.get_user({ user_id: '123' });

The wmill.ts file provides type-safe access to all backend runnables.

Data Tables

Raw apps can query Windmill datatables (PostgreSQL databases managed by Windmill).

Critical Rules

  1. ONLY USE WHITELISTED TABLES: You can ONLY query tables listed in raw_app.yamldata.tables. Tables not in this list are NOT accessible.

  2. ADD TABLES BEFORE USING: To use a new table, first add it to data.tables in raw_app.yaml.

  3. USE CONFIGURED DATATABLE/SCHEMA: Check the app's raw_app.yaml for the default datatable and schema.

Configuration in raw_app.yaml

data:
  datatable: main           # Default datatable
  schema: app_schema        # Default schema (optional)
  tables:
    - main/users            # Table in public schema
    - main/app_schema:items # Table in specific schema

Table reference formats:

  • <datatable> - All tables in the datatable
  • <datatable>/<table> - Specific table in public schema
  • <datatable>/<schema>:<table> - Table in specific schema

Querying in TypeScript (Bun/Deno)

import * as wmill from 'windmill-client';

export async function main(user_id: string) {
  const sql = wmill.datatable();  // Or: wmill.datatable('other_datatable')

  // Parameterized queries (safe from SQL injection)
  const user = await sql`SELECT * FROM users WHERE id = ${user_id}`.fetchOne();
  const users = await sql`SELECT * FROM users WHERE active = ${true}`.fetch();

  // Insert/Update
  await sql`INSERT INTO users (name, email) VALUES (${name}, ${email})`;
  await sql`UPDATE users SET name = ${newName} WHERE id = ${user_id}`;

  return user;
}

Querying in Python

import wmill

def main(user_id: str):
    db = wmill.datatable()  # Or: wmill.datatable('other_datatable')

    # Use $1, $2, etc. for parameters
    user = db.query('SELECT * FROM users WHERE id = $1', user_id).fetch_one()
    users = db.query('SELECT * FROM users WHERE active = $1', True).fetch()

    # Insert/Update
    db.query('INSERT INTO users (name, email) VALUES ($1, $2)', name, email)
    db.query('UPDATE users SET name = $1 WHERE id = $2', new_name, user_id)

    return user

SQL Migrations (sql_to_apply/)

The sql_to_apply/ folder is for creating/modifying database tables during development.

Workflow

  1. Create .sql files in sql_to_apply/
  2. Run wmill app dev - the dev server watches this folder
  3. When SQL files change, a modal appears in the browser to confirm execution
  4. After creating tables, add them to data.tables in raw_app.yaml

Example Migration

sql_to_apply/001_create_users.sql:

CREATE TABLE IF NOT EXISTS users (
    id SERIAL PRIMARY KEY,
    email TEXT NOT NULL UNIQUE,
    name TEXT,
    created_at TIMESTAMP DEFAULT NOW()
);

After applying, add to raw_app.yaml:

data:
  tables:
    - main/users

Migration Best Practices

  • Use idempotent SQL: CREATE TABLE IF NOT EXISTS, etc.
  • Number files: 001_, 002_ for ordering
  • Always whitelist tables after creation
  • This folder is NOT synced - it's for local development only

CLI Commands

Tell the user they can run these commands (do NOT run them yourself):

CommandDescription
wmill app newCreate a new raw app interactively
wmill app devStart dev server with live reload
wmill app generate-agentsRefresh AGENTS.md and DATATABLES.md
wmill app generate-locksGenerate lock files for backend runnables
wmill sync pushDeploy app to Windmill
wmill sync pullPull latest from Windmill

Best Practices

  1. Check DATATABLES.md for existing tables before creating new ones
  2. Use parameterized queries - never concatenate user input into SQL
  3. Keep runnables focused - one function per file
  4. Use descriptive IDs - get_user.ts not a.ts
  5. Always whitelist tables - add to data.tables before querying
  6. Generate locks - tell the user to run wmill app generate-locks after adding/modifying backend runnables

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

282789

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

208415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

201286

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

213231

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

169197

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

165173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.