Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

PufferLib RL Guide

Version-aware guidance for PufferLib RL work — environment adaptation, vectorization, PuffeRL training, and safe checkpoint review across the 3.0.0 release and 4.0 source line.

Dev & CodingAdvanced33,0303,248AI score 8/10Last updated: Aug 9, 2026

What it does

  • Forces an explicit version profile so you never mix the PyPI-stable pufferlib==3.0.0 API (emulation, pufferlib.vector, Torch PuffeRL) with the redesigned 4.0 source line (native C Ocean envs, CUDA trainer, INI configs).
  • Walks through Gymnasium/PettingZoo adaptation via GymnasiumPufferEnv/PettingZooPufferEnv, plus contract validation of spaces, dtypes, seeding, and the terminated vs truncated distinction.
  • Ships dependency-free CLIs for contract checks, capped vectorization benchmarks, non-executing training-plan generation, plan validation, reproducibility plans, and checkpoint hash inspection.
  • Encodes security defaults: pinned commits and archive digests, no credentials in args/configs/logs, resource caps, separate train/eval seeds, and hash-before-load for checkpoints (no torch.load in the inspector).

Who it's for

  • RL researchers and engineers running PufferLib, or evaluating a 3.0 → 4.0 migration.
  • Anyone wiring custom Gym/PettingZoo environments into a high-throughput vectorized pipeline.
  • Teams that must vet third-party environments, native builds, or downloaded checkpoints before use.

Example uses

  1. "Does my Gymnasium env satisfy the contract?" → python3 scripts/env_contract_validator.py --steps 64 --episodes 8 --seed 42.
  2. "Draft a 10k-step CPU training run" → scripts/train_template.py --profile pypi-3.0.0 --device cpu --total-timesteps 10000, then validate_plan.py to reject unbounded resources or coupled seeds.
  3. "Is this downloaded checkpoint.pt safe?" → scripts/inspect_checkpoint.py checkpoint.pt --expected-sha256 ... to hash and classify without deserializing.

· · · 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/pufferlib/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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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/pufferlib folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pufferlib/.
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/pufferlib ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal in the folder where you keep tooling checkouts.
  2. Clone the repo: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r scientific-agent-skills/skills/pufferlib ~/.claude/skills/
  5. Confirm Python 3.10+ is available: python3 --version
  6. Restart Claude Code and ask something like "validate my PufferLib environment contract" to trigger the skill.
  7. The bundled scripts use only the standard library, so you can smoke-test immediately: python3 ~/.claude/skills/pufferlib/scripts/env_template.py --help