Agent skill

Spinning Up Deep Rl

by alirezarezvani in alirezarezvani/claude-skills

Knowledge base from "Spinning Up in Deep RL" by Joshua Achiam (OpenAI, MIT-licensed).

MITAuto-check passedAI & LLM Engineering

Install Spinning Up Deep Rl

skills CLI
$ npx skills add alirezarezvani/claude-skills --skill spinning-up-deep-rl -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-skills spinning-up-deep-rl --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/spinning-up-deep-rl/skills/spinning-up-deep-rl .claude/skills/spinning-up-deep-rl && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spinning-up-deep-rl
GitHub stars
28k
Token cost
~2.8k tokens
SKILL.md length
1,301 words
Files
24
Skills in repo
342
Repo updated
First seen
Licence
MIT

At a glance

Knowledge base from "Spinning Up in Deep RL" by Joshua Achiam (OpenAI, MIT-licensed).

  • Works in 4 steps: Fair comparisons — tune the baseline as… → Remove stochasticity as a confounder —… → High-integrity experiments — launch… → …
  • Applying Achiams frameworks for RL fundamentals and MDPs
  • SKILL.md covers How to Use This Skill, Core Frameworks & Mental Models, Chapter Index and Topic Index, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Spinning Up Deep Rl is an agent skill from alirezarezvani/claude-skills. Knowledge base from "Spinning Up in Deep RL" by Joshua Achiam (OpenAI, MIT-licensed). Use when applying Achiam's frameworks for RL fundamentals and MDPs, the model-free algorithm taxonomy, policy gradient derivations, the six reference algorithms (VPG, TRPO, PPO, DDPG, TD3, SAC), debugging silently-failing RL code, or running rigorous multi-seed RL experiments.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 24 other files (for example `chapters/ch01-introduction.md`, `chapters/ch02-installation.md` and `chapters/ch03-algorithm-lineup.md`).

It sits in AI & LLM Engineering, covering Reinforcement learning. It works with OpenAI. The repository describes itself as: 380 Claude Code skills & agent skills & plugins (30+ Agents, 70+ custom commands, 380+ skills, customizable references, scripts)for Claude Code, Codex, Gemini CLI, Cursor, and 8… The licence is MIT.

