Skip to main content
This doc is for developers adding new providers.

Key Concepts

  • A skill is a folder on disk (usually installed from ClawHub) that contains scripts and docs.
  • A driver is a small TypeScript adapter that knows how to invoke a given skill reliably.
  • Drivers provide:
    • Stable display name and slug
    • Required env-var list (availability checks)
    • Invocation details (stdin vs CLI args, scripts/ subdir, venv detection)

CLI: List drivers

ClawKitchen uses this command to populate its provider dropdown:
It returns JSON like:
Availability is computed from merged env:
  • process.env (ClawRecipes process)
  • ~/.openclaw/openclaw.jsonenv.vars

Where the code lives

MediaDriver interface

The invoke() method should:
  • Write output into opts.outputDir
  • Return { filePath } pointing at the generated file
  • Throw on failure with a useful error message (stderr/stdout included when possible)

Adding a new driver

1) Add or install the underlying skill

A skill should live in one of:
  • ~/.openclaw/skills/<slug>
  • ~/.openclaw/workspace/skills/<slug>
  • ~/.openclaw/workspace/<slug> (ClawHub sometimes installs here)
The worker and driver utils search these roots via findSkillDir(slug).

2) Create the driver file

Create:
Example pattern (stdin → MEDIA: output):
Example pattern (CLI args → script prints direct path):
  • See nano-banana-pro.driver.ts.

3) Register it

Add the driver to registry.ts in knownDrivers:

4) Done

  • The workflow worker can now invoke it by setting provider to skill-my-provider.
  • The CLI workflows media-drivers will list it.
  • ClawKitchen will show it automatically (Kitchen pulls the list from the CLI).

Script contract (skills)

Drivers can invoke scripts in different ways, but the recommended contract is:
  • Prompt via stdin
  • Print MEDIA:/absolute/or/relative/path to stdout
  • Write the file into MEDIA_OUTPUT_DIR if provided
Notes:
  • Some ClawHub skills place scripts under scripts/. Use findScriptInSkill() or direct paths accordingly.
  • Venv support: worker/driver utils will prefer .venv/bin/python when present.

Troubleshooting

  • If the dropdown says a driver is unavailable, run:
    and check missingEnvVars.
  • If a skill isn’t found, verify the folder name matches slug and is inside a scanned root.