Agent skill

Reinforcement Learning Guide

by wentorai in wentorai/research-plugins

Reinforcement learning fundamentals, algorithms, and research

MITAuto-check passedAI & LLM Engineering

Install Reinforcement Learning Guide

skills CLI
$ npx skills add wentorai/research-plugins --skill reinforcement-learning-guide -a claude-code

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

GitHub CLI
$ gh skill install wentorai/research-plugins reinforcement-learning-guide --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/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/domains/ai-ml/reinforcement-learning-guide .claude/skills/reinforcement-learning-guide && 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
reinforcement-learning-guide
GitHub stars
298
Used in
1 other repo
Token cost
~2.4k tokens
SKILL.md length
388 words
Files
1
Skills in repo
405
Repo updated
First seen
Licence
MIT

At a glance

Reinforcement learning fundamentals, algorithms, and research

  • Works in 6 steps: RLHF / RLAIF: RL from human or AI… → Offline RL: Learning from pre-collected… → Foundation models for control: Using… → …
  • Tasks that involve Reinforcement learning
  • SKILL.md covers RL Fundamentals, Algorithm Taxonomy, Implementation: DQN and Implementation: PPO, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Reinforcement Learning Guide is an agent skill from wentorai/research-plugins. Reinforcement learning fundamentals, algorithms, and research

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Reinforcement learning. The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Reinforcement learning

Example prompts

  • “/reinforcement-learning-guide”

Requirements

  • Python 3

Workflow steps

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

  1. RLHF / RLAIF: RL from human or AI feedback for LLM alignment
  2. Offline RL: Learning from pre-collected datasets without environment interaction
  3. Foundation models for control: Using pre-trained LLMs/VLMs as world models or planners
  4. Multi-agent RL: Cooperative and competitive settings with communication
  5. Safe RL: Constrained optimization to ensure safety during training and deployment
  6. Sample-efficient RL: Reducing the gap between model-free and model-based sample complexity

What it can do on your machine

Read from SKILL.md and the folder at commit bf44b3c. 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 (its code samples are python).

    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

Reinforcement Learning Guide loads about 2.4k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 388 words of instructions outside code blocks.

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

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 wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 388 words, ~2,420 tokens.

