openclaw-rl-training — Claude Code skill: train agents with RL
This skill sets up OpenClaw-RL, an async reinforcement learning framework that turns live conversations into training signals for a personal agent.
npx skills add reason-machines/trending-skills --skill openclaw-rl-training -a claude-codeWhat openclaw-rl-training does
OpenClaw-RL serves your self-hosted model behind an Anthropic-compatible API through OpenClaw, captures multi-turn conversations, and keeps optimizing the policy in the background while you keep using the agent. Four async loops run side by side: serving rollouts, collecting trajectories, scoring turns with a PRM or judge, and training the policy. GRPO, on-policy distillation and a combined method are all available.
Setup starts from the repo. Clone OpenClaw-RL, install requirements.txt, then install slime as the training backend. SGLang is optional and speeds up inference. Launch scripts come ready-made; you supply paths through environment variables such as MODEL_PATH, DATA_PATH and CKPT_SAVE_DIR, plus JUDGE_MODEL_PATH for OPD and PRM_MODEL_PATH for Binary RL.
GPU partitioning is on you. The example splits eight cards into four for training and four for rollout, and the script will not run without that split. LoRA cuts memory use when cards are scarce. Extension points like --custom-loss-function-path and --custom-rm-path let you plug in your own loss or reward model without touching slime core.
What it helps with
- turn live agent conversations into training trajectories
- set up GRPO training with a Process Reward Model
- build on-policy distillation with a judge and textual hints
- run an async RL pipeline without pausing agent serving
- plug in a custom loss or reward model without editing the core
Example prompts for the agent
- Set up agent training with OpenClaw-RL using
run_qwen3_7b_openclaw_rl.sh - Split the GPUs between training and rollout, then launch
run_qwen3_7b_openclaw_combine.sh - Wire in my own reward model with
--custom-rm-path ./my_method/custom_rm.py
How to install openclaw-rl-training
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill openclaw-rl-training -a claude-code2Manually: put the files in place
~/.claude/skills/openclaw-rl-training/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/openclaw-rl-training/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill openclaw-rl-training -a codex2Manually: put the files in place
.agents/skills/openclaw-rl-training/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill openclaw-rl-training -a cursor2Manually: put the files in place
.cursor/skills/openclaw-rl-training/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills openclaw-rl-training2Manually: put the files in place
.github/skills/openclaw-rl-training/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill openclaw-rl-training -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/openclaw-rl-trainingManually: put the files in place
.devin/skills/openclaw-rl-training/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill openclaw-rl-training -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about openclaw-rl-training
How do I install openclaw-rl-training in Claude Code?
Run npx skills add reason-machines/trending-skills --skill openclaw-rl-training -a claude-code. The skill lands at ~/.claude/skills/openclaw-rl-training/SKILL.md.
What does openclaw-rl-training do?
It sets up OpenClaw-RL, an asynchronous reinforcement learning framework that collects multi-turn conversations and keeps refining the agent policy in the background.
What do I need before starting a training run?
Paths to the base model, the conversation data and a checkpoint directory, passed as environment variables. OPD also needs JUDGE_MODEL_PATH, Binary RL needs PRM_MODEL_PATH.