When your agent uses it

  • Applying Achiams frameworks for RL fundamentals and MDPs
  • The model-free algorithm taxonomy
  • Policy gradient derivations
  • The six reference algorithms (VPG

Example prompts

  • “Spinning Up in Deep RL”
  • “/spinning-up-deep-rl”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Fair comparisons — tune the baseline as hard as your method; never handicap it.
  2. Remove stochasticity as a confounder — at least 3 seeds, 10 or more to be thorough.
  3. High-integrity experiments — launch fresh final runs and precommit to reporting them.
  4. Check each claim separately — ablate every design decision. (ch10)

What it can do on your machine

Read from SKILL.md and the folder at commit 19392f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spinning Up Deep Rl loads about 2.8k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 1,301 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alirezarezvani/claude-skills at commit 19392f7, republished under its MIT licence (© alirezarezvani). 1,301 words, ~2,790 tokens.

Download SKILL.mdSave it as .claude/skills/spinning-up-deep-rl/SKILL.md (or your agent's skills folder). This skill also uses 23 other files; get the full folder from GitHub.
name
spinning-up-deep-rl
description
Knowledge base from "Spinning Up in Deep RL" by Joshua Achiam (OpenAI, MIT-licensed). Use when applying Achiam's frameworks for RL fundamentals and MDPs, the model-free algorithm taxonomy, policy gradient derivations, the six reference algorithms (VPG, TRPO, PPO, DDPG, TD3, SAC), debugging silently-failing RL code, or running rigorous multi-seed RL experiments.

Spinning Up in Deep RL

Author: Joshua Achiam (OpenAI) | Source: spinningup.readthedocs.io, MIT | Chapters: 20 | Generated: 2026-08-25

How to Use This Skill

  • No argument — load the core frameworks below
  • A topic — ask about advantage function, target networks, entropy regularization; I resolve it through the Topic Index and read that chapter file
  • chNN — I load that chapter's summary
  • "what chapters do you have?" — the full index
/cs:spinning-up-deep-rl                      # core frameworks + chapter index
/cs:spinning-up-deep-rl entropy regularization   # topic index -> ch19, read that chapter
/cs:spinning-up-deep-rl ch09                 # one chapter summary

When you ask about something not in Core Frameworks, I read the relevant chapter file before answering rather than guessing from the index.


Core Frameworks & Mental Models

The RL problem

pi* = argmax_pi J(pi), where J(pi) = E_{tau~pi}[R(tau)]. Every algorithm approximates this; where it substitutes a different objective (a Bellman residual, a surrogate), that substitution is the source of its failure modes. Four value functions — V^pi, Q^pi, V*, Q* — all obey Bellman self-consistency, and a*(s) = argmax_a Q*(s,a) is why Q-learning is a viable family at all. Advantage A^pi(s,a) = Q^pi(s,a) - V^pi(s) is the relative-quality signal policy gradients run on. (ch07)

The two branching questions

Place any algorithm by asking: does it have or learn a model, and what does it learn (policy, Q-function, value function, model). That generates the whole landscape. (ch08)

Policy optimization vs Q-learning — the central trade-off
  • Policy optimization is principled: you directly optimize the thing you want. Stable and reliable. On-policy, so it cannot reuse data, so it is sample-hungry.
  • Q-learning only indirectly optimizes performance, by training Q_theta to satisfy a self-consistency equation. Many failure modes, so less stable. But substantially more sample efficient when it works, because it reuses everything.
  • Satisfying the Bellman equations well carries no guarantee of good policy performance.
  • The two are not exclusive — DDPG and SAC live between them deliberately. (ch08)
The policy gradient template

grad J = E[ sum_t grad log pi_theta(a_t|s_t) * Phi_t ]. Five valid choices of Phi_t: full return, reward-to-go, reward-to-go minus a baseline, Q^pi, and A^pi. All share an expectation and differ in variance. Two rules get you from the first to the last:

  • Don't let the past distract you — drop rewards obtained before the action. Those terms had zero mean and nonzero variance: pure noise.
  • Baselines — by the EGLP lemma, any state-only b(s) can be added or subtracted freely. The standard choice is V^pi(s_t), learned by MSE regression onto reward-to-go. (ch09)
The policy-gradient loss is not a loss function

Its data distribution depends on the parameters, and it does not measure performance even in expectation. Only at the current parameters, with data from those parameters, does it have the negative gradient of performance. You can send it to negative infinity while performance craters, and it usually will. Only average return means anything. (ch09)

Broken RL code almost always fails silently

It runs fine; the agent just never learns. Usually something is computed with the wrong equation, on the wrong distribution, or piped to the wrong place. If it doesn't work, assume there's a bug before touching hyperparameters. Debug by measuring everything and reading the code critically. The archetype is one missing squeeze: a [N] vs [N,1] shape mismatch is broadcast-compatible, raises nothing, and silently turns the Bellman backup into an [N,N] matrix. (ch10, ch12)

Learn by doing

Write your own implementations, shortest correct version of each, simplest algorithms first. VPG, DQN, A2C, PPO, DDPG, roughly in that order; ~250-300 lines each. Single-threaded before parallel. Iterate fast in simple environments — under 5 minutes turnaround at the debug stage. Do not attempt Atari or Humanoid before the toy task works. Read papers for their ablations and supplementary material, but do not overfit to paper details (the original DDPG's architecture, init scheme and batch norm are not strictly necessary) or to existing implementations (their abstractions serve reuse, not your single use case). (ch10)

Rigor: four standards
  1. Fair comparisons — tune the baseline as hard as your method; never handicap it.
  2. Remove stochasticity as a confounder — at least 3 seeds, 10 or more to be thorough. Two seed groups can produce curves that look like different distributions.
  3. High-integrity experiments — launch fresh final runs and precommit to reporting them. Tuning produces hypotheses; final runs produce conclusions.
  4. Check each claim separately — ablate every design decision. (ch10)
The safe-step family (on-policy)

VPG takes an unconstrained gradient step, so a single bad step can collapse performance. TRPO constrains the step in KL-divergence between policies, not distance in parameter space, then backtracking-line-searches until the exact constraint holds. PPO drops the constraint and instead clips the objective so the policy gains nothing by moving far, which is first-order, far simpler, and empirically at least as good. (ch14, ch15, ch16)

Show full SKILL.md (547 more words)Show less
The overestimation family (off-policy)

DDPG amortizes the intractable continuous max_a Q(s,a) into a learned policy: max_a Q(s,a) ~= Q(s, mu(s)). It needs a replay buffer (licensed because the Bellman equation is indifferent to how data was collected) and target networks (because the target otherwise depends on the parameters being trained). Its failure mode is Q-value overestimation, which the policy actively exploits. TD3 answers with clipped double-Q, delayed policy updates and target policy smoothing. SAC adds entropy regularization, making the explore-exploit trade-off an explicit coefficient alpha. (ch17, ch18, ch19)


Chapter Index

#TitleKey Frameworks
ch01IntroductionThe missing middle step, Code Design Philosophy
ch02InstallationInstall-then-verify, MuJoCo optionality
ch03Algorithms: What's Included and WhyThe two lineages, on/off-policy trade-off, code template
ch04Running ExperimentsOne flag per kwarg, ExperimentGrid, save-dir suffixes
ch05Experiment OutputsTools not files, watch-then-measure
ch06Plotting ResultsPerformance alias, prefix autocompletion, seed averaging
ch07Part 1: Key Concepts in RLMDPs, four value functions, Bellman equations, advantage
ch08Part 2: Kinds of RL AlgorithmsTaxonomy, model bias, policy-opt vs Q-learning
ch09Part 3: Intro to Policy OptimizationLog-derivative trick, EGLP lemma, reward-to-go, baselines
ch10Spinning Up as a Deep RL ResearcherLearn by doing, three idea frames, four rigor standards
ch11Key Papers in Deep RL13-section topic map
ch12ExercisesProblem Set 1 and 2, the silent DDPG bug
ch13BenchmarksThe parity disclosure, family-specific metrics
ch14Vanilla Policy GradientThe six-step loop
ch15Trust Region Policy OptimizationKL trust region, line search, conjugate gradient
ch16Proximal Policy OptimizationPPO-Clip, KL early stopping
ch17Deep Deterministic Policy GradientMSBE, replay buffers, target networks, polyak
ch18Twin Delayed DDPGClipped double-Q, delayed updates, target smoothing
ch19Soft Actor-CriticEntropy regularization, reparameterization, squashed Gaussian
ch20Logger, MPI Tools and Run UtilsEpochLogger pattern, MPI PyTorch order

Topic Index

  • Advantage function ch07, ch09, ch14
  • Baselines ch09
  • Bellman equations ch07, ch17
  • Benchmarks / parity ch13, ch01
  • Clipped double-Q ch18, ch19
  • Continuous action spaces ch07, ch17
  • Debugging / silent failure ch10, ch12
  • DDPG ch17, ch03, ch08
  • Entropy regularization ch19
  • Exploration vs exploitation ch14, ch17, ch19
  • GAE ch09, ch14
  • Installation ch02
  • KL divergence / trust region ch15, ch16
  • Logging ch20, ch05
  • MDPs ch07
  • Model-based RL ch08
  • MPI / parallelization ch20, ch02, ch04
  • MSBE ch17
  • Off-policy ch03, ch08, ch17
  • On-policy ch03, ch08, ch14
  • Papers / literature ch11, ch10
  • Plotting ch06, ch13
  • Policies (categorical, Gaussian, squashed) ch07, ch19
  • Policy gradient derivation ch09
  • PPO ch16, ch03
  • Q-learning ch08, ch07
  • Replay buffer ch17
  • Reparameterization trick ch19, ch10
  • Research process / rigor ch10, ch13
  • Reward-to-go ch09
  • Running experiments ch04, ch05
  • SAC ch19, ch03, ch08
  • Seeds / variance ch10, ch13, ch04
  • Target networks / polyak ch17, ch18
  • TD3 ch18, ch12
  • TRPO ch15, ch03
  • Value functions ch07, ch09
  • VPG ch14, ch09

Supporting Files

Scope & Limits

Covers the Spinning Up documentation only, as of the January 2020 PyTorch update. It does not cover: DQN and the discrete-action value-learning family (referenced, never implemented here), recurrent or convolutional architectures, partially-observed settings, model-based implementations, exploration/meta-RL/hierarchy beyond ch11's reading list, or any deep RL work after early 2020. The six implementations are educational; ch13 says which are research-grade. For topics beyond this source, I say so rather than improvising.


Compiled from OpenAI's Spinning Up in Deep RL documentation (MIT, Copyright (c) 2018 OpenAI), primarily developed by Joshua Achiam. Structured study notes, not a reproduction of the source.

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 23 other files in engineering/spinning-up-deep-rl/skills/spinning-up-deep-rl of alirezarezvani/claude-skills.

  • SKILL.md
  • chapters/ch01-introduction.md
  • chapters/ch02-installation.md
  • chapters/ch03-algorithm-lineup.md
  • chapters/ch04-running-experiments.md
  • chapters/ch05-experiment-outputs.md
  • chapters/ch06-plotting-results.md
  • chapters/ch07-key-concepts-in-rl.md
  • chapters/ch08-kinds-of-rl-algorithms.md
  • chapters/ch09-intro-to-policy-optimization.md
  • chapters/ch10-spinning-up-as-a-researcher.md
  • chapters/ch11-key-papers-in-deep-rl.md
  • chapters/ch12-exercises.md
  • chapters/ch13-benchmarks.md
  • chapters/ch14-vpg.md
  • chapters/ch15-trpo.md
  • chapters/ch16-ppo.md
  • chapters/ch17-ddpg.md
  • chapters/ch18-td3.md
  • chapters/ch19-sac.md
  • … and 4 more

Open the folder on GitHubat commit 19392f7

Compare with similar skills

Spinning Up Deep Rl next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spinning Up Deep Rl compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spinning Up Deep Rl this skillalirezarezvani/claude-skills28k—~2.8kAutomated safety check: PassMIT
Ilya SutskeverK-Dense-AI/mimeo282—~1.7kAutomated safety check: PassMIT
Hermes Atropos EnvironmentsTommy-yw/RunbookHermes546—~3.3kAutomated safety check: PassMIT
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k7 repos~2.3kAutomated safety check: PassMIT
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0
CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs13k7 repos~1.7kAutomated safety check: PassMIT

Similar skills

  • Ilya Sutskever

    K-Dense-AI/mimeo

    Applies the reasoning style of Ilya Sutskever (deep learning pioneer, co-founder of OpenAI and Safe Superintelligence Inc.) to problems involving AI architecture, scaling laws, alignment, and…

    282 GitHub stars~1.7k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Hermes Atropos Environments

    Tommy-yw/RunbookHermes

    Build, test, and debug Hermes Agent RL environments for Atropos training.

    546 GitHub stars~3.3k tokensUpdated 4 mo ago
    AI & LLM EngineeringAuto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 7 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 7 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Train Rl

    OpenPipe/ART

    RL training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from alirezarezvani/claude-skills

All 342 skills in this repo
  • Agile Product Owner

    alirezarezvani/claude-skills

    Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.

    28k GitHub starsUsed in 3 repos~3.2k tokens
    Auto-check passed
  • Product Strategist

    alirezarezvani/claude-skills

    OKR cascade toolkit for product leaders: generates aligned company-to-team OKRs from five strategy types and scores how well they line up.

    28k GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • App Store Optimization

    alirezarezvani/claude-skills

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • AWS Solution Architect

    alirezarezvani/claude-skills

    Design AWS architectures for startups using serverless patterns and IaC templates.

    28k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Campaign Analytics

    alirezarezvani/claude-skills

    Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Code to PRD

    alirezarezvani/claude-skills

    Reverse-engineers a frontend, backend or fullstack codebase into a product requirements document with per-page docs, an enum dictionary and an API inventory.

    28k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed

Works with

Questions about Spinning Up Deep Rl

What does Spinning Up Deep Rl do?

Knowledge base from "Spinning Up in Deep RL" by Joshua Achiam (OpenAI, MIT-licensed). Spinning Up Deep Rl is an agent skill from alirezarezvani/claude-skills. Knowledge base from "Spinning Up in Deep RL" by Joshua Achiam (OpenAI, MIT-licensed).

When should I use Spinning Up Deep Rl?

Spinning Up Deep Rl fits situations like: applying Achiams frameworks for RL fundamentals and MDPs; the model-free algorithm taxonomy; policy gradient derivations; the six reference algorithms (VPG.

How do I install Spinning Up Deep Rl in Claude Code?

Run `npx skills add alirezarezvani/claude-skills --skill spinning-up-deep-rl -a claude-code`. Or copy the skill folder (engineering/spinning-up-deep-rl/skills/spinning-up-deep-rl in alirezarezvani/claude-skills) into .claude/skills/spinning-up-deep-rl in your project. Claude Code loads it when a task matches its description.

How do I install Spinning Up Deep Rl in Codex?

Run `npx skills add alirezarezvani/claude-skills --skill spinning-up-deep-rl -a codex`. Or copy the skill folder (engineering/spinning-up-deep-rl/skills/spinning-up-deep-rl in alirezarezvani/claude-skills) into .agents/skills/spinning-up-deep-rl in your project. Codex loads it when a task matches its description.

Can I use Spinning Up Deep Rl in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-skills --skill spinning-up-deep-rl -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spinning-up-deep-rl, .gemini/skills/spinning-up-deep-rl, .github/skills/spinning-up-deep-rl and .opencode/skills/spinning-up-deep-rl in your project.

What does Spinning Up Deep Rl need to run?

SKILL.md names no scripts, command-line tools or credentials: Spinning Up Deep Rl is instructions for the agent only.

Does Spinning Up Deep Rl access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spinning Up Deep Rl safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spinning Up Deep Rl use?

Spinning Up Deep Rl is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spinning Up Deep Rl use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Spinning Up Deep Rl?

Skills that share tags, products or a category with Spinning Up Deep Rl: Ilya Sutskever (K-Dense-AI/mimeo, 282 stars), Hermes Atropos Environments (Tommy-yw/RunbookHermes, 546 stars), Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Codebase Management (giancarloerra/SocratiCode, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spinning Up Deep Rl?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-skills, which has 27,938 GitHub stars. The repository holds 342 skills in this directory. The repository was last updated on August 30, 2026.

Source: alirezarezvani/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.