Download SKILL.mdSave it as .claude/skills/reinforcement-learning-guide/SKILL.md (or your agent's skills folder).
name
reinforcement-learning-guide
description
Reinforcement learning fundamentals, algorithms, and research

Reinforcement Learning Guide

Understand and implement reinforcement learning algorithms from tabular methods through deep RL, including policy gradients, actor-critic, and model-based approaches.

RL Fundamentals

The RL Framework

An agent interacts with an environment to maximize cumulative reward:

Agent                     Environment
  |                           |
  |--- action a_t ---------->|
  |                           |--- next state s_{t+1}
  |<-- reward r_t, state s_t |--- reward r_{t+1}
  |                           |
ConceptSymbolDefinition
StatesObservation of the environment
ActionaDecision made by the agent
RewardrScalar feedback signal
Policypi(a|s)Mapping from states to actions
Value functionV(s)Expected cumulative reward from state s
Q-functionQ(s, a)Expected cumulative reward from (s, a)
Discount factorgammaWeight of future vs. immediate rewards (0-1)
ReturnG_tSum of discounted future rewards from time t
Key Equations
# Return (discounted cumulative reward)
G_t = r_t + gamma * r_{t+1} + gamma^2 * r_{t+2} + ...

# Bellman equation for V
V(s) = E[r + gamma * V(s') | s]

# Bellman equation for Q
Q(s, a) = E[r + gamma * max_a' Q(s', a') | s, a]

# Policy gradient theorem
gradient J(theta) = E[gradient log pi_theta(a|s) * Q(s, a)]

Algorithm Taxonomy

CategoryAlgorithmKey IdeaOn/Off Policy
Value-basedQ-LearningLearn Q(s,a), act greedilyOff-policy
DQNQ-Learning + neural net + replay bufferOff-policy
Double DQNTwo networks to reduce overestimationOff-policy
Dueling DQNSeparate value and advantage streamsOff-policy
Policy gradientREINFORCEMonte Carlo policy gradientOn-policy
PPOClipped surrogate objectiveOn-policy
TRPOTrust region constraintOn-policy
Actor-CriticA2C/A3CAdvantage actor-critic (parallel)On-policy
SACMaximum entropy + off-policy ACOff-policy
TD3Twin delayed DDPGOff-policy
Model-basedDreamerWorld model + imaginationOn-policy
MBPOModel-based policy optimizationOff-policy
MuZeroLearned model + planning (MCTS)Off-policy

Implementation: DQN

python
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
from collections import deque
import random

class QNetwork(nn.Module):
    def __init__(self, state_dim, action_dim, hidden_dim=128):
        super().__init__()
        self.net = nn.Sequential(
            nn.Linear(state_dim, hidden_dim),
            nn.ReLU(),
            nn.Linear(hidden_dim, hidden_dim),
            nn.ReLU(),
            nn.Linear(hidden_dim, action_dim)
        )

    def forward(self, x):
        return self.net(x)

class DQNAgent:
    def __init__(self, state_dim, action_dim, lr=1e-3, gamma=0.99,
                 epsilon=1.0, epsilon_decay=0.995, epsilon_min=0.01,
                 buffer_size=10000, batch_size=64):
        self.action_dim = action_dim
        self.gamma = gamma
        self.epsilon = epsilon
        self.epsilon_decay = epsilon_decay
        self.epsilon_min = epsilon_min
        self.batch_size = batch_size

        self.q_network = QNetwork(state_dim, action_dim)
        self.target_network = QNetwork(state_dim, action_dim)
        self.target_network.load_state_dict(self.q_network.state_dict())
        self.optimizer = optim.Adam(self.q_network.parameters(), lr=lr)

        self.replay_buffer = deque(maxlen=buffer_size)

    def select_action(self, state):
        if random.random() < self.epsilon:
            return random.randint(0, self.action_dim - 1)
        with torch.no_grad():
            q_values = self.q_network(torch.FloatTensor(state))
            return q_values.argmax().item()

    def store_transition(self, state, action, reward, next_state, done):
        self.replay_buffer.append((state, action, reward, next_state, done))

    def train_step(self):
        if len(self.replay_buffer) < self.batch_size:
            return 0.0

        batch = random.sample(self.replay_buffer, self.batch_size)
        states, actions, rewards, next_states, dones = zip(*batch)

        states = torch.FloatTensor(np.array(states))
        actions = torch.LongTensor(actions)
        rewards = torch.FloatTensor(rewards)
        next_states = torch.FloatTensor(np.array(next_states))
        dones = torch.FloatTensor(dones)

        # Current Q values
        q_values = self.q_network(states).gather(1, actions.unsqueeze(1)).squeeze()

        # Target Q values (Double DQN variant)
        with torch.no_grad():
            best_actions = self.q_network(next_states).argmax(1)
            next_q = self.target_network(next_states).gather(1, best_actions.unsqueeze(1)).squeeze()
            targets = rewards + self.gamma * next_q * (1 - dones)

        loss = nn.MSELoss()(q_values, targets)
        self.optimizer.zero_grad()
        loss.backward()
        self.optimizer.step()

        self.epsilon = max(self.epsilon_min, self.epsilon * self.epsilon_decay)
        return loss.item()

    def update_target(self):
        self.target_network.load_state_dict(self.q_network.state_dict())

Implementation: PPO

python
class PPOAgent:
    def __init__(self, state_dim, action_dim, lr=3e-4, gamma=0.99,
                 lam=0.95, clip_ratio=0.2, epochs=10):
        self.gamma = gamma
        self.lam = lam
        self.clip_ratio = clip_ratio
        self.epochs = epochs

        self.actor = nn.Sequential(
            nn.Linear(state_dim, 64), nn.Tanh(),
            nn.Linear(64, 64), nn.Tanh(),
            nn.Linear(64, action_dim), nn.Softmax(dim=-1)
        )
        self.critic = nn.Sequential(
            nn.Linear(state_dim, 64), nn.Tanh(),
            nn.Linear(64, 64), nn.Tanh(),
            nn.Linear(64, 1)
        )
        self.optimizer = optim.Adam(
            list(self.actor.parameters()) + list(self.critic.parameters()), lr=lr
        )

    def compute_gae(self, rewards, values, dones):
        """Generalized Advantage Estimation."""
        advantages = []
        gae = 0
        for t in reversed(range(len(rewards))):
            next_value = values[t + 1] if t + 1 < len(values) else 0
            delta = rewards[t] + self.gamma * next_value * (1 - dones[t]) - values[t]
            gae = delta + self.gamma * self.lam * (1 - dones[t]) * gae
            advantages.insert(0, gae)
        return torch.FloatTensor(advantages)

    def update(self, states, actions, old_log_probs, rewards, dones):
        values = self.critic(states).squeeze().detach().numpy()
        advantages = self.compute_gae(rewards, values, dones)
        returns = advantages + torch.FloatTensor(values[:len(advantages)])
        advantages = (advantages - advantages.mean()) / (advantages.std() + 1e-8)

        for _ in range(self.epochs):
            probs = self.actor(states)
            dist = torch.distributions.Categorical(probs)
            new_log_probs = dist.log_prob(actions)
            entropy = dist.entropy().mean()

            ratio = (new_log_probs - old_log_probs).exp()
            clipped = torch.clamp(ratio, 1 - self.clip_ratio, 1 + self.clip_ratio)
            actor_loss = -torch.min(ratio * advantages, clipped * advantages).mean()

            critic_loss = nn.MSELoss()(self.critic(states).squeeze(), returns)

            loss = actor_loss + 0.5 * critic_loss - 0.01 * entropy
            self.optimizer.zero_grad()
            loss.backward()
            self.optimizer.step()
Show full SKILL.md (189 more words)Show less

Research Environments

EnvironmentDomainComplexityKey Paper
Gymnasium (ex-Gym)Classic control, AtariLow-HighBrockman et al., 2016
MuJoCoContinuous control, roboticsMedium-HighTodorov et al., 2012
DMControlContinuous control from pixelsHighTassa et al., 2018
ProcGenProcedurally generated gamesHigh (generalization)Cobbe et al., 2020
MinigridGrid-world navigationLow-MediumChevalier-Boisvert et al.
Isaac GymGPU-accelerated physics simHighMakoviychuk et al., 2021
NetHackComplex roguelike gameVery HighKuttler et al., 2020

Top Venues

VenueTypeFocus
NeurIPSConferenceBroad ML including RL
ICMLConferenceBroad ML including RL
ICLRConferenceRepresentation learning, deep RL
AAAIConferenceBroad AI
CoRLConferenceRobot learning
JMLRJournalBroad ML (open access)
L4DCConferenceLearning for dynamics and control

Key Research Directions (2024-2025)

  1. RLHF / RLAIF: RL from human or AI feedback for LLM alignment
  2. Offline RL: Learning from pre-collected datasets without environment interaction
  3. Foundation models for control: Using pre-trained LLMs/VLMs as world models or planners
  4. Multi-agent RL: Cooperative and competitive settings with communication
  5. Safe RL: Constrained optimization to ensure safety during training and deployment
  6. Sample-efficient RL: Reducing the gap between model-free and model-based sample complexity

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

Files

Just SKILL.md in skills/domains/ai-ml/reinforcement-learning-guide of wentorai/research-plugins.

Open the folder on GitHubat commit bf44b3c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Reinforcement Learning Guide 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.

Reinforcement Learning Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Reinforcement Learning Guide this skillwentorai/research-plugins2981 repos~2.4kAutomated safety check: PassMIT
Train RlOpenPipe/ART11k—~2.4kAutomated safety check: PassApache-2.0
Qwopus27b Rl TrainingR6410418/Jackrong-llm-finetuning-guide1.7k—~830Automated safety check: PassApache-2.0
Fine Tuning With TrlOrchestra-Research/AI-Research-SKILLs13k6 repos~2.9kAutomated safety check: PassMIT
Optim AgentOptim-Agent/optim-agent801—~1.3kAutomated safety check: PassMIT
Safactory WorkflowsAI45Lab/SAfactory236—~1.8kAutomated safety check: PassNone

Similar skills

  • 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
  • Qwopus27b Rl Training

    R6410418/Jackrong-llm-finetuning-guide

    Prepare, validate, launch-plan, monitor, resume, and stop configurable Qwopus 27B reinforcement-learning workflows for GRPO or GSPO.

    1.7k GitHub stars~830 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Fine Tuning With Trl

    Orchestra-Research/AI-Research-SKILLs

    Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training.

    13k GitHub starsUsed in 6 repos~2.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Optim Agent

    Optim-Agent/optim-agent

    A skill your agent uses when the user wants to optimize configurable system parameters against a measurable scalar objective, especially for model training, inference, quantitative strategies…

    801 GitHub stars~1.3k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Safactory Workflows

    AI45Lab/SAfactory

    Integrate a benchmark or custom environment into SAfactory using fixed adapter templates and local contract tests, optionally run Docker/RJob evaluation, or prepare GRPO/RL training.

    236 GitHub stars~1.8k tokensUpdated 15 days ago
    AI & LLM EngineeringAuto-check passed
  • Hugging Face LLM Trainer

    huggingface/skills

    Official

    Trains or fine-tunes language and vision models with TRL or Unsloth on Hugging Face Jobs cloud GPUs, then converts the results to GGUF.

    11k GitHub starsUsed in 1 repo~7.2k tokens
    AI & LLM EngineeringAuto-check passed

More from wentorai/research-plugins

All 405 skills in this repo
  • Abstract Writing Guide

    wentorai/research-plugins

    Craft structured research abstracts that maximize clarity and journal acceptance

    298 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Academic Citation Manager

    wentorai/research-plugins

    Manage academic citations across BibTeX, APA, MLA, and Chicago formats

    298 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Academic Paper Summarizer

    wentorai/research-plugins

    Summarize academic papers with structured extraction of key elements

    298 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Academic Study Methods

    wentorai/research-plugins

    Evidence-based study techniques for academic learning and retention

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Academic Tone Guide

    wentorai/research-plugins

    Adjust writing tone and register for academic audiences and venues

    298 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Academic Translation Guide

    wentorai/research-plugins

    Academic translation, post-editing, and Chinglish correction guide

    298 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Reinforcement Learning Guide

What does Reinforcement Learning Guide do?

Reinforcement learning fundamentals, algorithms, and research. Reinforcement Learning Guide is an agent skill from wentorai/research-plugins.

When should I use Reinforcement Learning Guide?

Reinforcement Learning Guide fits situations like: tasks that involve Reinforcement learning.

How do I install Reinforcement Learning Guide in Claude Code?

Run `npx skills add wentorai/research-plugins --skill reinforcement-learning-guide -a claude-code`. Or copy the skill folder (skills/domains/ai-ml/reinforcement-learning-guide in wentorai/research-plugins) into .claude/skills/reinforcement-learning-guide in your project. Claude Code loads it when a task matches its description.

How do I install Reinforcement Learning Guide in Codex?

Run `npx skills add wentorai/research-plugins --skill reinforcement-learning-guide -a codex`. Or copy the skill folder (skills/domains/ai-ml/reinforcement-learning-guide in wentorai/research-plugins) into .agents/skills/reinforcement-learning-guide in your project. Codex loads it when a task matches its description.

Can I use Reinforcement Learning Guide 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 wentorai/research-plugins --skill reinforcement-learning-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/reinforcement-learning-guide, .gemini/skills/reinforcement-learning-guide, .github/skills/reinforcement-learning-guide and .opencode/skills/reinforcement-learning-guide in your project.

What does Reinforcement Learning Guide need to run?

SKILL.md names no scripts, command-line tools or credentials: Reinforcement Learning Guide is instructions for the agent only. Our summary lists: Python 3.

Does Reinforcement Learning Guide 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 Reinforcement Learning Guide 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 Reinforcement Learning Guide use?

Reinforcement Learning Guide 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 Reinforcement Learning Guide use?

About 2.4k tokens (SKILL.md is roughly 9.7k 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 Reinforcement Learning Guide?

Skills that share tags, products or a category with Reinforcement Learning Guide: Train Rl (OpenPipe/ART, 11k stars), Qwopus27b Rl Training (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars), Fine Tuning With Trl (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Optim Agent (Optim-Agent/optim-agent, 801 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Reinforcement Learning Guide?

wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 405 skills in this directory. The repository was last updated on June 19, 2026.

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