Skip to main content
Instead of manually editing configuration files, you can use AI coding assistants to create and modify GeoEngine workers from natural language prompts. This page provides ready-to-use prompts for popular AI coder tools. Follow the manual steps first to understand the flow before trying the AI agent route.

Prerequisites

  • GeoEngine is installed and logged in
  • Docker is running
  • An AI coding assistant of your choice (see supported tools below)

Supported AI Coder Tools

ToolProviderHow to Use
Claude Code (recommended)AnthropicRun from terminal in your script directory
CursorCursorOpen your script folder as a project
GitHub CopilotGitHub / OpenAIUse in VS Code, JetBrains, or CLI
CodexOpenAIRun from terminal in your script directory
Antigravity IDEGoogleOpen your script folder as workspace
If you have yet to install the skills, please follow the guide here to get the skills to your agent.

GeoEngine AI Agent Skills

GeoEngine ships with built-in AI agent skills that give your AI coder structured knowledge of the GeoEngine workflow. If you ran geoengine patch --init during installation, the following skills are already available to your agent:
SkillDescription
use-geoengineMaster routing skill — handles any GeoEngine request and routes to the correct sub-skill or CLI command
make-geoengine-workerEnd-to-end workflow: creates a new GeoEngine worker from scratch, including init, argparse, YAML, pixi.toml, and apply
write-geoengine-yamlWrites or updates the geoengine.yaml configuration file for a worker
write-argparseAdds CLI argument parsing to a script so GeoEngine can pass --name value flags at runtime
write-pixi-tomlWrites or updates the pixi.toml dependency file for a worker
With these skills installed, even short prompts like “Make this script a GeoEngine worker” will trigger the full automated workflow.

Step 1: Download the Starter Script

Download the starter script and save it in an isolated folder somewhere on your machine — your home directory or Desktop works fine.
For this example, we will assume you created a directory in /Users/<user>/Downloads/sg-pgpt-gen. Place the script into this directory.

Step 2: Point the Agent to the Directory

Allow your AI coder access to the directory that contains your script:
  • Claude Code / Codex — select the script’s directory as the workspace
  • Cursor / GitHub Copilot — open the script’s directory as a project in the IDE
  • Antigravity — open the script’s directory as the workspace in the IDE
The AI coder needs to be able to read and write files in that directory to create and edit geoengine.yaml, pixi.toml, and your script.

Step 3: Creating the Worker

Describe your script, its inputs, and its outputs as much as possible. The AI coder will handle the rest — initialising the worker, writing the config files, and building the container.

Prompt Template

I have a(n) [Python/R] script called [script-name] in this directory that [describe what the script does].

Make it a GeoEngine worker called [worker-name] with these inputs and outputs:

Inputs:
- [name]: [type] — [description]
- [name]: [type] — [description]

Outputs:
- [name]: [type] — [description]

[Optional: Enable the QGIS/ArcGIS Pro plugin.]
Available input/output types: file, folder, string, number, boolean, enum, datetime.

Prompt to Use

Based on the template, you can use the following prompt in your agent.
I have an R script called sg_pgpt_gen.R in this directory that generates polygons and points within Singapore.

Make it a GeoEngine worker called sg-pgpt-gen with these inputs and outputs:

Inputs:
- n-polygons: number - number of polygons to generate
- n-points: number - number of points to generate
- min-sides: number - minimum number of sides per polygon
- max-sides: number - maxmimum number of sides per polygon
- seed: number - seed for reproducibility

Outputs:
- output-folder: folder — directory where the generated GeoJSON file will be saved
Add in one more line at the end to specify the GIS plugin you want to enable the worker for (QGIS/ArcGIS Pro). After the agent is done, ensure the following:
  • The directory contains all the necessary artifacts.
  • Running geoengine workers shows the worker “sg-pgpt-gen”, and that it is enabled for the correct plugin.

Step 4: Verifying in GIS Platform

You can now test your worker following the steps outlined in the guide. The AI agent should have done a developmental apply, so you will only find the worker with a “latest” version.

Step 5: Saving a Worker Version

When you are happy with the worker, run a production apply so that the stable version of the script is saved. Run the following in a terminal that is opened to your worker directory.
geoengine apply
With this, the worker should now have v1.0.0 applied and readily available for you to use.

Step 6: Improving the Worker

Sometimes, you might want to improve on the script. With the help of the AI agent, you can just describe what you want to change. The AI coder will update the script, config files, and dependencies as needed.

Prompt Template

I have an existing GeoEngine worker in this directory.
[Describe the change you want to make.]

Example

Using the same worker, let’s say that we want to manually specify the bounding box rather than using an automatic bounding box approximation of Singapore. Use the following prompt to improve on the worker.
I have an existing GeoEngine worker in this directory.
Make the worker take in a parameter of a GeoJSON file that acts as the bounding box, instead of using the hard-coded bounding box.
When the AI is done, you can proceed to test using the “latest” version of the worker in your GIS plugin. Once you are happy with it, feel free to follow these steps to push the next version to the cloud.
Remember to bump the version number before your next geoengine apply!

Debugging with AI Coder

Here are some prompt templates you can use to debug with your AI coding agent.

Prompt: Fix a Build Failure

My GeoEngine worker failed to build. Here is the error output:

[paste the error output from geoengine apply]

Please diagnose the issue and fix it. Common causes include missing dependencies in pixi.toml, incorrect pixi.toml syntax, or script import errors.

Prompt: Fix a Runtime Error

My GeoEngine worker builds successfully but fails when I run it. Here is the error:

[paste the error output from geoengine run or the GIS log panel]

Please diagnose and fix the issue. Then run `geoengine apply --dev` to rebuild.

Prompt: Inspect and Explain a Worker

Explain what this GeoEngine worker does. Read the geoengine.yaml, pixi.toml, and the main script in this directory and give me a summary of:
- What inputs it accepts
- What it does with them
- What outputs it produces
- What dependencies it needs

Tips for Best Results

  • Be specific about inputs and outputs — mention file types (.tif, .geojson, .csv), whether inputs are read-only or writable outputs, and any optional parameters so the AI sets up geoengine.yaml correctly
  • Bounce with the agent — AI agents are not perfect. It is unlikely that the agent will succeed on first try. Paste error logs into the prompt to get the agent to fix, before trying again
  • Iterate with --dev — always use geoengine apply --dev during development to skip version checks; run geoengine apply (without --dev) when ready for a production release
  • Review generated files — check that geoengine.yaml inputs match your script’s argparse arguments
  • Mention GIS plugins — if you need QGIS or ArcGIS Pro support, include that in your prompt (e.g. “enable this for QGIS”)