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:process.env(ClawRecipes process)~/.openclaw/openclaw.json→env.vars
Where the code lives
MediaDriver interface
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)
findSkillDir(slug).
2) Create the driver file
Create:MEDIA: output):
- See
nano-banana-pro.driver.ts.
3) Register it
Add the driver toregistry.ts in knownDrivers:
4) Done
- The workflow worker can now invoke it by setting
providertoskill-my-provider. - The CLI
workflows media-driverswill 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/pathto stdout - Write the file into
MEDIA_OUTPUT_DIRif provided
- Some ClawHub skills place scripts under
scripts/. UsefindScriptInSkill()or direct paths accordingly. - Venv support: worker/driver utils will prefer
.venv/bin/pythonwhen 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
slugand is inside a scanned root.
