Agent skill

Lego Rl Config

by LegoX in LegoX/Lego-RL

Compose, edit, refactor, and validate Lego-RL train/eval/infer .env configs and reusable scripts/templates modules.

Apache-2.0Auto-check: notesAI & LLM Engineering

Install Lego Rl Config

skills CLI
$ npx skills add LegoX/Lego-RL --skill lego-rl-config -a claude-code

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

GitHub CLI
$ gh skill install LegoX/Lego-RL lego-rl-config --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/LegoX/Lego-RL.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/lego-rl-config .claude/skills/lego-rl-config && 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
lego-rl-config
GitHub stars
113
Token cost
~2.1k tokens
SKILL.md length
849 words
Files
3 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

Compose, edit, refactor, and validate Lego-RL train/eval/infer .env configs and reusable scripts/templates modules.

  • Works in 5 steps: Resolve The Workload → Compose Template Modules → Generate Or Edit The Config → …
  • Codex is asked to generate an experiment config
  • SKILL.md covers Related Operational Skills, Start Here, Workflow and Refactor Rules, plus 1 more section
  • Calls bash; needs WANDB_API_KEY

What it does

Lego Rl Config is an agent skill from LegoX/Lego-RL. Compose, edit, refactor, and validate Lego-RL train/eval/infer .env configs and reusable scripts/templates modules. Use when Codex is asked to generate an experiment config, migrate legacy wrappers into configs, edit template modules, dry-run a train/eval/infer workload for config validation, or explain the runner/template/site-env contract. For Claude-style operational commands use the one-to-one Codex counterparts $rl-check, $rl-run, $rl-status, $rl-dashboard, and $rl-k8s-sandbox-install.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `agents/openai.yaml` and `references/config-generation.md`).

It sits in AI & LLM Engineering, covering Container orchestration and Refactoring. It works with Kubernetes and vLLM. The repository describes itself as: Lego-RL: Harness-Native Reinforcement Learning for Coding Agents. The licence is Apache-2.0.

When your agent uses it

  • Codex is asked to generate an experiment config
  • Migrate legacy wrappers into configs
  • Edit template modules
  • Dry-run a train/eval/infer workload for config validation

Example prompts

  • “/lego-rl-config”

Requirements

  • Docker
  • A credential in WANDB_API_KEY

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Resolve The Workload
  2. Compose Template Modules
  3. Generate Or Edit The Config
  4. Validate Through The Runner
  5. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 0731c95. 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

    Shell commands in SKILL.md call:

    • bash

    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 these keys or tokens, usually read from environment variables:

    • WANDB_API_KEY

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

Context cost

Lego Rl Config loads about 2.1k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 128 tokens; SKILL.md has 849 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.3k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:3
    r, and validate Lego-RL train/eval/infer .env configs and reusable scripts/templates modules. Use when Codex is asked to
  • NoteMentions a .env fileSKILL.md:9
    single runner per workload plus small `.env` experiment configs composed from

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 LegoX/Lego-RL at commit 0731c95, republished under its Apache-2.0 licence (© LegoX). 849 words, ~2,052 tokens.

Download SKILL.mdSave it as .claude/skills/lego-rl-config/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
lego-rl-config
description
Compose, edit, refactor, and validate Lego-RL train/eval/infer .env configs and reusable scripts/templates modules. Use when Codex is asked to generate an experiment config, migrate legacy wrappers into configs, edit template modules, dry-run a train/eval/infer workload for config validation, or explain the runner/template/site-env contract. For Claude-style operational commands use the one-to-one Codex counterparts $rl-check, $rl-run, $rl-status, $rl-dashboard, and $rl-k8s-sandbox-install.

Lego-RL Config

Use this skill for Lego-RL configuration work. The current design is a single runner per workload plus small .env experiment configs composed from reusable modules under scripts/templates.

This skill follows the Claude /rl:* plugin's layering rule:

Scripts own deterministic behavior. Skills own orchestration, judgement, and the final report.

Use this skill for config and template work. Use the one-to-one Codex counterparts for Claude plugin operations:

  • $rl-check for /rl:check
  • $rl-run for /rl:run
  • $rl-status for /rl:status
  • $rl-dashboard for /rl:dashboard
  • $rl-k8s-sandbox-install for /rl:k8s-sandbox-install

