pufferlib

pufferlib is a skill for Claude Code from agentlas-ai/agentlas-desktop. It costs 65 tokens per session (3,259 once invoked), scanned C, a copy of pufferlib, Apache-2.0.

Version-specific guidance for PufferLib, a Python framework for training and evaluating reinforcement-learning agents. Reinforcement learning teaches an agent by giving feedback from an environment, and this guidance covers both the stable 3.0 release and the redesigned 4.0 source line.

In plain words
What is it for?
Use it to adapt Gymnasium or PettingZoo environments, vectorize environments, train and evaluate policies, and review checkpoints while selecting the correct PufferLib version.
Why use it?
It prevents incompatible 3.0 and 4.0 instructions from being mixed. It also keeps environment loading, native builds, checkpoints, and first runs bounded and reviewable.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/benchmark_vectorization.py --backend serial.

Good fit Use it to adapt Gymnasium or PettingZoo environments, vectorize environments, train and evaluate policies, and review checkpoints while selecting the correct PufferLib version.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/agentlas-ai/agentlas-desktop
agentmods
npx agentmods add skills/agentlas-ai/agentlas-desktop/pufferlib

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pufferlib

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/pufferlib/github.svg)](https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/pufferlib)
Your own site
<a href="https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/pufferlib"><img src="https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/pufferlib/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pufferlib

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/pufferlib"><img src="https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/pufferlib.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.03259
Opus 5.5 $0.00026 $0.01304
Sonnet 5.5 $0.00013 $0.00652
Haiku 4.5 $0.00006 $0.00326

Measured 1mo ago against content hash dc920861122e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

pufferlib scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/__init__.py, scripts/_common.py, scripts/env_contract_validator.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

9. Never dump all environment variables or recursively search for `.env`.
Origin

This is a copy

100% identical to pufferlib — 111 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/agentlas-science-skills/skills/pufferlib/SKILL.md · 346 lines

How it starts

The opening of the file, as written. The whole thing — 346 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PufferLib

Use PufferLib with an explicit version profile. Upstream currently has two incompatible surfaces:

Profile Status on 2026-07-23 Main use
pufferlib==3.0.0 Latest stable PyPI release, published 2025-06-23 Python/Gymnasium/PettingZoo emulation, pufferlib.vector, Torch PuffeRL
source 4.0 Upstream default branch; not the latest stable PyPI artifact Native C Ocean environments, native CUDA trainer, optional Torch fallback

Do not combine 3.0 imports with 4.0 config/CLI examples. The 4.0 redesign removed the 3.0 emulation, vector, and pytorch modules from the current package tree.

Safe defaults

  1. Start with bundled synthetic, CPU-only, network-free tools.
  2. Do not import an arbitrary environment by dotted path. Bundled tools accept only allowlisted built-ins and slug identifiers.
  3. Do not install or execute an unreviewed environment package, native extension, ROM, map, checkpoint, or pickle file.
  4. Verify official source, immutable revision, licenses, checksums or attestations, and build hooks. Sandbox native builds and first execution.
  5. Cap steps, environments, agents, workers, threads, buffers, memory, disk, render size, and wall time.
  6. Keep training and evaluation environments/seeds separate.
  7. Default logging to local/none. External logging requires explicit opt-in, disclosure acknowledgment, and separate artifact-upload approval.
  8. Never pass W&B or Neptune credentials via CLI, INI, JSON, tags, run names, or logger configuration. Never print them.
  9. Never dump all environment variables or recursively search for .env.
  10. Hash checkpoint bytes before trusted, sandboxed loading; metadata inspection is not proof of safety.

First local checks

All bundled CLIs are dependency-free and emit strict JSON:

python3 scripts/env_template.py --help
python3 scripts/env_contract_validator.py
python3 scripts/benchmark_vectorization.py --backend serial
python3 scripts/train_template.py
python3 scripts/validate_plan.py
python3 scripts/repro_plan.py

Read the full file on GitHub · 346 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 346 lines · 65 tokens per session scan C dc920861122e

Subscribe to this mod's changes

pufferlib is a skill published in the GitHub repository agentlas-ai/agentlas-desktop (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 65 tokens to every session and 3,259 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (harvests environment variables). It is 100% identical to pufferlib, differing in 111 lines, and is treated as a copy.

Related

Other skills, from other repositories

electron-expert

Expert in Electron framework, desktop app development, IPC, and cross-platform packaging. Use when the user mentions desktop, Node.js, cross platform, Windows, macOS, or Linux, or when the task involves Electron Architecture, Process Types, IPC Communication, or App Lifecycle.

personamanagmentlayer/pcl · 59 tokens

architecture-diagram

How to draw and maintain the architecture diagram Ensemblr keeps for a workspace — ensemblrgetarchitecturediagram to fetch the stored one (it answers with null when nobody has drawn this workspace yet), the IR shape, how to derive it from the codebase, and ensemblrupdatearchitecturediagram to store it. Read this when…

ensemblr-hq/ensemblr · 94 tokens

ensemblr

How Ensemblr works from inside it — the workspace/git-worktree model, the ensemblr control tools and what their answers mean, the committed .ensemblr/settings.toml (setup and run scripts, [git], [prompts], [infisical], environment variables), /.config/ensemblr/config.json, the Changes panel and diff comments, the…

ensemblr-hq/ensemblr · 130 tokens

notifications

Send notifications through the unified notification router.

vellum-ai/vellum-assistant · 9 tokens

sales-icp

Build a comprehensive Ideal Customer Profile (ICP) for any B2B business - firmographic, technographic, behavioral, pain-point, budget, and channel dimensions, plus negative ICP, 100-point scoring rubric, buyer personas, prospecting playbook, and a draft first-outreach message that inherits sales-outreach Phase 0…

FerroxLabs/wayland · 181 tokens

customer-support-specialist

Becomes a seasoned customer support specialist who triages issues, crafts empathetic responses, manages escalation workflows, and builds knowledge base articles for recurring problems. Use when the user needs help writing customer responses, classifying support tickets, designing escalation procedures, or creating FAQ…

FerroxLabs/wayland · 96 tokens