write-script-php

Generate Windmill PHP scripts with a standard skeleton and resource typing.

17.5k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-php
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-php
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-php
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-php

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a standardized template and guidance for building PHP scripts within Windmill, ensuring consistent structure, resource typing, and optional library dependencies.

Core Features & Use Cases

  • Standard PHP skeleton: Start with <?php and a defined main function.
  • Resource typing: Demonstrates how to declare and inject resource types to interact with external services securely.
  • Library dependencies: Shows how to declare external libraries in comments before the main function for automatic handling.
  • Use Case: Create Windmill PHP scripts that process data or perform API calls in a reusable, testable pattern.

Quick Start

Create a PHP script with a main function and a sample Postgresql resource class, then run:

  • wmill script generate-metadata
  • wmill sync push

Frequently Asked Questions about write-script-php

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write PHP scripts that integrate with external resources in Windmill?

PHP scripts in Windmill use a standard skeleton with a main function and resource typing to declare and inject external service credentials securely. Define resource types as parameters, then deploy using `wmill script generate-metadata` and `wmill sync push` for automatic integration.

Can I declare external PHP libraries as dependencies in Windmill scripts?

Yes, declare external libraries in comments before the main function. Windmill automatically handles dependency installation, so you can use any package without manual setup.

What's the fastest way to get started writing a PHP script in Windmill?

Start with the PHP skeleton provided by this pattern: begin with `<?php`, define a main function with typed resource parameters, then run `wmill script generate-metadata` and `wmill sync push` to deploy immediately.

Does the PHP scripting pattern support accessing databases and APIs?

Yes, resource typing lets you securely declare and inject PostgreSQL databases, APIs, and other external services as typed parameters in your main function for safe, reusable access.

Why use structured resource typing instead of hardcoding credentials in PHP scripts?

Resource typing separates credentials from code, enabling secure credential injection, reusability across workflows, and testability without exposing secrets in your script logic.