
PufferLib RL Guide
Guides an agent through PufferLib reinforcement-learning envs, vectorization, training and checkpoint review
- Repository
- K-Dense-AI/scientific-agent-skills
- Stars
- 55,780
- Licence
- MIT
- Files
- 15 files
What it does
Once installed, the agent can answer questions about PufferLib, a reinforcement-learning library, and pick the correct version (native 5.0, PyPI 3.0.0, or pinned 4.0) before writing code. It explains the Gymnasium-style environment contract, how to wrap environments, how to run training safely, and how to review checkpoints. It also ships small dependency-free Python checks that run synthetic environments locally to validate a contract or benchmark vectorization, without installing PufferLib.
Great for
- Developers building or porting reinforcement-learning environments who want a checklist for the step/reset contract
- Researchers comparing PufferLib versions or reproducing a pinned setup
- Teams reviewing whether an external environment or checkpoint is safe to load
Skip it if
- Users who need a turnkey training run: the bundled plan tool does not launch training and the native/PufferLib training examples were not executed in review
- Anyone wanting guaranteed results from untrusted checkpoints, pickles, ROMs or environment packages, which should be sandboxed and hash-verified first (risk of arbitrary code execution)
Try asking
- “Validate my Gymnasium environment's reset and step contract with 64 steps and 8 episodes”
- “Which PufferLib version should I use for a C/CUDA environment on a CPU-only machine?”
- “Wrap my PettingZoo Parallel environment with PufferLib 3.0.0 emulation”
- “Benchmark vectorization on synthetic environments with the serial backend”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 15 original files, the MIT licence and an attribution note.
pufferlib.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip pufferlib.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip pufferlib.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Start with the bundled synthetic CLIs; they are CPU-only, bounded, and need no network.
- Pin the exact PyPI sdist hash or git commit rather than branch names before installing.
- Build and first-run any native environment in a sandbox without credentials or sensitive mounts.
What's inside
- references/environments.md
- references/integration.md
- references/native-5.md
- references/policies.md
- references/training.md
- references/vectorization.md
- scripts/__init__.py
- scripts/_common.py
- scripts/benchmark_vectorization.py
- scripts/env_contract_validator.py
- scripts/env_template.py
- scripts/inspect_checkpoint.py
- scripts/repro_plan.py
- scripts/train_template.py
- SKILL.md
Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.