--- name: create-example description: Create a new Whirl example project in the examples/ directory. Use when the user wants to scaffold, add, or create a new Airflow DAG example for the Whirl local development tool. Triggers on requests like "create a new example", "add an example", "scaffold an example for X". --- # Create Whirl Example Scaffold a new Whirl example in `examples/`. Gather requirements interactively, then generate all files. ## Workflow ### 1. Gather Requirements Ask the user for: 1. **Example name** - short kebab-case name (e.g. `api-to-s3`, `sftp-mysql-example`) 2. **Use case** - what the example demonstrates (1-2 sentences) 3. **Environment** - which environment from `envs/` to use. Present the available options: - `just-airflow` - Minimal Airflow only - `api-python-s3` - Airflow + S3 (LocalStack) + MockServer - `api-s3-dataset` - Airflow + S3 + PostgreSQL + MockServer - `postgres-s3-spark` - Airflow + PostgreSQL + S3 + Spark cluster - `dbt-example` - DBT + PostgreSQL + S3 + Spark - `sftp-mysql-example` - Airflow + MySQL + SFTP server - `local-ssh` - Airflow + SSH - `external-airflow-db` - Airflow with external PostgreSQL - `external-smtp-config` - Airflow + MailDev SMTP - `airflow-s3-logging` - Airflow with S3-based logging - `ha-scheduler` - High availability scheduler setup - `s3-spark-delta-sharing` - Spark + Delta Sharing + S3 - **Custom environment** - if none of the above fit, use the `create-environment` skill to create a new environment first 4. **Optional extras** - whether the example needs: - Setup scripts (`whirl.setup.d/`) for installing providers, adding connections, loading mock data - Mock data directory (`mock-data/`) - Additional Python dependencies ### 2. Create Files Create `examples//` with these files: #### `.whirl.env` (required) Minimum content: ``` WHIRL_ENVIRONMENT= ``` Add extra variables only when needed: ``` MOCK_DATA_FOLDER=${DAG_FOLDER}/mock-data ``` #### `README.md` (required) Follow this structure: ```markdown #### Example <1-2 paragraphs describing what this example demonstrates.> The default environment (``) includes containers for: - ## Setup scripts The environment contains setup scripts in the `whirl.setup.d/` folder: - `