Start Here

  1. Find the repository root: it contains scripts/train/train.sh, scripts/infer/infer.sh, scripts/eval/eval.sh, and scripts/templates/README.md.
  2. Read scripts/templates/README.md first. It is the authoritative runner and template contract.
  3. Read references/config-generation.md before creating or refactoring configs.
  4. Inspect only the files relevant to the requested workload: scripts/<kind>/<kind>.sh, scripts/<kind>/_template.env, scripts/<kind>/configs/*.env, scripts/<kind>/lib/*.sh, and the selected scripts/templates/**.env modules.
  5. Preserve user-owned run configs. Do not rewrite unrelated configs, logs, checkpoints, trial outputs, or cluster state.

Workflow

1. Resolve The Workload

Classify the request as train, infer, or eval.

  • train: verl policy training, sync/async mode, VeOmni/FSDP engine, TRAIN_FILES, VAL_FILES, NNODES, N_NODES_TRAIN, N_NODES_ROLLOUT.
  • infer: batch trajectory generation through utils/eval_swerebench_filtered.py, INDEX_FILE, optional INSTANCES_FILE, RESULTS_DIR, OUTPUT_INDEX, single-node vLLM serving knobs such as GEN_TP, GPUS_PER_NODE, and VLLM_PORT.
  • eval: Harbor-native scoring, exact MODEL_PATH, exactly one of DATASET_PATH or DATASET_NAME, local plain-vLLM serving, generated Harbor JobConfig, and harbor run.

If a config path is provided, infer the kind from scripts/<kind>/.... If only a bare name is provided, search scripts/{train,infer,eval}/configs/. Ask only when multiple plausible configs match.

2. Compose Template Modules

Templates live under scripts/templates/**.env, and a config chooses them with TEMPLATE_MODULES. The config is sourced first, then modules are sourced in order from scripts/templates. Template defaults should use:

bash
: "${VAR:=default}"

That means explicit config values are authoritative, while modules provide defaults and derived values.

Use the current module ownership model:

  • runtime/process.env: process-level env, sockets, NCCL/logging defaults, tokenizer/thread knobs, Ray ports, and Ray object store memory.
  • backend/k8s.env and backend/docker.env: Harbor backend selectors and backend defaults.
  • harbor/common.env: Harbor agent, trial, validation, retry, resource, verifier, and timeout defaults shared across workloads.
  • scaffold/{ohsdk,oh,cc,oc}.env: agent identity and runtime image defaults.
  • verl/common.env: shared train-side verl data/model/actor/rollout/ref/ algorithm/topology/log defaults.
  • verl/{async,sync}.env: train mode entrypoint/config and mode-specific defaults.
  • verl/{veomni,fsdp}.env: train model-engine-specific actor/ref/router-replay overrides.
  • infer/{vllm,common}.env: infer single-node vLLM serving plus infer rollout/data/output/log defaults.
  • eval/{common,vllm}.env: Harbor-native eval job/data/log defaults plus single-node plain-vLLM serving defaults.

Keep TEMPLATE_MODULES at the end of configs so module names and derived defaults can depend on earlier explicit settings.

3. Generate Or Edit The Config

Write generated configs to exactly one of:

  • scripts/train/configs/<name>.env
  • scripts/infer/configs/<name>.env
  • scripts/eval/configs/<name>.env

Use the workload skeleton as the starting point:

  • scripts/train/_template.env
  • scripts/infer/_template.env
  • scripts/eval/_template.env

Keep configs readable as experiment records: template selection first, identity, runtime, model, data/output, topology or serving, optional overrides, then TEMPLATE_MODULES. Keep generated configs small; do not copy every template default into the config.

Important current variable names:

  • Use EXP_NAME, not EXP_TAG.
  • Train uses TRAIN_FILES and VAL_FILES.
  • Infer uses INDEX_FILE for the parquet passed to --index.
  • Eval uses MODEL_PATH directly; old MODEL_PRESET-based eval templates are not part of the current runner contract.
  • Eval must set exactly one of DATASET_PATH or DATASET_NAME.
Show full SKILL.md (339 more words)Show less
4. Validate Through The Runner

Do not re-implement runner checks. Use the workload runner's dry-run path:

bash
bash scripts/<kind>/<kind>.sh --dry-run scripts/<kind>/configs/<config>.env

Dry-run sources the config and modules, validates required variables, initializes local runtime state, prints === Final Environment ===, prints the launch command block, then exits before Ray startup, vLLM startup, Harbor job writing, or training/eval/infer execution.

For static syntax checks, use the commands in scripts/templates/README.md, for example:

bash
bash -n scripts/train/train.sh scripts/train/lib/*.sh
bash -n scripts/infer/infer.sh scripts/infer/lib/*.sh scripts/templates/infer/*.env
bash -n scripts/eval/eval.sh scripts/eval/lib/*.sh scripts/templates/eval/*.env

If validation fails, report the exact fatal/error lines and adjust only the config or template layer that owns the value.

5. Report

Answer in Chinese unless the user asked otherwise. Include:

  • config path or template path created/changed
  • template modules used or introduced
  • key resolved axes: kind, backend, scaffold, model, and topology/serving; for train also mode and engine
  • validation commands run and their result
  • any manual values still needed, especially data paths, checkpoint/model paths, kubeconfig/backend/site values, registry/image/mount values, and multi-node host/rank values

Refactor Rules

  • Keep existing runners as the execution contract: scripts/train/train.sh, scripts/infer/infer.sh, and scripts/eval/eval.sh.
  • Move reusable defaults to scripts/templates, not scripts/lib.
  • Keep scripts/lib for executable shell helpers and workload orchestration.
  • Generated configs belong under the workload's configs/ directory, never under scripts/templates.
  • Site-specific paths, kubeconfigs, registries, mounts, Docker hosts, and secrets remain in site env, caller env, or explicit run configs when the site requires them. Do not bake them into shared templates.
  • Do not delete legacy monolithic scripts unless the user explicitly asks. When migrating one, preserve behavior with one generated config plus reusable modules, then validate with --dry-run.
  • Prefer the existing module tree over introducing new dimensions. Add a module only when an existing module has the wrong ownership boundary.

Guardrails

  • Do not launch training/eval/infer unless the user explicitly asks and confirms.
  • Do not kill processes, clear /dev/shm, run ray stop, delete logs, delete checkpoints, or mutate the cluster.
  • Do not SSH to worker nodes; for multi-node flows, print the commands the user must run on each node.
  • Do not claim a config is validated without runner output.
  • Do not hardcode secrets such as WANDB_API_KEY, kubeconfig contents, registry credentials, or personal tokens into templates or generated configs.

© LegoX, Apache-2.0. 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 2 other files (references) in .agents/skills/lego-rl-config of LegoX/Lego-RL.

  • SKILL.md
  • agents/openai.yaml
  • references/config-generation.md

Open the folder on GitHubat commit 0731c95

Compare with similar skills

Lego Rl Config 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.

Lego Rl Config compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lego Rl Config this skillLegoX/Lego-RL113—~2.1kAutomated safety check: NotesApache-2.0
Vllm Deploy K8svllm-project/vllm-skills102—~2kAutomated safety check: PassApache-2.0
LLM Inference Scalingsickn33/agentic-awesome-skills47k1 repos~2.1kAutomated safety check: PassMIT
Coreweave Hello Worldjeremylongshore/tons-of-skills-marketplace2.8k—~1.4kAutomated safety check: PassMIT
LLM Inference ScalingBagelHole/DevOps-Security-Agent-Skills1.2k—~2kAutomated safety check: PassMIT
Dstack Prototypingdstackai/dstack2.3k—~1.6kAutomated safety check: PassMPL-2.0

Similar skills

  • Vllm Deploy K8s

    vllm-project/vllm-skills

    Deploy vLLM to Kubernetes (K8s) with GPU support, health probes, and OpenAI-compatible API endpoint.

    102 GitHub stars~2k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • LLM Inference Scaling

    sickn33/agentic-awesome-skills

    Auto-scale LLM inference clusters on Kubernetes using KEDA, custom GPU metrics, and horizontal pod autoscaling.

    47k GitHub starsUsed in 1 repo~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Coreweave Hello World

    jeremylongshore/tons-of-skills-marketplace

    Deploy a GPU workload on CoreWeave with kubectl. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~1.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • LLM Inference Scaling

    BagelHole/DevOps-Security-Agent-Skills

    Auto-scale LLM inference clusters on Kubernetes using KEDA, custom GPU metrics, and horizontal pod autoscaling.

    1.2k GitHub stars~2k tokensUpdated 4 mo ago
    AI & LLM EngineeringAuto-check passed
  • Dstack Prototyping

    dstackai/dstack

    Use with the dstack skill for model-serving work when the image, serving command, resources, backend/fleet choice, or service behavior is not proven.

    2.3k GitHub stars~1.6k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Software Design Review

    atilladeniz/Kubeli

    Analyzes code based on John Ousterhout's "A Philosophy of Software Design".

    387 GitHub stars~5.3k tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from LegoX/Lego-RL

All 11 skills in this repo
  • Check

    LegoX/Lego-RL

    Preflight a Lego-RL config: answer "is it safe to launch this run right now?".

    113 GitHub stars~2.9k tokensUpdated 3 days ago
    Auto-check passed
  • Dashboard

    LegoX/Lego-RL

    Bring up the Lego-RL training dashboard (webui/) on whatever machine you are on, adapting to that box's layout instead of assuming this repo's paths.

    113 GitHub stars~4.2k tokensUpdated 3 days ago
    Auto-check passed
  • Run

    LegoX/Lego-RL

    Preflight and launch a Lego-RL run (train, eval or infer). An agent skill from LegoX/Lego-RL.

    113 GitHub stars~3k tokensUpdated 3 days ago
    Auto-check passed
  • Status

    LegoX/Lego-RL

    Diagnose a Lego-RL run that is already in flight (or just finished): which run is alive, how far it has got, and whether its numbers are healthy.

    113 GitHub stars~3k tokensUpdated 3 days ago
    Auto-check passed
  • K8s Sandbox Install

    LegoX/Lego-RL

    Guided install / scale-out of a sandbox Kubernetes cluster for the Lego-RL k8s backend (kubeadm 1.32 + containerd + flannel + ImageVolume, optionally nydus / a shared registry / an isolated dockerd).

    113 GitHub stars~2.9k tokensUpdated 3 days ago
    Auto-check: warnings
  • Rl Check

    LegoX/Lego-RL

    One-to-one Codex counterpart for Claude /rl:check. An agent skill from LegoX/Lego-RL.

    113 GitHub stars~338 tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about Lego Rl Config

What does Lego Rl Config do?

Compose, edit, refactor, and validate Lego-RL train/eval/infer .env configs and reusable scripts/templates modules. Lego Rl Config is an agent skill from LegoX/Lego-RL.env configs and reusable scripts/templates modules.

When should I use Lego Rl Config?

Lego Rl Config fits situations like: Codex is asked to generate an experiment config; migrate legacy wrappers into configs; edit template modules; dry-run a train/eval/infer workload for config validation.

How do I install Lego Rl Config in Claude Code?

Run `npx skills add LegoX/Lego-RL --skill lego-rl-config -a claude-code`. Or copy the skill folder (.agents/skills/lego-rl-config in LegoX/Lego-RL) into .claude/skills/lego-rl-config in your project. Claude Code loads it when a task matches its description.

How do I install Lego Rl Config in Codex?

Run `npx skills add LegoX/Lego-RL --skill lego-rl-config -a codex`. Or copy the skill folder (.agents/skills/lego-rl-config in LegoX/Lego-RL) into .agents/skills/lego-rl-config in your project. Codex loads it when a task matches its description.

Can I use Lego Rl Config 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 LegoX/Lego-RL --skill lego-rl-config -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lego-rl-config, .gemini/skills/lego-rl-config, .github/skills/lego-rl-config and .opencode/skills/lego-rl-config in your project.

What does Lego Rl Config need to run?

Going by SKILL.md and its folder, Lego Rl Config needs the command-line tools its instructions call (bash) and credentials named WANDB_API_KEY. Our summary lists: Docker; A credential in WANDB_API_KEY.

Does Lego Rl Config 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 Lego Rl Config safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Lego Rl Config use?

Lego Rl Config is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lego Rl Config use?

About 2.1k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Lego Rl Config?

Skills that share tags, products or a category with Lego Rl Config: Vllm Deploy K8s (vllm-project/vllm-skills, 102 stars), LLM Inference Scaling (sickn33/agentic-awesome-skills, 47k stars), Coreweave Hello World (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and LLM Inference Scaling (BagelHole/DevOps-Security-Agent-Skills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lego Rl Config?

LegoX (a GitHub organization) maintains it in LegoX/Lego-RL, which has 113 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.

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