[{"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",1554,"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",468,"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-11 02:22:54",{"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,164,188,222,243,257],{"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":142,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":40},"01M716A6ETNB9B1SQ3GXZC75VR","deja-search","deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fvshulcz\u002Fdeja-vu\u002Fskills\u002Fdeja-search\u002FSKILL.md",[],[146,147,148,149,19,150,151,152,153,154,155,21,156,157,158,159,160,161,162,163],"search","deja search","error","ready","memory","re","decide","fix","design","debugging","you","done","reviewer","io","change","cli","merge","past",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":142,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":40},"01M716A3J2W5SENSE9VGMXB375","deja-reflect","End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fvshulcz\u002Fdeja-vu\u002Fskills\u002Fdeja-reflect\u002FSKILL.md",[],[171,172,173,174,150,175,176,177,178,179,180,181,30,159,182,183,184,185,186,187],"reflect","deja reflect","brew","remember","project rules","project","session","end","reflection","Rules","decisions","with","record","github","next","https","node",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":142,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":205,"publishedAt":40},"01M715T3RR4BAYSR57HPPTJ0PF","revid","Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftmakersas\u002Frevid-skills\u002Fskills\u002Frevid\u002FSKILL.md",[194,199,202],{"categoryNo":195,"categoryName":196,"taxonomyType":197,"taxonomyTypeDesc":198},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":200,"categoryName":201,"taxonomyType":197,"taxonomyTypeDesc":198},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":203,"categoryName":204,"taxonomyType":197,"taxonomyTypeDesc":198},"01JBSEEDCAT000000000000023","Skill与智能体开发",[190,206,207,208,209,210,176,211,151,212,213,214,215,21,216,217,218,219,220,221],"Video","short-form","standalone","PDF","viral","tiktok","short","social","MCP","song","URL","image","mcp server","schedule","api","publish",{"skillNo":223,"name":224,"nameZh":6,"description":225,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":142,"licenseFileUrl":6,"sourceHtmlUrl":226,"categories":227,"keywords":228,"publishedAt":40},"01M71569ZM2X3H5RBFK8PVKMK2","review-study","Review a QuestionPunk survey before launch for wording, answer choices, branching, and missing settings. Use for check my survey or review this draft before publishing.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fquestionpunk\u002Fcodex-plugin\u002Fskills\u002Freview-study\u002FSKILL.md",[],[229,230,30,231,232,233,234,235,236,237,238,239,240,241,242],"study","review study","for","answer","missing","survey","publishing","use","check","draft","settings","launch","my","branching",{"skillNo":244,"name":245,"nameZh":6,"description":246,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":142,"licenseFileUrl":6,"sourceHtmlUrl":247,"categories":248,"keywords":249,"publishedAt":40},"01M71567GV0C35YQBY0DPGR86B","manage-study","Find QuestionPunk studies, check status, publish an explicitly requested draft, or retrieve its participant link. Use for find my survey, publish this study, or how many people responded.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fquestionpunk\u002Fcodex-plugin\u002Fskills\u002Fmanage-study\u002FSKILL.md",[],[250,229,251,231,234,236,252,237,238,221,253,254,255,256,241],"manage study","manage","people","how","find","link","status",{"skillNo":258,"name":259,"nameZh":6,"description":260,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":142,"licenseFileUrl":6,"sourceHtmlUrl":261,"categories":262,"keywords":263,"publishedAt":40},"01M71565A8TCA01AZQZRGRYMFZ","create-study","Create a saved QuestionPunk survey draft from a research brief or edit specified questions. Use for requests such as make a customer feedback survey or shorten my onboarding study.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fquestionpunk\u002Fcodex-plugin\u002Fskills\u002Fcreate-study\u002FSKILL.md",[],[264,229,265,266,267,268,231,269,234,270,236,271,272,238,273,274,275,276,277,241],"create study","create","brief","as","feedback","customer feedback","research brief","shorten","saved","research","requests","customer","questions","edit"]