@ibm/mellea-skills-compiler-pi0.1.0
Pi extension for the Mellea Skills Compiler — /mellea-compile, /mellea-validate, /mellea-run, and /mellea-certify commands wrapping the mellea-skills CLI
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
Mellea Skills Compiler — pi extension
Compile, validate, run, and certify agent skills with the
Mellea Skills Compiler
from inside a pi session. The extension adds four slash
commands: /mellea-compile, /mellea-validate, /mellea-run, and
/mellea-certify. You don't need to install the compiler yourself, the
extension sets it up the first time you use it.
Prerequisites
You need:
pi 1.2.0 or later, with a model provider set up. Run
piand use/login, or set your provider's API key (for exampleANTHROPIC_API_KEY)./mellea-compileuses the model selected in your pi session. To install pi:npm install -g --ignore-scripts @earendil-works/pi-coding-agent pi --versiongit, and either uv or Python 3.11 to 3.14.3 (on Windows, thepylauncher is enough). The extension uses these to install the compiler.Already using pi?
npm install -greplaces your global pi, andpi installwrites to your shared agent folder (~/.pi/agent). To keep an existing pi setup as it is, install pi 1.2.0 into its own folder (npm install --ignore-scripts @earendil-works/pi-coding-agentthere), put that folder'snode_modules/.binfirst onPATH, and setPI_CODING_AGENT_DIRto a separate folder before runningpi install. Usepi install -linstead to install the extension for one project only.Ollama (or vLLM), running, with the default models pulled. Compiled skills run on Ollama, so
/mellea-runand/mellea-certifyneed it./mellea-compileand/mellea-validatealso run one fixture as a smoke check; without Ollama that check is skipped and you'll seeollama server not running. Install Ollama from ollama.com/download, start it, then pull the default models:ollama pull granite4.1:3b ollama pull ibm/granite3.3-guardian:8bOllama is expected at
http://localhost:11434. If yours is elsewhere, set bothOLLAMA_HOST(used by the compiled skill) andOLLAMA_API_URL(used for certification's risk and Guardian checks) to its URL before starting pi. For vLLM, see Choose Inference Engine.
Quick start
Install the extension:
pi install npm:@ibm/mellea-skills-compiler-piMake a folder with a skill to compile. This downloads the example
weatherskill (or downloadskills/weather/spec.mdby hand):mkdir -p my-skills/skills/weather && cd my-skills curl -fsSL -o skills/weather/spec.md \ https://raw.githubusercontent.com/generative-computing/mellea-skills-compiler/main/skills/weather/spec.mdConfirm pi has credentials for the provider you'll compile with. See Verifying credentials.
Start pi in that folder, and check that
mellea-skills.tsis listed under[Extensions]in the startup banner:piInside the pi session, run the commands. These are pi slash commands, not shell commands; type
/to see them in autocomplete./mellea-compile skills/weather/spec.md /mellea-validate skills/weather/weather_mellea /mellea-run skills/weather/weather_mellea --input "What's the weather like in Dublin?" /mellea-certify skills/weather/weather_mellea
The first command takes a few extra minutes while the compiler is set up.
Compiling writes a weather_mellea/ package and a pyproject.toml next to the
spec, and can take from a couple of minutes to over half an hour depending on
the model; use a frontier-class model, as smaller models often stop partway.
Each command shows a status indicator while it runs, then one notification
with the output.
pi's status bar shows your session's model, not the one being compiled with.
The compile prints the provider and model it used when it finishes, and records
them in <package>_mellea/compile_metadata.json.
First run
The first /mellea-* command clones the compiler at the release this
extension was built for and installs it into its own Python environment under
~/.cache/mellea-skills-compiler/<version>/
(%USERPROFILE%\.cache\mellea-skills-compiler\<version>\ on Windows). This
happens once per version. If setup is interrupted, the next command starts it
again. To reset, delete that folder.
On Windows, git must be on PATH, and long paths should be enabled
(git config --global core.longpaths true). WSL also works.
Commands
| Command | Runs |
|---|---|
/mellea-compile <path-to-spec.md or skill-dir> [flags...] |
mellea-skills compile, with the pi backend and this session's provider and model |
/mellea-validate <compiled-skill-dir> [flags...] |
mellea-skills validate |
/mellea-run <compiled-skill-dir> [flags...] |
mellea-skills run |
/mellea-certify <compiled-skill-dir> [flags...] |
mellea-skills certify |
Paths are relative to the folder pi was started in. Flags are passed to the
CLI unchanged; see the
CLI reference.
On /mellea-compile, --provider and --model override the session's
provider and model: pass both, or pass only the one that matches your session.
A skill directory works in place of a spec file if it contains a SKILL.md or
spec.md; the package is then named after the directory. A flag value with spaces can be wrapped in "..." or
'...' (no backslash escapes or nested quotes).
Known limitations
- No cancellation. Use pi's own interrupt to stop a running command.
- No output in headless mode (
pi -p), where pi exits 0 even if the command failed. Use themellea-skillsCLI directly in scripts and CI. - A stopped compile can be resumed with
/mellea-compile <spec> --repair-mode. - Compiling writes next to the spec. Compile from a copy if you don't want your skill folder changed.
- The compile runs pi with
--approveinside the extension's own copy of the compiler, so it can load the compiler's prompt templates. It does not do this in your own folders. /mellea-runbefore/mellea-certifyruns without Guardian checks, and shows a warning telling you to runmellea-skills ingestormellea-skills certify. There is noingestcommand in pi: run/mellea-certifyon the compiled skill once, and later/mellea-runcalls use its Guardian policy.
Developing the extension
From the root of a clone of the
repo,
pi install ./extensions/pi installs your local copy, and
pi -e ./extensions/pi/extensions/mellea-skills.ts loads it for one session
without installing.