Injects relevant docs and skills into context before OpenClaw responds, based on what you're asking. Zero configuration — auto-discovers everything from your project.
1. Install the reflex binary
go install github.com/markmdev/reflex@latest2. Install the plugin
openclaw plugins install /path/to/reflex/hooks/openclaw
openclaw plugins enable reflex-router
openclaw gateway restart3. Set your API key
export MOONSHOT_API_KEY=your-key-hereThat's it. No registry file to maintain.
The plugin scans .openclaw/skills/*/SKILL.md and .claude/skills/*/SKILL.md for frontmatter. Skills need name and description fields:
---
name: planning
description: "Create implementation plans. Use for new features, refactoring, or any non-trivial work."
---The plugin globs all *.md files in the project and includes any that have both summary and read_when frontmatter:
---
summary: "OAuth implementation details and gotchas"
read_when:
- authentication
- OAuth
- login
---Add this frontmatter to any doc you want Reflex to route to. No list to update.
On every message, the plugin:
- Auto-discovers skills and docs in the workspace
- Reads the last 10 conversation entries from
event.messages - Calls
reflex routeto decide what's relevant - Returns
prependContext— prepended to your prompt so the agent sees it as part of your message - Tracks what's been injected — won't re-inject the same item in the same session
Configure the provider in ~/.config/reflex/config.yaml:
provider:
base_url: https://api.moonshot.ai/v1 # Default: Kimi K2.5
api_key_env: MOONSHOT_API_KEY
model: kimi-k2.5-previewCustom binary path: Set REFLEX_BIN=/path/to/reflex if the binary isn't in your PATH.
Check routing decisions:
tail -f ~/.config/reflex/log.jsonl