RL 動画チュートリアルから本番 RL エンジニアリングのスキルへ
Terminal-Bench と Harbor を開発しているチームは、苦労して得た RL エンジニアリングの知見を数多く共有しています。タスクをどうパッケージするか、エージェントの不正をどう見抜くか、ロールアウトをどう学習データに変えるか。その大半は長いカンファレンス講演の中にあります。
そのうち 3 本の講演を合わせると、約 1 時間半の動画になります。どの 1 分にも価値がありますが、再利用は困難です。次に環境を作るとき、記憶にある 1 枚のスライドを探して、またタイムラインを行き来することになります。
そこで、視聴をエージェントのチームに任せました。Eigent で Gemini 4 を使うと、1 つのブリーフで 3 本の Terminal-Bench 講演が、本番 RL 環境エンジニアリング向けの 4 つのファイルベースのスキルになり、さらに各アイデアの出典を示すリンク付きレポートも作成されました。
ワークフローの全体像
講演を選ぶのはあなたです。そこから先は、1 つのブリーフでエージェントが再利用できるスキルまで進みます。各段階でファイルが残るので、作業を段階ごとに確認できます。
| 段階 | 何をするか | 得られるもの |
|---|---|---|
| 選ぶ | 学びたい YouTube 講演を選ぶ | ブリーフに入れる動画リンクの短いリスト |
| 視聴 | 字幕とフレームをダウンロードし、各講演を最後まで視聴する | 各講演のタイムスタンプ付きアウトライン |
| 分析 | 手法、知見、報告された結果、警告を抽出する | OBSERVED、INFERRED、UPDATED のラベル付き学習ポイント |
| 比較 | 講演同士を突き合わせる | 一致点、相違点、互いのギャップをどう補うか |
| 抽出 | 実用的な能力ごとに手法と知見をまとめる | スキルごとの SKILL.md と evidence.md |
| 検証 | 構造を確認し、スクリプトを実行し、新しいタスクでスキルを試す | STRUCTURALLY CHECKED、EXECUTED、UNTESTED のいずれかが付いた各スキル |
| レポート | HTML レポートを作成し 127.0.0.1 で配信する | 埋め込まれた講演、クリックできるタイムスタンプ、ギャップを示すカバレッジマトリクス |
| 再利用 | コワーカーに SKILL.md を読ませる | 自分のプロジェクトでの本番 RL 環境エンジニアリング |
ここから、自分で実行する手順を順に説明します。ブリーフの書き方について私たちが学んだ教訓も紹介します。
得られるもの
- 再利用できるスキル - それぞれ
SKILL.mdとevidence.mdで構成され、別のエージェントが講演を見なくても適用できるように書かれています。 - 出典リンク付きの HTML レポート - ローカルで配信され、すべての講演が埋め込まれ、タイムスタンプ付きのアウトラインと、クリックするとその瞬間に移動できる学習ポイントが含まれます。
- カバレッジマトリクス - どのスキルが RL ワークフローのどの部分をカバーし、どの領域がどの講演でも扱われていないかを示します。
- 誠実な記録 - すべての主張に OBSERVED、INFERRED、UPDATED のラベルが付き、すべてのスキルに実行済み、構造チェック済み、未テストのいずれかが記されます。
始める前に
- お使いのマシンに Eigent がインストールされていること。
- Gemini API キー。
- エージェントに学ばせたい YouTube のリンク。私たちが使ったのは次の 3 本です:
| 講演 | チャンネル | 長さ |
|---|---|---|
| Introducing Terminal-Bench: Evaluating LLM Agents in Realistic Terminal Settings | Anyscale (Ray Summit 2025) | 31:23 |
| Everything Is a Rollout - Alex Shaw + Ryan Marten | AI Engineer | 21:11 |
| Terminal-Bench 2.0: Launch + Q&A with the founders | Latent Space | 35:00 |
Gemini API キーを追加する
- Settings → Models を開きます。
- Gemini を見つけて設定を開きます。
- API key を貼り付けます。
- model type を
gemini-4に設定します。 - Save をクリックします。
Gemini 4 を選択する
- ホーム画面で、入力欄の下にある モデルピッカー を開きます。
- Gemini → gemini-4 を選びます。
- 必要なら思考の強さを設定します。デフォルトのままでも問題ありません。
ブリーフを貼り付ける
以下のブリーフを Cowork with の入力欄にコピーします。動画リンクを自分のものに差し替え、Docker の行を allowed または not allowed に設定してください。
Watch the YouTube videos listed below and turn their methods and insights into reusable,
file-based agent skills. Then publish the results as a well-designed HTML report served from a
local web server.
Videos:
- https://www.youtube.com/watch?v=zt-U4lDdenY&t=1559s
- https://www.youtube.com/watch?v=jRCpXUjz4CI
- https://www.youtube.com/watch?v=5wo0mLlG0fk&t=1815s
Use only these videos as primary sources. Do not search for, substitute, or add other videos.
You may consult official documentation and the code repositories the videos link to or name,
but only to check or update details shown in the videos.
## Focus
Extract practical, repeatable methods. Where the videos cover them, include:
- Defining tasks, observations, actions, and termination conditions.
- Creating reproducible environments and reset behaviour.
- Building verifiers and reward functions.
- Detecting reward hacking and invalid successes.
- Collecting, scoring, and reviewing agent trajectories.
- Preparing data for agent training and evaluation.
Do not invent coverage for areas the videos don't address. List those areas as gaps instead.
Capture insights, not only procedures. For every method, record why the speakers use it, what
went wrong before they did, any results or numbers they reported, and the warnings they gave.
Treat named tools and frameworks (for example Harbor or Terminal-Bench) as one implementation
of a method. Record the underlying principle first and the tool-specific steps second.
## Permissions and limits
- Allowed: reading the video pages; downloading subtitles, transcripts, and the video files
for analysis; extracting frames; reading official docs and repositories named in the
videos; creating a local virtual environment and installing open-source packages into it;
running a local static web server bound to 127.0.0.1.
- Docker: [allowed / not allowed].
- Not allowed: model training, GPU jobs, paid hosted services, calls to paid LLM APIs, or
publishing anything to a public host. For trajectory collection tests, use a scripted,
rule-based, or random policy.
- Keep all files inside ./rl-env-skills/ in the current working directory. Delete downloaded
video files when finished.
- Do not ask for confirmation for the actions allowed above. Stop and report only if a required
action falls outside them.
- If a video is private, removed, region-locked, or has no usable audio or transcript, say so in
the report. Continue with the remaining videos, and do not replace it.
## Capability honesty
Before starting, record which relevant capabilities you have: video viewing, frame
extraction, transcript access, code execution, browser preview. If you cannot inspect video
visuals, work from transcripts and mark every visual claim as "not observed".
Never describe on-screen content you did not actually see.
## Analysis
For each video:
- Record title, channel, published date, duration, and view count with the date checked.
- Watch it in full. Inspect visual demonstrations, code, diagrams, and narration where your
capabilities allow.
- Build a timestamped outline of the main sections.
- Preserve timestamps for every important procedure, decision, and warning.
- List the key insights and takeaways: design decisions and the reasons behind them, lessons
learned, failure stories, reported results, and warnings. Give each one a timestamp.
- Label each claim OBSERVED (seen or heard in the video), INFERRED (your interpretation), or
UPDATED (adapted to current official docs; cite the doc URL and the date checked).
- Re-inspect unclear moments. Record unresolved details instead of guessing.
- Paraphrase. Quotes must be under 15 words and carry a timestamp. Do not reproduce transcripts.
Then note where the videos agree, where they differ, and where one fills a gap in another.
## Skills
Create 2–4 skills grouped by practical capability. A skill may draw from several videos.
Layout:
rl-env-skills/
<skill-name>/
SKILL.md # required
evidence.md # timestamps, OBSERVED/INFERRED/UPDATED labels, source per point
scripts/ templates/ # only if they materially help; scripts must be tested
report/
index.html # the HTML report (see below)
assets/ # extracted frames or screenshots used in the report, if any
REPORT.md
manifest.json
SKILL.md must begin with YAML frontmatter:
---
name: <kebab-case, matches folder name>
description: <1–2 sentences: what it does and when to use it, including trigger phrases>
---
The body must cover: prerequisites, required inputs, key insights (the principles and lessons
behind the procedure, each with its source and timestamp), procedure (numbered steps), expected
outputs, decision rules, failure recovery, observable success checks, and a tool-agnostic path
for projects that don't use the tools shown in the videos. Another agent should be able to
apply it to a new project without watching the videos.
A skill must not be only a wrapper around one tool's features. If you removed every
tool-specific command, the insights and decision rules should still stand on their own.
Keep these four things distinct throughout: task datasets, recorded trajectories, supervised
training examples, and RL policy optimisation. Never imply that exporting trajectories is RL
training.
## Validation
- Structural: frontmatter is present and valid, the name matches the folder, every referenced
file exists, every evidence timestamp falls within the source video's duration, and every
skill has a key insights section with at least three sourced insights.
- Execution: run every script you created. Where feasible, apply at least one skill end to end on
a small example the videos don't use (e.g. a text grid-world, or a "make this failing unit
test pass" task).
- Report each item as STRUCTURALLY CHECKED, EXECUTED (with command and result), or UNTESTED
(with reason).
## HTML report (report/index.html)
### Content, in this order
1. Header: report title, date checked, the agent's capability summary (had / lacked).
2. Summary: 3–5 sentences on what was produced and the main limitations. No marketing language.
3. Sources: one row per video (title, channel, published date, duration, views with date
checked, linked code or repository, access status).
4. One section per video:
- The original video embedded with a privacy-enhanced YouTube embed
(https://www.youtube-nocookie.com/embed/<VIDEO_ID>), with a 16:9 responsive frame.
- Link to the original.
- Timestamped outline of the video.
- Key insights and takeaways, each with a clickable timestamp and a label.
- Learning points: numbered, each with a clickable timestamp that seeks the embedded player
(YouTube IFrame Player API) and an OBSERVED / INFERRED / UPDATED label.
- Unresolved details.
- If embedding is blocked, show the video thumbnail linked to youtube.com/watch?v=<ID>
and state that embedding was unavailable.
5. How the videos compare: agreements, differences, and how each fills the others' gaps.
6. One section per skill:
- Name, absolute path to SKILL.md, one-sentence purpose, and when to use it.
- Key insights the skill carries, with their sources.
- Procedure summary (the key steps, not the whole file).
- Evidence: every supporting source point as a row — video, timestamp (clickable), label,
and what the skill took from it. Include doc URLs for UPDATED items.
- Validation status with the command and result if executed.
7. Coverage matrix: skills × the videos, showing which video supports which skill, plus
the focus areas no video covered.
8. Data distinctions: a short table defining task dataset, trajectory, supervised example, and
RL policy optimisation, and which of them the skills actually produce.
9. Limitations and untested items.
10. Three copy-paste reuse requests, each in a code block with a copy button.
### Visual design: light mode, in Google's design language
- Style only: do not use Google logos or wordmarks, or suggest the report is a Google product.
- Colours: page #FFFFFF; secondary surfaces #F8F9FA; borders #DADCE0; primary text #202124;
secondary text #5F6368; links and primary actions #1A73E8. Use the Google accent set
(blue #4285F4, red #EA4335, yellow #FBBC04, green #34A853) only for status and labels,
e.g. OBSERVED blue, INFERRED yellow tint with dark text, UPDATED green, UNTESTED red.
Text must meet WCAG AA contrast.
- Type: Google Sans / Google Sans Text if available from Google Fonts, otherwise Roboto; Roboto
Mono or Google Sans Code for code and timestamps. Clear scale: one H1, H2 per section, 16px
body, 1.5 line height, comfortable line length (about 70–80 characters).
- Layout: 8px spacing grid, max content width about 1100px, sticky left table of contents on
desktop that collapses on mobile, flat cards with 1px borders or a subtle Material elevation
shadow, 8–12px corner radius, plain tables with hairline row dividers.
- Avoid the generic "AI-generated" look: no gradients, purple/indigo themes, glassmorphism,
glowing effects, emoji used as icons, sparkle icons, oversized hero banners, decorative
blobs, or hype copy ("unlock", "supercharge", "seamless"). Prefer real content, tables, and
data over decoration.
- Technical: one self-contained HTML file with inline CSS and JS. Only external requests allowed:
Google Fonts and YouTube embed/API. Responsive down to 360px width with no horizontal
page scroll. Semantic HTML, keyboard-accessible controls, alt text on images.
### Serve and verify
1. Start a static server from rl-env-skills/report/ bound to 127.0.0.1, e.g.
`python3 -m http.server 8000 --bind 127.0.0.1`. If port 8000 is busy, use the next free port.
Keep the server running when you finish.
2. Do not rely on opening the file from disk: YouTube embeds often fail without an http origin.
3. Verify: the page returns HTTP 200; every embed loads or shows the fallback; timestamp links
seek the player; all anchors and file links resolve; no console errors. If you have a browser
tool, take a desktop and a 375px-wide screenshot and save them to report/assets/.
4. Report how you verified each item, and which checks you could not run.
## Deliverables
- REPORT.md: a plain-text version of the report's findings.
- manifest.json:
{ "date_checked": "...",
"videos": [{"url","title","channel","published","duration","views","access_status"}],
"skills": [{"name","path","sources":["<video id>", "..."],
"insights": <number of sourced insights>,
"validation":"executed|structural|untested"}],
"capabilities": {"video": bool, "frames": bool, "transcripts": bool, "code_exec": bool,
"browser_preview": bool},
"report": {"path": "<absolute path to index.html>", "preview_url": "http://127.0.0.1:<port>/",
"server_command": "...", "verified": [...], "not_verified": [...]} }
- Final reply: the preview link on its own line first
(http://127.0.0.1:<port>/), then the command to restart the server if it stops, then a short
summary of the videos, skills with absolute paths, validation results, and limitations.
このブリーフでは、いくつかの部分が特に重要な役割を果たします:
- Use only these videos は、エージェントがあなたの選んだソースだけを使うようにします。差し替えも追加もしません。
- Capture insights, not only procedures は、「どうやるか」と一緒に「なぜそうするか」も残るようにします。詳しくは後述します。
- Capability honesty は、誰も実際には見ていない動画のフレームを描写することを防ぎます。
- OBSERVED / INFERRED / UPDATED ラベル は、事実、解釈、ドキュメントで確認した更新を区別します。
- データの区別 は、タスクデータセット、軌跡、教師あり学習の例、RL ポリシー最適化を分けておくため、軌跡のエクスポートが学習と取り違えられることはありません。
ブリーフで変えたこととその理由
動画に収めた実行では、このブリーフの以前のバージョンを使いました。多くの点はうまくいきました。Gemini 4 は 3 本の講演をすべて視聴し、Harbor のドキュメントとリポジトリで詳細を照合し、4 つのスキルを作成しました。どのスキルのスクリプトも、講演では使われていないタスク、つまり fix-ini-interpolator という Python の設定パーサーの修正で、最後まで動作しました。
しかし、スキルを読んでみて気づいたことがあります。スキルが Harbor の機能、つまりタスクフォルダの構成、軌跡の形式、CLI コマンドに強く依存していたのです。その背後にある知見の大部分は、レポートの中に留まっていました。
講演は知見の宝庫です。レポート自体も次のような知見を捉えていました:
- スキャフォールドはモデルと同じくらい重要。 詰まったコマンドを早めにキャンセルすると約 5〜10%、1 回の実行で複数のモデルを組み合わせると約 5〜6% の改善がありました(Ray Summit の講演、18:05〜19:23)。
- 早い段階でスケールを計画する。 ノート PC で同時に動かせるコンテナは 6 個程度が上限で、それがチームがクラウドサンドボックスに移行した理由です(3 本すべての講演)。
- 報酬ハッキングは RL における過学習。 怪しいほど高いスコアは、怪しいほど低い検証損失と同じように扱うべきです(AI Engineer の講演、06:35)。
ツールの使い方しか知らないスキルでは、その手法がいつ破綻するのか、そのツールがない環境では何をすべきかがわかりません。そこで、4 つの変更を加えました:
- 知見を第一級の成果物にする。 すべての動画セクションとすべてのスキルが、講演者の考え方、教訓、結果、警告を、それぞれタイムスタンプ付きで記録するようになりました。
- 原則が先、ツールは後。 Harbor と Terminal-Bench は手法を適用する 1 つの方法であって、手法そのものではありません。
- ツールのラッパーにしない。 すべてのスキルに、重要な知見のセクションとツールに依存しない手順が必要です。コマンドをすべて取り除いても、スキルには学ぶべき内容が残っているべきです。
- 検証でそれを確認する。 各スキルは出典付きの知見を少なくとも 3 つ含まなければならず、満たさない場合は構造チェックで不合格になります。
小さな食い違いも修正しました。以前のブリーフでは「2 本の動画」と書きながら、リンクを 3 つ載せていました。Gemini 4 はそれに気づいてレポートに記し、3 本すべてを分析しました。新しい表現は、動画が何本でも使えます。
エージェントに作業を任せる
ブリーフを送信します。Gemini 4 が作業を計画し、エージェントを起動します。そこからは、ブリーフに沿って実行が進みます:
- 各講演を 視聴 します。字幕、フレーム、スライド、ライブデモを確認し、タイムスタンプを残します。
- 手法と知見をスキルに 抽出 します。各スキルには独自のエビデンスファイルが付きます。
- スキルを 検証 し、確認済み、実行済み、未テストのものを記録します。
- レポートを生成 し、
127.0.0.1で配信します。
私たちの実行では、エージェントは 3 本の講演すべてをダウンロードし、25 枚以上のキーフレームを抽出し、タイムスタンプ付きの字幕を全文取得し、Harbor の詳細を公式ドキュメントと照合しました。そして、ブリーフの指示どおり、ダウンロードした動画ファイルを削除しました。
レポートを開く
レポートはローカルサーバーで開きます。私たちの実行では http://127.0.0.1:8000 でした。次の内容が表示されます:
- 能力 - 動画の視聴からブラウザプレビューまで、エージェントが持っていたものと欠けていたもの。
- 概要とソース - 各講演のチャンネル、公開日、長さ、再生回数、リンクされたリポジトリ。
- 講演ごとのセクション - プライバシー強化プレーヤーで埋め込まれた動画、タイムスタンプ付きのアウトライン、ラベル付きの学習ポイント。
- 講演の比較 - 一致点、相違点、互いのギャップをどう補っているか。
- スキルごとのセクション - 目的、主要な手順、エビデンス、そして正確な検証コマンド。
- 制限事項 - クラウドサンドボックスや有料モデル API など、未テストのものとその理由。
カバレッジマトリクスを読む
マトリクスは、どのスキルが RL ワークフローのどの部分をカバーしているか、そして講演がどこにギャップを残しているかを示します。
| 重点領域 | Task Scaffolder | Verifier & Anti-Cheat | Rollout Collector | SFT Dataset Preparer |
|---|---|---|---|---|
| タスク、観測、行動、終了条件の定義 | 主 | 副 | 主 | - |
| 再現可能な環境とリセット | 主 | 副 | 副 | - |
| 検証器と報酬関数の構築 | 副 | 主 | - | - |
| 報酬ハッキングと無効な成功の検出 | - | 主 | 副 | - |
| 軌跡の収集、採点、レビュー | - | - | 主 | 副 |
| SFT の学習と評価のためのデータ準備 | - | - | - | 主 |
| ギャップ: RL の方策勾配の数理とトレーナーの内部 | 対象外 | 対象外 | 対象外 | 別扱い |
| ギャップ: ステップ単位の密なプロセス報酬設計 | 対象外 | 結果報酬のみ | 対象外 | 対象外 |
この 2 つのギャップの行が重要です。講演では SkyRL や Tinker といったトレーナーの名前は出てきますが、学習ループは示されません。だからスキルも、それをカバーしているふりはしません。
スキルを活用する
各スキルは rl-env-skills/ 内のそれぞれのフォルダにあります:
sandboxed-task-environment-scaffolder- 再現可能なコンテナ化タスクを作成し、検証します。verifier-and-anti-cheat-auditor- 結果の検証器を構築し、報酬ハッキングがないか監査します。rollout-trajectory-collector-and-debugger- サンドボックスでロールアウトを実行し、軌跡を記録し、失敗を分類します。trajectory-to-sft-dataset-preparer- 検証済みの軌跡をきれいな SFT データに絞り込み、RL の学習とは厳密に分けておきます。
コワーカーにその 1 つを読ませ、実際の仕事を任せてみましょう。例えば:
Use rl-env-skills/verifier-and-anti-cheat-auditor/SKILL.md to design a verifier
for my "make this failing unit test pass" task. Flag any way an agent could
pass without fixing the bug.
スキルには手順、判断ルール、成功の確認方法が含まれています。エビデンスファイルにはその裏付けが記録され、新しいブリーフでは知見も一緒に残ります。
自分用にアレンジする
このブリーフは、どんな技術講演の組み合わせにも使えます。動画リンクと重点項目のリストを差し替え、残りはそのまま使ってください:
- 知見のルールは残す。 ツールのマニュアルを、苦労して得た判断力に変えるのはこのルールです。
- 誠実さのルールは残す。 能力の確認と主張のラベルこそが、出力を信頼できるものにします。
- 検証のステップは残す。 一度も実行されていないスキルは、スキルではなくただのメモです。
1 時間半の講演を、1 時間半の講演のままにしておく必要はありません。エージェントに任せて、学んだことを残しましょう。
クレジット:Gemini 4 と Eigent で作成。講演は Mike Merrill(Ray Summit 2025)、Alex Shaw と Ryan Marten(AI Engineer)、そして Latent Space に出演した Terminal-Bench の創設者によるものです。オリジナルは YouTube でご覧ください。音楽:"Wallpaper" Kevin MacLeod (incompetech.com)、Creative Commons: By Attribution 4.0 ライセンス。



