[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AT317MHZMX7STSQACNPVGY":3,"skill-same:01M7AT317MHZMX7STSQACNPVGY":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7AT317MHZMX7STSQACNPVGY","stable-baselines3",null,"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.","nikhilesh-s\u002Fclaude-toolkit","nikhilesh-s","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F123913414?v=4","01M7ARX6NXB6DFY1CCP91599KE","Nikhilesh Suravarjjala","01M7ARX6PFTQKR6ME1K2S4AZ9K",0,"MIT","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: stable-baselines3\ndescription: 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.\nlicense: MIT license\nallowed-tools: Read Write Edit Bash\ncompatibility: Requires Python 3.10+, PyTorch >= 2.3, and stable-baselines3 2.8+. Gymnasium environments; optional extras for TensorBoard and Atari (ale-py).\nmetadata:\n  version: \"1.1\"\n  skill-author: K-Dense Inc.\n---\n\n# Stable Baselines3\n\n## Overview\n\nStable 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.\n\n**Current upstream:** SB3 **2.8.0** (April 2026). Docs: [stable-baselines3.readthedocs.io](https:\u002F\u002Fstable-baselines3.readthedocs.io\u002Fen\u002Fmaster\u002F).\n\n## Installation\n\nTested against **stable-baselines3 2.8.0**. Requires **Python 3.10+** (3.9 dropped in 2.8.0) and **PyTorch >= 2.3**.\n\n```bash\n# Basic installation\nuv pip install \"stable-baselines3>=2.8\"\n\n# With extra dependencies (TensorBoard, ale-py for Atari, etc.)\nuv pip install \"stable-baselines3[extra]>=2.8\"\n```\n\nOn zsh, quote brackets: `uv pip install 'stable-baselines3[extra]>=2.8'`.\n\nFor MuJoCo continuous-control benchmarks:\n\n```bash\nuv pip install \"gymnasium[mujoco]\"\n```\n\nCheck your version:\n\n```python\nimport stable_baselines3\nprint(stable_baselines3.__version__)\n```\n\n## Related Projects\n\n- **[SB3-Contrib](https:\u002F\u002Fgithub.com\u002FStable-Baselines-Team\u002Fstable-baselines3-contrib)**: experimental algorithms (MaskablePPO, CrossQ, QR-DQN, RecurrentPPO) — separate `sb3-contrib` package\n- **[RL Baselines3 Zoo](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Frl-baselines3-zoo)**: pre-trained agents, hyperparameters, training scripts\n- **[SBX](https:\u002F\u002Fgithub.com\u002Faraffin\u002Fsbx)**: SB3 + JAX implementations for users who prefer JAX over PyTorch\n\n## Core Capabilities\n\n### 1. Training RL Agents\n\n**Basic Training Pattern:**\n\n```python\nimport gymnasium as gym\nfrom stable_baselines3 import PPO\n\n# Create environment\nenv = gym.make(\"CartPole-v1\")\n\n# Initialize agent (device=\"cpu\" is often faster for MlpPolicy on small envs)\nmodel = PPO(\"MlpPolicy\", env, verbose=1)\n\n# Train the agent\nmodel.learn(total_timesteps=10000)\n\n# Save the model\nmodel.save(\"ppo_cartpole\")\n\n# Load the model (without prior instantiation)\nmodel = PPO.load(\"ppo_cartpole\", env=env)\n```\n\n**Important Notes:**\n- `total_timesteps` is a lower bound; actual training may exceed this due to batch collection\n- Use `model.load()` as a static method, not on an existing instance\n- The replay buffer is NOT saved with the model to save space\n\n**Algorithm Selection:**\nUse `references\u002Falgorithms.md` for detailed algorithm characteristics and selection guidance. Quick reference:\n- **PPO\u002FA2C**: General-purpose, supports all action space types, good for multiprocessing\n- **SAC\u002FTD3**: Continuous control, off-policy, sample-efficient\n- **DQN**: Discrete actions, off-policy\n- **HER**: Goal-conditioned tasks\n\nSee `scripts\u002Ftrain_rl_agent.py` for a complete training template with best practices.\n\n### 2. Custom Environments\n\n**Requirements:**\nCustom environments must inherit from `gymnasium.Env` and implement:\n- `__init__()`: Define action_space and observation_space\n- `reset(seed, options)`: Return initial observation and info dict\n- `step(action)`: Return observation, reward, terminated, truncated, info\n- `render()`: Visualization (optional)\n- `close()`: Cleanup resources\n\n**Key Constraints:**\n- Image observations must be `np.uint8` in range [0, 255]\n- Use channel-first format when possible (channels, height, width)\n- SB3 normalizes images automatically by dividing by 255\n- Set `normalize_images=False` in policy_kwargs if pre-normalized\n- SB3 does NOT support `Discrete` or `MultiDiscrete` spaces with `start!=0`\n\n**Validation:**\n```python\nfrom stable_baselines3.common.env_checker import check_env\n\ncheck_env(env, warn=True)\n```\n\nSee `scripts\u002Fcustom_env_template.py` for a complete custom environment template and `references\u002Fcustom_environments.md` for comprehensive guidance.\n\n### 3. Vectorized Environments\n\n**Purpose:**\nVectorized environments run multiple environment instances in parallel, accelerating training and enabling certain wrappers (frame-stacking, normalization).\n\n**Types:**\n- **DummyVecEnv**: Sequential execution on current process (for lightweight environments)\n- **SubprocVecEnv**: Parallel execution across processes (for compute-heavy environments)\n\n**Quick Setup:**\n```python\nfrom stable_baselines3.common.env_util import make_vec_env\n\n# Create 4 parallel environments\nenv = make_vec_env(\"CartPole-v1\", n_envs=4, vec_env_cls=SubprocVecEnv)\n\nmodel = PPO(\"MlpPolicy\", env, verbose=1)\nmodel.learn(total_timesteps=25000)\n```\n\n**Off-Policy Optimization:**\nWhen using multiple environments with off-policy algorithms (SAC, TD3, DQN), set `gradient_steps=-1` to perform one gradient update per environment step, balancing wall-clock time and sample efficiency.\n\n**API Differences:**\n- `reset()` returns only observations (info available in `vec_env.reset_infos`)\n- `step()` returns 4-tuple: `(obs, rewards, dones, infos)` not 5-tuple\n- Environments auto-reset after episodes\n- Terminal observations available via `infos[env_idx][\"terminal_observation\"]`\n\nSee `references\u002Fvectorized_envs.md` for detailed information on wrappers and advanced usage.\n\n### 4. Callbacks for Monitoring and Control\n\n**Purpose:**\nCallbacks enable monitoring metrics, saving checkpoints, implementing early stopping, and custom training logic without modifying core algorithms.\n\n**Common Callbacks:**\n- **EvalCallback**: Evaluate periodically and save best model\n- **CheckpointCallback**: Save model checkpoints at intervals\n- **StopTrainingOnRewardThreshold**: Stop when target reward reached\n- **ProgressBarCallback**: Display training progress with timing\n\n**Custom Callback Structure:**\n```python\nfrom stable_baselines3.common.callbacks import BaseCallback\n\nclass CustomCallback(BaseCallback):\n    def _on_training_start(self):\n        # Called before first rollout\n        pass\n\n    def _on_step(self):\n        # Called after each environment step\n        # Return False to stop training\n        return True\n\n    def _on_rollout_end(self):\n        # Called at end of rollout\n        pass\n```\n\n**Available Attributes:**\n- `self.model`: The RL algorithm instance\n- `self.num_timesteps`: Total environment steps\n- `self.training_env`: The training environment\n\n**Chaining Callbacks:**\n```python\nfrom stable_baselines3.common.callbacks import CallbackList\n\ncallback = CallbackList([eval_callback, checkpoint_callback, custom_callback])\nmodel.learn(total_timesteps=10000, callback=callback)\n```\n\nSee `references\u002Fcallbacks.md` for comprehensive callback documentation.\n\n### 5. Model Persistence and Inspection\n\n**Saving and Loading:**\n```python\n# Save model\nmodel.save(\"model_name\")\n\n# Save normalization statistics (if using VecNormalize)\nvec_env.save(\"vec_normalize.pkl\")\n\n# Load model\nmodel = PPO.load(\"model_name\", env=env)\n\n# Load normalization statistics\nvec_env = VecNormalize.load(\"vec_normalize.pkl\", vec_env)\n```\n\n**Parameter Access:**\n```python\n# Get parameters\nparams = model.get_parameters()\n\n# Set parameters\nmodel.set_parameters(params)\n\n# Access PyTorch state dict\nstate_dict = model.policy.state_dict()\n```\n\n### 6. Evaluation and Recording\n\n**Evaluation:**\n```python\nfrom stable_baselines3.common.evaluation import evaluate_policy\n\nmean_reward, std_reward = evaluate_policy(\n    model,\n    env,\n    n_eval_episodes=10,\n    deterministic=True\n)\n```\n\n**Video Recording:**\n```python\nfrom stable_baselines3.common.vec_env import VecVideoRecorder\n\n# Wrap environment with video recorder\nenv = VecVideoRecorder(\n    env,\n    \"videos\u002F\",\n    record_video_trigger=lambda x: x % 2000 == 0,\n    video_length=200\n)\n```\n\nSee `scripts\u002Fevaluate_agent.py` for a complete evaluation and recording template.\n\n### 7. Advanced Features\n\n**Learning Rate Schedules:**\n```python\ndef linear_schedule(initial_value):\n    def func(progress_remaining):\n        # progress_remaining goes from 1 to 0\n        return progress_remaining * initial_value\n    return func\n\nmodel = PPO(\"MlpPolicy\", env, learning_rate=linear_schedule(0.001))\n```\n\n**Multi-Input Policies (Dict Observations):**\n```python\nmodel = PPO(\"MultiInputPolicy\", env, verbose=1)\n```\nUse when observations are dictionaries (e.g., combining images with sensor data).\n\n**Hindsight Experience Replay:**\n```python\nfrom stable_baselines3 import SAC, HerReplayBuffer\n\nmodel = SAC(\n    \"MultiInputPolicy\",\n    env,\n    replay_buffer_class=HerReplayBuffer,\n    replay_buffer_kwargs=dict(\n        n_sampled_goal=4,\n        goal_selection_strategy=\"future\",\n    ),\n)\n```\n\n**TensorBoard Integration:**\n```python\nmodel = PPO(\"MlpPolicy\", env, tensorboard_log=\".\u002Ftensorboard\u002F\")\nmodel.learn(total_timesteps=10000)\n```\n\n## Workflow Guidance\n\n**Starting a New RL Project:**\n\n1. **Define the problem**: Identify observation space, action space, and reward structure\n2. **Choose algorithm**: Use `references\u002Falgorithms.md` for selection guidance\n3. **Create\u002Fadapt environment**: Use `scripts\u002Fcustom_env_template.py` if needed\n4. **Validate environment**: Always run `check_env()` before training\n5. **Set up training**: Use `scripts\u002Ftrain_rl_agent.py` as starting template\n6. **Add monitoring**: Implement callbacks for evaluation and checkpointing\n7. **Optimize performance**: Consider vectorized environments for speed\n8. **Evaluate and iterate**: Use `scripts\u002Fevaluate_agent.py` for assessment\n\n**Common Issues:**\n\n- **Memory errors**: Reduce `buffer_size` for off-policy algorithms or use fewer parallel environments\n- **Slow training**: Consider SubprocVecEnv for parallel environments\n- **Unstable training**: Try different algorithms, tune hyperparameters, or check reward scaling\n- **Import errors**: Ensure `stable_baselines3` is installed: `uv pip install 'stable-baselines3[extra]>=2.8'`\n\n## Resources\n\n### scripts\u002F\n- `train_rl_agent.py`: Complete training script template with best practices\n- `evaluate_agent.py`: Agent evaluation and video recording template\n- `custom_env_template.py`: Custom Gym environment template\n\n### references\u002F\n- `algorithms.md`: Detailed algorithm comparison and selection guide\n- `custom_environments.md`: Comprehensive custom environment creation guide\n- `callbacks.md`: Complete callback system reference\n- `vectorized_envs.md`: Vectorized environment usage and wrappers\n\n","# Stable Baselines3\n\n## Overview\n\nStable 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.\n\n**Current upstream:** SB3 **2.8.0** (April 2026). Docs: [stable-baselines3.readthedocs.io](https:\u002F\u002Fstable-baselines3.readthedocs.io\u002Fen\u002Fmaster\u002F).\n\n## Installation\n\nTested against **stable-baselines3 2.8.0**. Requires **Python 3.10+** (3.9 dropped in 2.8.0) and **PyTorch >= 2.3**.\n\n```bash\n# Basic installation\nuv pip install \"stable-baselines3>=2.8\"\n\n# With extra dependencies (TensorBoard, ale-py for Atari, etc.)\nuv pip install \"stable-baselines3[extra]>=2.8\"\n```\n\nOn zsh, quote brackets: `uv pip install 'stable-baselines3[extra]>=2.8'`.\n\nFor MuJoCo continuous-control benchmarks:\n\n```bash\nuv pip install \"gymnasium[mujoco]\"\n```\n\nCheck your version:\n\n```python\nimport stable_baselines3\nprint(stable_baselines3.__version__)\n```\n\n## Related Projects\n\n- **[SB3-Contrib](https:\u002F\u002Fgithub.com\u002FStable-Baselines-Team\u002Fstable-baselines3-contrib)**: experimental algorithms (MaskablePPO, CrossQ, QR-DQN, RecurrentPPO) — separate `sb3-contrib` package\n- **[RL Baselines3 Zoo](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Frl-baselines3-zoo)**: pre-trained agents, hyperparameters, training scripts\n- **[SBX](https:\u002F\u002Fgithub.com\u002Faraffin\u002Fsbx)**: SB3 + JAX implementations for users who prefer JAX over PyTorch\n\n## Core Capabilities\n\n### 1. Training RL Agents\n\n**Basic Training Pattern:**\n\n```python\nimport gymnasium as gym\nfrom stable_baselines3 import PPO\n\n# Create environment\nenv = gym.make(\"CartPole-v1\")\n\n# Initialize agent (device=\"cpu\" is often faster for MlpPolicy on small envs)\nmodel = PPO(\"MlpPolicy\", env, verbose=1)\n\n# Train the agent\nmodel.learn(total_timesteps=10000)\n\n# Save the model\nmodel.save(\"ppo_cartpole\")\n\n# Load the model (without prior instantiation)\nmodel = PPO.load(\"ppo_cartpole\", env=env)\n```\n\n**Important Notes:**\n- `total_timesteps` is a lower bound; actual training may exceed this due to batch collection\n- Use `model.load()` as a static method, not on an existing instance\n- The replay buffer is NOT saved with the model to save space\n\n**Algorithm Selection:**\nUse `references\u002Falgorithms.md` for detailed algorithm characteristics and selection guidance. Quick reference:\n- **PPO\u002FA2C**: General-purpose, supports all action space types, good for multiprocessing\n- **SAC\u002FTD3**: Continuous control, off-policy, sample-efficient\n- **DQN**: Discrete actions, off-policy\n- **HER**: Goal-conditioned tasks\n\nSee `scripts\u002Ftrain_rl_agent.py` for a complete training template with best practices.\n\n### 2. Custom Environments\n\n**Requirements:**\nCustom environments must inherit from `gymnasium.Env` and implement:\n- `__init__()`: Define action_space and observation_space\n- `reset(seed, options)`: Return initial observation and info dict\n- `step(action)`: Return observation, reward, terminated, truncated, info\n- `render()`: Visualization (optional)\n- `close()`: Cleanup resources\n\n**Key Constraints:**\n- Image observations must be `np.uint8` in range [0, 255]\n- Use channel-first format when possible (channels, height, width)\n- SB3 normalizes images automatically by dividing by 255\n- Set `normalize_images=False` in policy_kwargs if pre-normalized\n- SB3 does NOT support `Discrete` or `MultiDiscrete` spaces with `start!=0`\n\n**Validation:**\n```python\nfrom stable_baselines3.common.env_checker import check_env\n\ncheck_env(env, warn=True)\n```\n\nSee `scripts\u002Fcustom_env_template.py` for a complete custom environment template and `references\u002Fcustom_environments.md` for comprehensive guidance.\n\n### 3. Vectorized Environments\n\n**Purpose:**\nVectorized environments run multiple environment instances in parallel, accelerating training and enabling certain wrappers (frame-stacking, normalization).\n\n**Types:**\n- **DummyVecEnv**: Sequential execution on current process (for lightweight environments)\n- **SubprocVecEnv**: Parallel execution across processes (for compute-heavy environments)\n\n**Quick Setup:**\n```python\nfrom stable_baselines3.common.env_util import make_vec_env\n\n# Create 4 parallel environments\nenv = make_vec_env(\"CartPole-v1\", n_envs=4, vec_env_cls=SubprocVecEnv)\n\nmodel = PPO(\"MlpPolicy\", env, verbose=1)\nmodel.learn(total_timesteps=25000)\n```\n\n**Off-Policy Optimization:**\nWhen using multiple environments with off-policy algorithms (SAC, TD3, DQN), set `gradient_steps=-1` to perform one gradient update per environment step, balancing wall-clock time and sample efficiency.\n\n**API Differences:**\n- `reset()` returns only observations (info available in `vec_env.reset_infos`)\n- `step()` returns 4-tuple: `(obs, rewards, dones, infos)` not 5-tuple\n- Environments auto-reset after episodes\n- Terminal observations available via `infos[env_idx][\"terminal_observation\"]`\n\nSee `references\u002Fvectorized_envs.md` for detailed information on wrappers and advanced usage.\n\n### 4. Callbacks for Monitoring and Control\n\n**Purpose:**\nCallbacks enable monitoring metrics, saving checkpoints, implementing early stopping, and custom training logic without modifying core algorithms.\n\n**Common Callbacks:**\n- **EvalCallback**: Evaluate periodically and save best model\n- **CheckpointCallback**: Save model checkpoints at intervals\n- **StopTrainingOnRewardThreshold**: Stop when target reward reached\n- **ProgressBarCallback**: Display training progress with timing\n\n**Custom Callback Structure:**\n```python\nfrom stable_baselines3.common.callbacks import BaseCallback\n\nclass CustomCallback(BaseCallback):\n    def _on_training_start(self):\n        # Called before first rollout\n        pass\n\n    def _on_step(self):\n        # Called after each environment step\n        # Return False to stop training\n        return True\n\n    def _on_rollout_end(self):\n        # Called at end of rollout\n        pass\n```\n\n**Available Attributes:**\n- `self.model`: The RL algorithm instance\n- `self.num_timesteps`: Total environment steps\n- `self.training_env`: The training environment\n\n**Chaining Callbacks:**\n```python\nfrom stable_baselines3.common.callbacks import CallbackList\n\ncallback = CallbackList([eval_callback, checkpoint_callback, custom_callback])\nmodel.learn(total_timesteps=10000, callback=callback)\n```\n\nSee `references\u002Fcallbacks.md` for comprehensive callback documentation.\n\n### 5. Model Persistence and Inspection\n\n**Saving and Loading:**\n```python\n# Save model\nmodel.save(\"model_name\")\n\n# Save normalization statistics (if using VecNormalize)\nvec_env.save(\"vec_normalize.pkl\")\n\n# Load model\nmodel = PPO.load(\"model_name\", env=env)\n\n# Load normalization statistics\nvec_env = VecNormalize.load(\"vec_normalize.pkl\", vec_env)\n```\n\n**Parameter Access:**\n```python\n# Get parameters\nparams = model.get_parameters()\n\n# Set parameters\nmodel.set_parameters(params)\n\n# Access PyTorch state dict\nstate_dict = model.policy.state_dict()\n```\n\n### 6. Evaluation and Recording\n\n**Evaluation:**\n```python\nfrom stable_baselines3.common.evaluation import evaluate_policy\n\nmean_reward, std_reward = evaluate_policy(\n    model,\n    env,\n    n_eval_episodes=10,\n    deterministic=True\n)\n```\n\n**Video Recording:**\n```python\nfrom stable_baselines3.common.vec_env import VecVideoRecorder\n\n# Wrap environment with video recorder\nenv = VecVideoRecorder(\n    env,\n    \"videos\u002F\",\n    record_video_trigger=lambda x: x % 2000 == 0,\n    video_length=200\n)\n```\n\nSee `scripts\u002Fevaluate_agent.py` for a complete evaluation and recording template.\n\n### 7. Advanced Features\n\n**Learning Rate Schedules:**\n```python\ndef linear_schedule(initial_value):\n    def func(progress_remaining):\n        # progress_remaining goes from 1 to 0\n        return progress_remaining * initial_value\n    return func\n\nmodel = PPO(\"MlpPolicy\", env, learning_rate=linear_schedule(0.001))\n```\n\n**Multi-Input Policies (Dict Observations):**\n```python\nmodel = PPO(\"MultiInputPolicy\", env, verbose=1)\n```\nUse when observations are dictionaries (e.g., combining images with sensor data).\n\n**Hindsight Experience Replay:**\n```python\nfrom stable_baselines3 import SAC, HerReplayBuffer\n\nmodel = SAC(\n    \"MultiInputPolicy\",\n    env,\n    replay_buffer_class=HerReplayBuffer,\n    replay_buffer_kwargs=dict(\n        n_sampled_goal=4,\n        goal_selection_strategy=\"future\",\n    ),\n)\n```\n\n**TensorBoard Integration:**\n```python\nmodel = PPO(\"MlpPolicy\", env, tensorboard_log=\".\u002Ftensorboard\u002F\")\nmodel.learn(total_timesteps=10000)\n```\n\n## Workflow Guidance\n\n**Starting a New RL Project:**\n\n1. **Define the problem**: Identify observation space, action space, and reward structure\n2. **Choose algorithm**: Use `references\u002Falgorithms.md` for selection guidance\n3. **Create\u002Fadapt environment**: Use `scripts\u002Fcustom_env_template.py` if needed\n4. **Validate environment**: Always run `check_env()` before training\n5. **Set up training**: Use `scripts\u002Ftrain_rl_agent.py` as starting template\n6. **Add monitoring**: Implement callbacks for evaluation and checkpointing\n7. **Optimize performance**: Consider vectorized environments for speed\n8. **Evaluate and iterate**: Use `scripts\u002Fevaluate_agent.py` for assessment\n\n**Common Issues:**\n\n- **Memory errors**: Reduce `buffer_size` for off-policy algorithms or use fewer parallel environments\n- **Slow training**: Consider SubprocVecEnv for parallel environments\n- **Unstable training**: Try different algorithms, tune hyperparameters, or check reward scaling\n- **Import errors**: Ensure `stable_baselines3` is installed: `uv pip install 'stable-baselines3[extra]>=2.8'`\n\n## Resources\n\n### scripts\u002F\n- `train_rl_agent.py`: Complete training script template with best practices\n- `evaluate_agent.py`: Agent evaluation and video recording template\n- `custom_env_template.py`: Custom Gym environment template\n\n### references\u002F\n- `algorithms.md`: Detailed algorithm comparison and selection guide\n- `custom_environments.md`: Comprehensive custom environment creation guide\n- `callbacks.md`: Complete callback system reference\n- `vectorized_envs.md`: Vectorized environment usage and wrappers\n\n",{"name":5,"license":24,"metadata":25,"description":7,"allowed-tools":28,"compatibility":29},"MIT license",{"version":26,"skill-author":27},"1.1","K-Dense Inc.","Read Write Edit Bash","Requires Python 3.10+, PyTorch >= 2.3, and stable-baselines3 2.8+. Gymnasium environments; optional extras for TensorBoard and Atari (ale-py).","nik-claude-toolkit","4feaa2876384b593d9e30d9190bc56985eeeeb8e","skills\u002Fstable-baselines3","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s","2026-10-22 14:30:58",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add nikhilesh-s\u002Fclaude-toolkit --skill stable-baselines3",{"tool":42,"command":43},"bunx","bunx skills add nikhilesh-s\u002Fclaude-toolkit --skill stable-baselines3",{"tool":45,"command":46},"pnpm","pnpm dlx skills add nikhilesh-s\u002Fclaude-toolkit --skill stable-baselines3","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002FSKILL.md",true,[50,56,60,64,68,74,78],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Falgorithms.md","REFERENCE","参考文档",10953,"https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002Freferences\u002Falgorithms.md",{"path":57,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fcallbacks.md",16336,"https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002Freferences\u002Fcallbacks.md",{"path":61,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fcustom_environments.md",14124,"https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002Freferences\u002Fcustom_environments.md",{"path":65,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fvectorized_envs.md",15413,"https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002Freferences\u002Fvectorized_envs.md",{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Fcustom_env_template.py","SCRIPT","脚本",9350,"https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002Fscripts\u002Fcustom_env_template.py",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fevaluate_agent.py",7335,"https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002Fscripts\u002Fevaluate_agent.py",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002Ftrain_rl_agent.py",5123,"https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fstable-baselines3\u002Fscripts\u002Ftrain_rl_agent.py",[83,90,98,105,112,119],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7AT8339CZMCRMRZP6G1R329","zarr-python","Chunked N-D arrays for cloud storage (Zarr-Python 3). Compressed arrays, parallel I\u002FO, S3\u002FGCS via fsspec, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7AT77E7JPH96ETQBNDVVYDM","video-use","Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fvideo-use\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fvideo-use\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7AT6YVX000D73Q40SBPZYKP","venue-templates","Prepare journal manuscripts, conference papers, research posters, and grant documents using venue-specific formatting guidance and bundled LaTeX scaffolds. Use when selecting an official template, checking current page or anonymity rules, adapting academic writing to a venue, or inspecting a submission PDF.","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fvenue-templates\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7AT6SGGBENKX1G6V8V9G2MJ","vaex","Use this skill for processing and analyzing large tabular datasets (billions of rows) that exceed available RAM. Vaex excels at out-of-core DataFrame operations, lazy evaluation, fast aggregations, efficient visualization of big data, and machine learning on large datasets. Apply when users need to work with large CSV\u002FHDF5\u002FArrow\u002FParquet files, perform fast statistics on massive datasets, create visualizations of big data, or build ML pipelines that do not fit in memory.","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fvaex\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7AT6HHDJ54MR4HDPFHJYR7G","usfiscaldata","Query the U.S. Treasury Fiscal Data REST API for federal financial data. No API key required. Use for national debt (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates, foreign exchange rates, savings bonds, or U.S. government revenue and spending statistics.","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Fusfiscaldata\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7AT662JFE4THBVAZBB3ANJD","uncertainty-and-units","Track physical units and propagate measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.","https:\u002F\u002Fgithub.com\u002Fnikhilesh-s\u002Fclaude-toolkit\u002Fblob\u002Fnik-claude-toolkit\u002Fskills\u002Funcertainty-and-units\u002FSKILL.md",[],[]]