Skill Resolver

Turns a plain-language request into the body of the skill that handles it.

config.json maps each skill to the keywords that trigger it and the file paths where that skill’s SKILL.md lives. The resolver matches keywords against a message, loads the matching skill bodies, and prints them — ready to be injected into the agent’s context before the task is attempted.

Usage

python3 resolver.py "query the sqlite db for open invoices"

Other flags:

python3 resolver.py "extract this PDF" --json      # machine-readable output
python3 resolver.py "check the weather" --debug     # show what matched, and why
python3 resolver.py "render a mermaid diagram" --skills-dir ~/.openclaw/skills

With no message argument the resolver reads stdin:

echo "make a spreadsheet of this data" | python3 resolver.py

Exit code is always 0 — an unmatched message is a valid result, not an error.

How matching works

Skill body lookup

For each match, the resolver tries the skill’s paths from config.json in order (with ~ expanded), then falls back to <skills-dir>/<slug>/SKILL.md. If no body is found the match is skipped rather than emitted empty.

Adding a skill to the resolver

Add an entry under "skills" in config.json:

"weather": {
  "keywords": ["weather", "forecast", "temperature"],
  "slug": "weather",
  "paths": ["~/.openclaw/skills/weather/SKILL.md"]
}

Then verify it resolves:

python3 resolver.py "what's the weather" --debug

Files