adaptyv
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
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
$ npx -y skills add K-Dense-AI/scientific-agent-skills --skill stable-baselines3 --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/stable-baselines3Context preview
The summary Claude sees to decide when to auto-load this skill.
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
name: stable-baselines3 description: 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. license: MIT license allowed-tools: Read Write Edit Bash compatibility: Requires Python 3.10+, PyTorch >= 2.3, and stable-baselines3 2.8+. Gymnasium environments; optional extras for TensorBoard and Atari (ale-py). metadata: version: "1.3" skill-author: K-Dense Inc.
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.
**Current upstream:** SB3 **2.8.0** (April 2026). Docs: [stable-baselines3.readthedocs.io](https://stable-baselines3.readthedocs.io/en/master/).
Tested against **stable-baselines3 2.8.0**. Requires **Python 3.10+** (3.9 dropped in 2.8.0) and **PyTorch >= 2.3**.
# Basic installation uv pip install "stable-baselines3>=2.8" # With extra dependencies (TensorBoard, ale-py for Atari, etc.) uv pip install "stable-baselines3[extra]>=2.8"
On zsh, quote brackets: `uv pip install 'stable-baselines3[extra]>=2.8'`.
For MuJoCo continuous-control benchmarks:
uv pip install "gymnasium[mujoco]"
Check your version:
import stable_baselines3 print(stable_baselines3.__version__)
**Basic Training Pattern:**
import gymnasium as gym
from stable_baselines3 import PPO
# Create environment
env = gym.make("CartPole-v1")
# Initialize agent (device="cpu" is often faster for MlpPolicy on small envs)
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:**
**Algorithm Selection:** Use `references/algorithms.md` for detailed algorithm characteristics and selection guidance. Quick reference:
See `scripts/train_rl_agent.py` for a complete training template with best practices.
**Requirements:** Custom environments must inherit from `gymnasium.Env` and implement:
**Key Constraints:**
**Validation:**
from stable_baselines3.common.env_checker import check_env check_env(env, warn=True)
See `scripts/custom_env_template.py` for a complete custom environment template and `references/custom_environments.md` for comprehensive guidance.
**Purpose:** Vectorized environments run multiple environment instances in parallel, accelerating training and enabling certain wrappers (frame-stacking, normalization).
**Types:**
**Quick Setup:**
from stable_baselines3.common.env_util import make_vec_env
# Create 4 parallel environments
env = make_vec_env("CartPole-v1", n_envs=4, vec_env_cls=SubprocVecEnv)
model = PPO("MlpPolicy", env, verbose=1)
model.learn(total_timesteps=25000)**Off-Policy Optimization:** When 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.
**API Differences:**
See `references/vectorized_envs.md` for detailed information on wrappers and advanced usage.
**Purpose:** Callbacks enable monitoring metrics, saving checkpoints, implementing early stopping, and custom training logic without modifying core algorithms.
**Common Callbacks:**
🔔 Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility — now works with any AI agent that supports the open Agent Skills standard, not just Claude.
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP…
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data…
Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree…
Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk…