Agent skill · Backend & API

stable-baselines3

Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API. Use for standard RL experiments, quick prototyping, and well-documented algorithm implementations. Best for single-agent RL with Gymnasium environments. For high-performance parallel training, multi-agent systems, or custom vectorized environments, use pufferlib instead.

LeonChaoXgithub.com/LeonChaoXGitHub ↗
claude-codeships scriptsMIT
Install
npx skills add LeonChaoX/qinyan-academic-skills --skill stable-baselines3 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 8
SKILL.md size: 9 KB
Bundled scripts: yes
Path: skills/09-机器学习与人工智能/stable-baselines3/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 759
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Stable Baselines3 ## Overview Stable Baselines3 (SB3) is a PyTorch-based library providing reliable implementations of reinforcement learning algorithms. This skill provides comprehensive guidance for training RL agents, creating custom environments, implementing callbacks, and optimizing training workflows using SB3's unified API. ## Core Capabilities ### 1. Training RL Agents **Basic Training Pattern:** ```python import gymnasium as gym from stable_baselines3 import PPO # Create environment env = gym.make("CartPole-v1") # Initialize agent model = PPO("MlpPolicy", env, verbose=1) # Train the agent model.learn(total_timesteps=10000) # Save the model model.save("ppo_cartpole") # Load the model (without prior instantiation) model = PPO.load("ppo_cartpole", env=env) ``` **Important Notes:** - `total_timesteps` is a lower bound; actual training may exceed this due to batch collection - Use `model.load()` as a static method, not on an existing instance - The replay buffer is NOT saved with the model to save space **Algorithm Selection:** Use `references/algorithms.md` for detailed algorithm characteristics and selection guidance. Quick reference: - **PPO/A2C**: General-purpose, suppor

What's inside
Steps it walks through
  1. Overview
  2. Core Capabilities
  3. 1. Training RL Agents
  4. 2. Custom Environments
  5. 3. Vectorized Environments
  6. 4. Callbacks for Monitoring and Control
  7. 5. Model Persistence and Inspection
  8. 6. Evaluation and Recording
  9. 7. Advanced Features
  10. Workflow Guidance
  11. Resources
  12. scripts/
  13. references/
  14. Installation
Ships with 7 files
  • references/algorithms.md
  • references/callbacks.md
  • references/custom_environments.md
  • references/vectorized_envs.md
  • scripts/custom_env_template.py
  • scripts/evaluate_agent.py
  • scripts/train_rl_agent.py
Commands it runs
Basic installation
uv pip install stable-baselines3
With extra dependencies (Tensorboard, etc.)
uv pip install stable-baselines3[extra]
More from qinyan-academic-skills
All skills →
About this skill
What does the stable-baselines3 skill do?

Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API. Use for standard RL experiments, quick prototyping, and well-documented algorithm implementations. Best for single-agent RL with Gymnasium environments. For high-performance parallel training, multi-agent systems, or custom vectorized environments, use pufferlib instead.

How do I install it?

Run `npx skills add LeonChaoX/qinyan-academic-skills --skill stable-baselines3 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From LeonChaoX/qinyan-academic-skills, a repository with 759 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going