[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MATF7PN1ADTMSEDNTPX9EE":3,"skill-same:01M6MATF7PN1ADTMSEDNTPX9EE":137},{"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":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6MATF7PN1ADTMSEDNTPX9EE","pufferlib",null,"Version-aware guidance for PufferLib reinforcement-learning environments, vectorization, policies, PuffeRL training, evaluation, and safe checkpoint review. Use when adapting Gymnasium\u002FPettingZoo environments to published PufferLib 3.0.0 or working with the redesigned native 4.0 source line.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"never","2026","when","source","environments","native","CPU","data-science","line","but","only","review","read","Bash","data","network","Evaluation","library","code","training","safe","2026-11-10 10:12:30",false,"---\nname: pufferlib\ndescription: Version-aware guidance for PufferLib reinforcement-learning environments, vectorization, policies, PuffeRL training, evaluation, and safe checkpoint review. Use when adapting Gymnasium\u002FPettingZoo environments to published PufferLib 3.0.0 or working with the redesigned native 4.0 source line.\nlicense: MIT\ncompatibility: Bundled CLIs require Python 3.10+ and use only the standard library. Published pufferlib 3.0.0 supports Python >=3.9 but ships as a native-code source archive; current 4.0 source requires Python >=3.10, Torch >=2.9, and an audited CPU\u002FCUDA toolchain. Network, GPU, native builds, environment plug-ins, assets, checkpoints, and external logging are never required by the bundled CLIs.\nallowed-tools: Read Bash Grep Python\nmetadata:\n  version: '1.2'\n  category: data-science-and-ml\n  maintainer: Kalaris Labs\n  last-reviewed: '2026-07-23'\n  tags: reinforcement learning, RL environments, training, machine learning\n---\n\n# PufferLib\n\nUse PufferLib with an explicit version profile. Upstream currently has two\nincompatible surfaces:\n\n| Profile | Status on 2026-07-23 | Main use |\n|---|---|---|\n| `pufferlib==3.0.0` | Latest stable PyPI release, published 2025-06-23 | Python\u002FGymnasium\u002FPettingZoo emulation, `pufferlib.vector`, Torch PuffeRL |\n| source `4.0` | Upstream default branch; not the latest stable PyPI artifact | Native C Ocean environments, native CUDA trainer, optional Torch fallback |\n\nDo not combine 3.0 imports with 4.0 config\u002FCLI examples. The 4.0 redesign\nremoved the 3.0 `emulation`, `vector`, and `pytorch` modules from the current\npackage tree.\n\n## Safe defaults\n\n1. Start with bundled synthetic, CPU-only, network-free tools.\n2. Do not import an arbitrary environment by dotted path. Bundled tools accept\n   only allowlisted built-ins and slug identifiers.\n3. Do not install or execute an unreviewed environment package, native\n   extension, ROM, map, checkpoint, or pickle file.\n4. Verify official source, immutable revision, licenses, checksums or\n   attestations, and build hooks. Sandbox native builds and first execution.\n5. Cap steps, environments, agents, workers, threads, buffers, memory, disk,\n   render size, and wall time.\n6. Keep training and evaluation environments\u002Fseeds separate.\n7. Default logging to local\u002Fnone. External logging requires explicit opt-in,\n   disclosure acknowledgment, and separate artifact-upload approval.\n8. Never pass W&B or Neptune credentials via CLI, INI, JSON, tags, run names, or\n   logger configuration. Never print them.\n9. Never dump all environment variables or recursively search for `.env`.\n10. Hash checkpoint bytes before trusted, sandboxed loading; metadata inspection\n    is not proof of safety.\n\n## First local checks\n\nAll bundled CLIs are dependency-free and emit strict JSON:\n\n```bash\npython3 scripts\u002Fenv_template.py --help\npython3 scripts\u002Fenv_contract_validator.py\npython3 scripts\u002Fbenchmark_vectorization.py --backend serial\npython3 scripts\u002Ftrain_template.py\npython3 scripts\u002Fvalidate_plan.py\npython3 scripts\u002Frepro_plan.py\n```\n\nDefaults are synthetic, deterministic, bounded, local, CPU-only, no-network,\nand dry-run where training would otherwise occur.\n\n## Installation and provenance\n\n### Published 3.0.0\n\nPyPI supplies only `pufferlib-3.0.0.tar.gz`:\n\n```text\nsha256: 7df3a3e3f5f894d78d2a1f5374097890aec01473183e748abefe4f3faa10eaa9\nRequires-Python: >=3.9\n```\n\nAfter source\u002Fbuild review, create a pinned uv project:\n\n```bash\nuv venv --python 3.11\nuv add --exact --no-sync \"pufferlib==3.0.0\"\nuv lock\nuv sync --frozen\n```\n\nCommit `pyproject.toml` and `uv.lock`; verify the archive digest and every\nresolved dependency. The source build can compile native code and fetch build\nassets, so resolve\u002Fbuild in a sandbox without credentials or sensitive mounts.\nThe uploaded metadata does not pin Torch or CUDA; do not claim a supported CUDA\nmatrix that PyPI does not declare.\n\n### Current 4.0 source\n\nThe reviewed branch head on 2026-07-23 was:\n\n```text\n25647630e1b15330bb3153a5a0d3ff8d234c3acf\n```\n\nPin the commit, not branch `4.0`:\n\n```bash\nuv add --no-sync \\\n  \"pufferlib @ git+https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib.git@25647630e1b15330bb3153a5a0d3ff8d234c3acf\"\nuv lock\n```\n\nThe current package declares Python `>=3.10` and Torch `>=2.9`. Upstream\nPufferTank currently uses Ubuntu 24.04, Python 3.12, and an NVIDIA CUDA\n13.0.2\u002FcuDNN development image with the `cu130` Torch index, but does not pin\nthe exact Torch wheel or all system packages. Treat it as a reference, not a\ncomplete lock. Never execute a remote installer directly from a pipe.\n\nRead `references\u002Ftraining.md` before any installation or build.\n\n## Environment workflow\n\n### 1. Validate the contract\n\nGymnasium reset returns `(observation, info)`. Step returns:\n\n```python\n(observation, reward, terminated, truncated, info)\n```\n\nValidate spaces, shapes, dtypes, finite rewards, booleans, reset-before-step,\nreset-after-end, seeding, and cleanup. `terminated` is an MDP terminal;\n`truncated` is an external cutoff such as a time limit. Preserve the distinction\nfor bootstrapping and metrics.\n\n```bash\npython3 scripts\u002Fenv_contract_validator.py \\\n  --steps 64 --episodes 8 --seed 42\n```\n\n### 2. Adapt only after review\n\nPublished 3.0 uses explicit wrappers:\n\n```python\nimport pufferlib.emulation\n\nwrapped = pufferlib.emulation.GymnasiumPufferEnv(reviewed_gymnasium_instance)\n```\n\nFor a reviewed PettingZoo Parallel environment:\n\n```python\nwrapped = pufferlib.emulation.PettingZooPufferEnv(reviewed_parallel_instance)\n```\n\nThere is no supported 3.0 `pufferlib.emulate(...)` shortcut matching the old\nskill. Read `references\u002Fenvironments.md` and `references\u002Fintegration.md`.\n\n### 3. Native environments\n\nPublished 3.0 `PufferEnv` requires\n`single_observation_space`, `single_action_space`, and `num_agents` before\n`super().__init__(buf)`. It uses in-place vector buffers and returns separate\nterminal\u002Ftruncation arrays plus a list of info dictionaries.\n\nCurrent 4.0 uses C bindings. Start from upstream `ocean\u002Fsquared` (single-agent)\nor `ocean\u002Ftarget` (multi-agent), build one environment in local\u002Fsanitized mode,\nand verify every buffer size\u002Ftype\u002Findex before optimization.\n\n## Vectorization workflow\n\nPublished 3.0:\n\n```python\nimport pufferlib.vector\n\nvecenv = pufferlib.vector.make(\n    reviewed_creator,\n    backend=pufferlib.vector.Serial,\n    num_envs=4,\n    seed=42,\n)\n```\n\nMove to `Multiprocessing` only after serial traces pass. Record\n`num_envs`, `num_workers`, `batch_size`, zero-copy mode, start method, agent\ncount, masks, and actual returned shapes. For multi-agent environments, batch\nlength is based on agent slots, not necessarily `num_envs`.\n\nCurrent 4.0 config instead uses:\n\n```ini\n[vec]\ntotal_agents = 4096\nnum_buffers = 2\nnum_threads = 16\n```\n\nRead `references\u002Fvectorization.md`. Benchmark fixed work with warmup and at least\nthree repeats; report simulation and end-to-end training SPS separately. The\nbundled benchmark measures only its synthetic harness.\n\n## Policy workflow\n\nPublished 3.0 policies are Torch modules sized from\n`single_observation_space`\u002F`single_action_space`. Stable recurrent composition\nuses `encode_observations` and `decode_actions`; structured emulation uses\n`pufferlib.pytorch.nativize_dtype` and `nativize_tensor`.\n\nCurrent 4.0 Torch fallback composes:\n\n```python\npufferlib.models.Policy(encoder=encoder, decoder=decoder, network=network)\n```\n\nIt provides MLP, MinGRU, LSTM, and GRU network choices; `--slowly` selects this\nfallback instead of the native backend. Check output\u002Fstate shapes, masks,\nfinite values, gradients, and eager-versus-compiled behavior. See\n`references\u002Fpolicies.md`.\n\n## Training and evaluation\n\nPublished 3.0 trainer import:\n\n```python\nfrom pufferlib import pufferl\n\ntrainer = pufferl.PuffeRL(train_config, vecenv, policy)\n```\n\nCurrent 4.0 CLI:\n\n```bash\npuffer train ENV_NAME\npuffer eval ENV_NAME --load-model-path EXACT_TRUSTED_PATH\npuffer sweep ENV_NAME\n```\n\nGenerate a plan instead of launching by default:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --profile pypi-3.0.0 \\\n  --environment synthetic \\\n  --device cpu \\\n  --total-timesteps 10000\n```\n\nValidate a custom strict-JSON plan:\n\n```bash\npython3 scripts\u002Fvalidate_plan.py --root . --config plan.json\n```\n\nThe schema rejects secret-bearing keys, unbounded resources, dotted environment\npaths, invalid vector divisibility, mixed-version options, and coupled\ntrain\u002Feval seeds. See `references\u002Ftraining.md`.\n\n## Logging\n\nPufferLib 3.0 exposes W&B and Neptune; current 4.0 CLI exposes W&B. Both are\noptional external services. They may transmit configuration, metrics, source\nmetadata, hardware telemetry, output, and approved artifacts, with privacy,\nretention, access-control, and cost implications.\n\n- W&B credential: named environment variable `WANDB_API_KEY`.\n- Neptune credential: named environment variable `NEPTUNE_API_TOKEN`.\n- Never put values in arguments\u002Fconfig\u002Flogs.\n- Sanitize config keys before logging.\n- Keep source\u002Fmodel upload off unless explicitly approved.\n\nThe planner requires both:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --logger wandb \\\n  --enable-external-logging \\\n  --acknowledge-external-disclosure\n```\n\nIt reports only the required variable name and never reads its value.\n\n## Checkpoint workflow\n\nPufferLib 3.0 and the 4.0 Torch fallback use Torch serialization; current native\n4.0 writes opaque `.bin` weights. PyTorch warns that untrusted models are\nprograms and that `torch.load` uses unpickling.\n\n```bash\npython3 scripts\u002Finspect_checkpoint.py checkpoint.pt \\\n  --root . \\\n  --expected-sha256 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n```\n\nThe inspector hashes and classifies only. It does not call `torch.load`, import\npickle\u002FTorch, inspect archive members, or extract files. Verify source, license,\narchitecture, environment revision, sidecar metadata, and checksum before any\nsandboxed load. Never use `latest` in a reproducible evaluation.\n\n## Bundled files\n\n### Scripts\n\n- `scripts\u002Fenv_template.py` — deterministic synthetic Gymnasium-style template.\n- `scripts\u002Fenv_contract_validator.py` — bounded contract and seed checks.\n- `scripts\u002Fbenchmark_vectorization.py` — capped serial\u002Fspawn synthetic benchmark.\n- `scripts\u002Ftrain_template.py` — non-executing 3.0\u002F4.0 training-plan generator.\n- `scripts\u002Fvalidate_plan.py` — strict config\u002Fresource\u002Fsecurity validator.\n- `scripts\u002Finspect_checkpoint.py` — metadata\u002Fhash inspection without deserialization.\n- `scripts\u002Frepro_plan.py` — separate-seed evaluation and benchmark plan.\n\n### References\n\n- `references\u002Fenvironments.md` — Gymnasium, stable PufferEnv, emulation, native C.\n- `references\u002Fvectorization.md` — backends, shapes, start methods, benchmarks.\n- `references\u002Fpolicies.md` — stable\u002Fcurrent policy contracts and state safety.\n- `references\u002Ftraining.md` — installs, config, CLI, PuffeRL, eval, logs, checkpoints.\n- `references\u002Fintegration.md` — migration matrix, third-party and credential safety.\n\n## Dated upstream sources\n\n- [PyPI pufferlib 3.0.0](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpufferlib\u002F3.0.0\u002F) —\n  released 2025-06-23; checked 2026-07-23.\n- [PyPI 3.0.0 metadata](https:\u002F\u002Fpypi.org\u002Fpypi\u002Fpufferlib\u002F3.0.0\u002Fjson) —\n  digest\u002Fdependencies; checked 2026-07-23.\n- [PufferLib official docs](https:\u002F\u002Fpuffer.ai\u002Fdocs.html) — current 4.0 docs;\n  checked 2026-07-23.\n- [PufferLib source](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib) — default branch and\n  implementation; checked 2026-07-23.\n- [PufferTank 4.0 Dockerfile](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferTank\u002Fblob\u002F4.0\u002Fpuffertank.dockerfile)\n  — CUDA\u002FPython reference; checked 2026-07-23.\n- [PufferLib 2.0 paper](https:\u002F\u002Fopenreview.net\u002Fforum?id=qRyteMTgn0) —\n  Reinforcement Learning Journal, 2025; use only for its stated benchmarks.\n- [PufferLib compatibility paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2406.12905) —\n  submitted 2024-06-18; describes an earlier API\u002Fperformance profile.\n\n## Related skills\n\n- `stable-baselines3`: Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API.\n- `evaluating-cosmos-policy`: Evaluates NVIDIA Cosmos Policy on LIBERO and RoboCasa simulation environments.\n- `fine-tuning-serving-openpi`: Fine-tune and serve Physical Intelligence OpenPI models (pi0, pi0-fast, pi0.5) using JAX or PyTorch backends for robot policy inference acr…\n","# PufferLib\n\nUse PufferLib with an explicit version profile. Upstream currently has two\nincompatible surfaces:\n\n| Profile | Status on 2026-07-23 | Main use |\n|---|---|---|\n| `pufferlib==3.0.0` | Latest stable PyPI release, published 2025-06-23 | Python\u002FGymnasium\u002FPettingZoo emulation, `pufferlib.vector`, Torch PuffeRL |\n| source `4.0` | Upstream default branch; not the latest stable PyPI artifact | Native C Ocean environments, native CUDA trainer, optional Torch fallback |\n\nDo not combine 3.0 imports with 4.0 config\u002FCLI examples. The 4.0 redesign\nremoved the 3.0 `emulation`, `vector`, and `pytorch` modules from the current\npackage tree.\n\n## Safe defaults\n\n1. Start with bundled synthetic, CPU-only, network-free tools.\n2. Do not import an arbitrary environment by dotted path. Bundled tools accept\n   only allowlisted built-ins and slug identifiers.\n3. Do not install or execute an unreviewed environment package, native\n   extension, ROM, map, checkpoint, or pickle file.\n4. Verify official source, immutable revision, licenses, checksums or\n   attestations, and build hooks. Sandbox native builds and first execution.\n5. Cap steps, environments, agents, workers, threads, buffers, memory, disk,\n   render size, and wall time.\n6. Keep training and evaluation environments\u002Fseeds separate.\n7. Default logging to local\u002Fnone. External logging requires explicit opt-in,\n   disclosure acknowledgment, and separate artifact-upload approval.\n8. Never pass W&B or Neptune credentials via CLI, INI, JSON, tags, run names, or\n   logger configuration. Never print them.\n9. Never dump all environment variables or recursively search for `.env`.\n10. Hash checkpoint bytes before trusted, sandboxed loading; metadata inspection\n    is not proof of safety.\n\n## First local checks\n\nAll bundled CLIs are dependency-free and emit strict JSON:\n\n```bash\npython3 scripts\u002Fenv_template.py --help\npython3 scripts\u002Fenv_contract_validator.py\npython3 scripts\u002Fbenchmark_vectorization.py --backend serial\npython3 scripts\u002Ftrain_template.py\npython3 scripts\u002Fvalidate_plan.py\npython3 scripts\u002Frepro_plan.py\n```\n\nDefaults are synthetic, deterministic, bounded, local, CPU-only, no-network,\nand dry-run where training would otherwise occur.\n\n## Installation and provenance\n\n### Published 3.0.0\n\nPyPI supplies only `pufferlib-3.0.0.tar.gz`:\n\n```text\nsha256: 7df3a3e3f5f894d78d2a1f5374097890aec01473183e748abefe4f3faa10eaa9\nRequires-Python: >=3.9\n```\n\nAfter source\u002Fbuild review, create a pinned uv project:\n\n```bash\nuv venv --python 3.11\nuv add --exact --no-sync \"pufferlib==3.0.0\"\nuv lock\nuv sync --frozen\n```\n\nCommit `pyproject.toml` and `uv.lock`; verify the archive digest and every\nresolved dependency. The source build can compile native code and fetch build\nassets, so resolve\u002Fbuild in a sandbox without credentials or sensitive mounts.\nThe uploaded metadata does not pin Torch or CUDA; do not claim a supported CUDA\nmatrix that PyPI does not declare.\n\n### Current 4.0 source\n\nThe reviewed branch head on 2026-07-23 was:\n\n```text\n25647630e1b15330bb3153a5a0d3ff8d234c3acf\n```\n\nPin the commit, not branch `4.0`:\n\n```bash\nuv add --no-sync \\\n  \"pufferlib @ git+https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib.git@25647630e1b15330bb3153a5a0d3ff8d234c3acf\"\nuv lock\n```\n\nThe current package declares Python `>=3.10` and Torch `>=2.9`. Upstream\nPufferTank currently uses Ubuntu 24.04, Python 3.12, and an NVIDIA CUDA\n13.0.2\u002FcuDNN development image with the `cu130` Torch index, but does not pin\nthe exact Torch wheel or all system packages. Treat it as a reference, not a\ncomplete lock. Never execute a remote installer directly from a pipe.\n\nRead `references\u002Ftraining.md` before any installation or build.\n\n## Environment workflow\n\n### 1. Validate the contract\n\nGymnasium reset returns `(observation, info)`. Step returns:\n\n```python\n(observation, reward, terminated, truncated, info)\n```\n\nValidate spaces, shapes, dtypes, finite rewards, booleans, reset-before-step,\nreset-after-end, seeding, and cleanup. `terminated` is an MDP terminal;\n`truncated` is an external cutoff such as a time limit. Preserve the distinction\nfor bootstrapping and metrics.\n\n```bash\npython3 scripts\u002Fenv_contract_validator.py \\\n  --steps 64 --episodes 8 --seed 42\n```\n\n### 2. Adapt only after review\n\nPublished 3.0 uses explicit wrappers:\n\n```python\nimport pufferlib.emulation\n\nwrapped = pufferlib.emulation.GymnasiumPufferEnv(reviewed_gymnasium_instance)\n```\n\nFor a reviewed PettingZoo Parallel environment:\n\n```python\nwrapped = pufferlib.emulation.PettingZooPufferEnv(reviewed_parallel_instance)\n```\n\nThere is no supported 3.0 `pufferlib.emulate(...)` shortcut matching the old\nskill. Read `references\u002Fenvironments.md` and `references\u002Fintegration.md`.\n\n### 3. Native environments\n\nPublished 3.0 `PufferEnv` requires\n`single_observation_space`, `single_action_space`, and `num_agents` before\n`super().__init__(buf)`. It uses in-place vector buffers and returns separate\nterminal\u002Ftruncation arrays plus a list of info dictionaries.\n\nCurrent 4.0 uses C bindings. Start from upstream `ocean\u002Fsquared` (single-agent)\nor `ocean\u002Ftarget` (multi-agent), build one environment in local\u002Fsanitized mode,\nand verify every buffer size\u002Ftype\u002Findex before optimization.\n\n## Vectorization workflow\n\nPublished 3.0:\n\n```python\nimport pufferlib.vector\n\nvecenv = pufferlib.vector.make(\n    reviewed_creator,\n    backend=pufferlib.vector.Serial,\n    num_envs=4,\n    seed=42,\n)\n```\n\nMove to `Multiprocessing` only after serial traces pass. Record\n`num_envs`, `num_workers`, `batch_size`, zero-copy mode, start method, agent\ncount, masks, and actual returned shapes. For multi-agent environments, batch\nlength is based on agent slots, not necessarily `num_envs`.\n\nCurrent 4.0 config instead uses:\n\n```ini\n[vec]\ntotal_agents = 4096\nnum_buffers = 2\nnum_threads = 16\n```\n\nRead `references\u002Fvectorization.md`. Benchmark fixed work with warmup and at least\nthree repeats; report simulation and end-to-end training SPS separately. The\nbundled benchmark measures only its synthetic harness.\n\n## Policy workflow\n\nPublished 3.0 policies are Torch modules sized from\n`single_observation_space`\u002F`single_action_space`. Stable recurrent composition\nuses `encode_observations` and `decode_actions`; structured emulation uses\n`pufferlib.pytorch.nativize_dtype` and `nativize_tensor`.\n\nCurrent 4.0 Torch fallback composes:\n\n```python\npufferlib.models.Policy(encoder=encoder, decoder=decoder, network=network)\n```\n\nIt provides MLP, MinGRU, LSTM, and GRU network choices; `--slowly` selects this\nfallback instead of the native backend. Check output\u002Fstate shapes, masks,\nfinite values, gradients, and eager-versus-compiled behavior. See\n`references\u002Fpolicies.md`.\n\n## Training and evaluation\n\nPublished 3.0 trainer import:\n\n```python\nfrom pufferlib import pufferl\n\ntrainer = pufferl.PuffeRL(train_config, vecenv, policy)\n```\n\nCurrent 4.0 CLI:\n\n```bash\npuffer train ENV_NAME\npuffer eval ENV_NAME --load-model-path EXACT_TRUSTED_PATH\npuffer sweep ENV_NAME\n```\n\nGenerate a plan instead of launching by default:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --profile pypi-3.0.0 \\\n  --environment synthetic \\\n  --device cpu \\\n  --total-timesteps 10000\n```\n\nValidate a custom strict-JSON plan:\n\n```bash\npython3 scripts\u002Fvalidate_plan.py --root . --config plan.json\n```\n\nThe schema rejects secret-bearing keys, unbounded resources, dotted environment\npaths, invalid vector divisibility, mixed-version options, and coupled\ntrain\u002Feval seeds. See `references\u002Ftraining.md`.\n\n## Logging\n\nPufferLib 3.0 exposes W&B and Neptune; current 4.0 CLI exposes W&B. Both are\noptional external services. They may transmit configuration, metrics, source\nmetadata, hardware telemetry, output, and approved artifacts, with privacy,\nretention, access-control, and cost implications.\n\n- W&B credential: named environment variable `WANDB_API_KEY`.\n- Neptune credential: named environment variable `NEPTUNE_API_TOKEN`.\n- Never put values in arguments\u002Fconfig\u002Flogs.\n- Sanitize config keys before logging.\n- Keep source\u002Fmodel upload off unless explicitly approved.\n\nThe planner requires both:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --logger wandb \\\n  --enable-external-logging \\\n  --acknowledge-external-disclosure\n```\n\nIt reports only the required variable name and never reads its value.\n\n## Checkpoint workflow\n\nPufferLib 3.0 and the 4.0 Torch fallback use Torch serialization; current native\n4.0 writes opaque `.bin` weights. PyTorch warns that untrusted models are\nprograms and that `torch.load` uses unpickling.\n\n```bash\npython3 scripts\u002Finspect_checkpoint.py checkpoint.pt \\\n  --root . \\\n  --expected-sha256 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n```\n\nThe inspector hashes and classifies only. It does not call `torch.load`, import\npickle\u002FTorch, inspect archive members, or extract files. Verify source, license,\narchitecture, environment revision, sidecar metadata, and checksum before any\nsandboxed load. Never use `latest` in a reproducible evaluation.\n\n## Bundled files\n\n### Scripts\n\n- `scripts\u002Fenv_template.py` — deterministic synthetic Gymnasium-style template.\n- `scripts\u002Fenv_contract_validator.py` — bounded contract and seed checks.\n- `scripts\u002Fbenchmark_vectorization.py` — capped serial\u002Fspawn synthetic benchmark.\n- `scripts\u002Ftrain_template.py` — non-executing 3.0\u002F4.0 training-plan generator.\n- `scripts\u002Fvalidate_plan.py` — strict config\u002Fresource\u002Fsecurity validator.\n- `scripts\u002Finspect_checkpoint.py` — metadata\u002Fhash inspection without deserialization.\n- `scripts\u002Frepro_plan.py` — separate-seed evaluation and benchmark plan.\n\n### References\n\n- `references\u002Fenvironments.md` — Gymnasium, stable PufferEnv, emulation, native C.\n- `references\u002Fvectorization.md` — backends, shapes, start methods, benchmarks.\n- `references\u002Fpolicies.md` — stable\u002Fcurrent policy contracts and state safety.\n- `references\u002Ftraining.md` — installs, config, CLI, PuffeRL, eval, logs, checkpoints.\n- `references\u002Fintegration.md` — migration matrix, third-party and credential safety.\n\n## Dated upstream sources\n\n- [PyPI pufferlib 3.0.0](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpufferlib\u002F3.0.0\u002F) —\n  released 2025-06-23; checked 2026-07-23.\n- [PyPI 3.0.0 metadata](https:\u002F\u002Fpypi.org\u002Fpypi\u002Fpufferlib\u002F3.0.0\u002Fjson) —\n  digest\u002Fdependencies; checked 2026-07-23.\n- [PufferLib official docs](https:\u002F\u002Fpuffer.ai\u002Fdocs.html) — current 4.0 docs;\n  checked 2026-07-23.\n- [PufferLib source](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib) — default branch and\n  implementation; checked 2026-07-23.\n- [PufferTank 4.0 Dockerfile](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferTank\u002Fblob\u002F4.0\u002Fpuffertank.dockerfile)\n  — CUDA\u002FPython reference; checked 2026-07-23.\n- [PufferLib 2.0 paper](https:\u002F\u002Fopenreview.net\u002Fforum?id=qRyteMTgn0) —\n  Reinforcement Learning Journal, 2025; use only for its stated benchmarks.\n- [PufferLib compatibility paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2406.12905) —\n  submitted 2024-06-18; describes an earlier API\u002Fperformance profile.\n\n## Related skills\n\n- `stable-baselines3`: Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API.\n- `evaluating-cosmos-policy`: Evaluates NVIDIA Cosmos Policy on LIBERO and RoboCasa simulation environments.\n- `fine-tuning-serving-openpi`: Fine-tune and serve Physical Intelligence OpenPI models (pi0, pi0-fast, pi0.5) using JAX or PyTorch backends for robot policy inference acr…\n",{"name":5,"license":15,"metadata":45,"description":7,"allowed-tools":51,"compatibility":52},{"tags":46,"version":47,"category":48,"maintainer":49,"last-reviewed":50},"reinforcement learning, RL environments, training, machine learning","1.2","data-science-and-ml","Kalaris Labs","2026-07-23","Read Bash Grep Python","Bundled CLIs require Python 3.10+ and use only the standard library. Published pufferlib 3.0.0 supports Python >=3.9 but ships as a native-code source archive; current 4.0 source requires Python >=3.10, Torch >=2.9, and an audited CPU\u002FCUDA toolchain. Network, GPU, native builds, environment plug-ins, assets, checkpoints, and external logging are never required by the bundled CLIs.","main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill pufferlib",{"tool":69,"command":70},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill pufferlib",{"tool":72,"command":73},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill pufferlib","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002FSKILL.md",true,[77,83,87,91,95,99,105,109,113,117,121,125,129,133],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fenvironments.md","REFERENCE","参考文档",9340,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Freferences\u002Fenvironments.md",{"path":84,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fintegration.md",8876,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Freferences\u002Fintegration.md",{"path":88,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fpolicies.md",6962,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Freferences\u002Fpolicies.md",{"path":92,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Ftraining.md",10424,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Freferences\u002Ftraining.md",{"path":96,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fvectorization.md",8402,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Freferences\u002Fvectorization.md",{"path":100,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":103,"sourceHtmlUrl":104},"scripts\u002F__init__.py","SCRIPT","脚本",62,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002F__init__.py",{"path":106,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002F_common.py",6668,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002F_common.py",{"path":110,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":111,"sourceHtmlUrl":112},"scripts\u002Fbenchmark_vectorization.py",8332,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fbenchmark_vectorization.py",{"path":114,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":115,"sourceHtmlUrl":116},"scripts\u002Fenv_contract_validator.py",6892,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fenv_contract_validator.py",{"path":118,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":119,"sourceHtmlUrl":120},"scripts\u002Fenv_template.py",7251,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fenv_template.py",{"path":122,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":123,"sourceHtmlUrl":124},"scripts\u002Finspect_checkpoint.py",6832,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002Finspect_checkpoint.py",{"path":126,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":127,"sourceHtmlUrl":128},"scripts\u002Frepro_plan.py",6027,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002Frepro_plan.py",{"path":130,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":131,"sourceHtmlUrl":132},"scripts\u002Ftrain_template.py",9975,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002Ftrain_template.py",{"path":134,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":135,"sourceHtmlUrl":136},"scripts\u002Fvalidate_plan.py",18466,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fvalidate_plan.py",[138,147,155,163,171,179],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":142,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":146},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":151,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":146},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":159,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":146},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":167,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":146},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":175,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":146},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":183,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":146},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]