Stable Baselines3 RL Assistant
A practical guide for training, evaluating and customizing reinforcement learning agents with Stable Baselines3.
Dev & CodingAdvanced★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Gives ready-to-run patterns for SB3 2.8 algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) using the unified scikit-learn-like API.
- Documents custom Gymnasium environment rules (
reset/stepcontracts, uint8 image observations, channel-first layout,check_envvalidation). - Covers vectorized environments (DummyVecEnv vs SubprocVecEnv), callbacks (EvalCallback, CheckpointCallback, custom callbacks), model save/load,
evaluate_policy, and video recording. - Adds advanced tips: learning-rate schedules, MultiInputPolicy, HER replay buffers, TensorBoard logging, and fixes for OOM or unstable training.
Who it's for
- Researchers and students who need fast, reliable RL experiment scaffolding.
- ML engineers wrapping their own simulators as Gymnasium environments.
- Anyone doing single-agent RL (it explicitly defers to pufferlib for multi-agent or massively parallel training).
Example uses
- "Train a PPO baseline on CartPole and save the best checkpoint" → training script with EvalCallback wiring.
- "Turn my simulator into a Gymnasium env" → uses
custom_env_template.pyplus acheck_envvalidation pass. - "My SAC run is too slow" → SubprocVecEnv parallelism,
gradient_steps=-1, and buffer size tuning advice.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/stable-baselines3/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/stable-baselines3 folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/stable-baselines3/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/stable-baselines3 ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and make sure the skills folder exists:
mkdir -p ~/.claude/skills - Clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy just this skill:
cp -r scientific-agent-skills/skills/stable-baselines3 ~/.claude/skills/ - Install the library in your Python 3.10+ environment:
uv pip install 'stable-baselines3[extra]>=2.8' - Verify:
python -c "import stable_baselines3; print(stable_baselines3.__version__)" - Restart Claude Code and ask something like "write a PPO training script for CartPole" to trigger the skill.
View source on GitHub ↗License: MIT