Teach your AI agent the Wavu way¶
AI coding assistants (Claude Code, Codex, Gemini CLI, Cursor, Copilot…) can write Wavu scripts for you. One skill file packs everything this guide teaches into instructions your agent reads. Install it once, and the agent works the Wavu way on your own computer.
The idea in plain words¶
A new cook in the kitchen is talented but doesn't know the house rules. The skill file is the house rulebook taped inside the kitchen door: taste first, write the order on the ticket, use our kitchenware, plate it our way. The agent reads it before it starts cooking.
flowchart LR
Y["You: an idea<br/>('count the nuclei')"]:::fiji
A["Your AI agent<br/>+ the Wavu skill"]:::worker
T["test_script.py<br/>(written first)"]:::env
S["script.py<br/>PARAMS + run()"]:::script
F["Fiji menu item"]:::fiji
Y --> A --> T --> S --> F
classDef fiji fill:#e3f2fd,stroke:#1565c0,color:#0d47a1
classDef worker fill:#e8f5e9,stroke:#2e7d32,color:#1b5e20
classDef script fill:#fff3e0,stroke:#ef6c00,color:#e65100
classDef env fill:#f3e5f5,stroke:#6a1b9a,color:#4a148c
What the skill teaches¶
The steps it follows
- Tests first in
test_script.py: a made-up image with a known answer. It runs red, then green. - Describe the dialog in
PARAMS. - Do the work in
run(ctx, inputs, params), with log messages, progress and cancel. - Return what Fiji should show: images, labels, tables, ROIs.
- Add packages to
pixi.toml, conda-forge first. - Run
pixi run testuntil everything passes, then try it in Fiji. - Package it as a Fiji menu item for your lab.
- Optionally, build a container.
And the rules
- Never weaken a test to make it pass.
- Heavy imports inside
run, so the dialog opens instantly. - Small, interactive data only; no Java or Fiji plugin code.
- Tell you how to try it: Stop Worker, then Run Python Script.
Install¶
Paste one line into a terminal. It adds the Wavu plugin, which updates with the Wavu repository:
claude plugin marketplace add Oxford-Zeiss-Centre-of-Excellence/Wavu && claude plugin install wavu@wavu
Or, inside a Claude Code chat:
Or as a personal skill file, without the plugin:
- Download the skill (button below).
- In Claude, open Settings, then the skills section.
- Add a skill and choose upload, then pick
wavu-skill.zip.
Skills need code execution switched on in Claude's settings.
In your script folder (the agent reads it automatically):
Or for every project, save it as ~/.codex/AGENTS.md.
In your script folder:
curl -fsSL https://raw.githubusercontent.com/Oxford-Zeiss-Centre-of-Excellence/Wavu/main/agent/AGENTS.md -o AGENTS.md
Or for every project, save it as ~/.config/opencode/AGENTS.md.
Then try a prompt like¶
A new tool
Using the Wavu way, make a script that finds nuclei with an Otsu
threshold and returns a label image and a table of their areas. Write
test_script.py first.
From a napari plugin
Convert my napari plugin <name or path> into a Wavu script: keep its
algorithm, put its dependencies in pixi.toml, write test_script.py
first.
The plugin's heavy dependencies move into their own isolated pixi environment, so they no longer clash with napari's or other plugins', and the same script then also runs from Fiji.
From a notebook
Turn this notebook <file.ipynb> into a Wavu script: the cells that do
the analysis go into run, the values I tweak become PARAMS. Write
test_script.py first.
Open your agent in a folder made from the template, so it starts from a working script.
Check its work
Run pixi run test yourself and read the tests the agent wrote: a test
that can never fail protects nothing. See Test first.
In one sentence¶
Install the Wavu skill once, and your AI agent writes the test, the
PARAMS, the run function and the package the same way this guide does.