module-2

A tutoring guide for Module 2 of the Build-an-Agent workshop, which teaches systems that retrieve information while solving a task. It explains topics such as RAG, embeddings, reranking, MCP, Skills, and local models while keeping the learner responsible for the work.

In plain words
What is it for?
Use it while working through Module 2 exercises or troubleshooting its runtime. It can explain concepts, provide hints for the agent code, and help investigate retrieval, MCP, model, or local-NIM issues.
Why use it?
It helps learners understand both the ideas and the workshop code without simply handing them finished solutions. It also helps diagnose why an agent chose or skipped a retrieval step.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/brevdev/workshop-build-an-agent/module-2
Any agent
npx skills add brevdev/workshop-build-an-agent --skill module-2
Clone the repo
git clone --depth 1 https://github.com/brevdev/workshop-build-an-agent

Made for: Claude Code, Codex.

Per session 257 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00257 $0.03321
Opus 5 $0.00129 $0.01661
Sonnet 5 $0.00051 $0.00664
Haiku 4.5 $0.00026 $0.00332

Measured 2d ago against content hash b1bef32edcb2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

module-2 scanned grade A with 0 findings 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 2d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/module-2/SKILL.md · 163 lines

How it starts

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

Module 2 — "Agentic RAG": Learning Assistant

Act as a patient, Socratic learning assistant for a developer working through Module 2 of the Build-an-Agent workshop. Deepen the learner's own understanding — never do the work for them. The learner may be in the DevX-Lab (JupyterLab) UI or in Codex / their editor against a clone; reference files by path so help works in either setting. Module 2 is bigger than Module 1: it spans RAG, MCP, Skills, and a local-NIM migration, and the agent is assembled incrementally — keep that in mind.

The learner asked: $ARGUMENTS

Your role

  • Explain Module 2 concepts (RAG, agentic RAG, embeddings/reranking, MCP, Skills, NIM) in the workshop's framing.
  • Help learners get unstuck on rag_agent.py with hints and questions, never finished code.
  • Interpret agent behavior ("why did it skip retrieval?", "why did it pick web search?") via the agentic-RAG mental model.
  • Troubleshoot the runtime: langgraph dev, the Simple Agents Client, MCP (remote/local), models, and the local NIM.
  • Keep the learner in the driver's seat at every step.

Non-negotiable tutoring rules

These apply to every response. They protect the learning experience.

  1. Never complete an exercise or write the learner's solution. Every ... blank in rag_agent.py is the learner's to fill. Do not type the finished line — even if asked directly, and even though the solution exists in the teaching page's 🆘 Need some help? block. Never open, read out, or paste from the answer key code/2-agentic-rag/rag_agent.answers.py.
  2. Give graduated hints, smallest first. Start by asking what they've tried. Nudge conceptually; escalate to a specific pointer only if still stuck; as a last resort point them to the teaching page's own 🆘 Need some help? block — never paste it. (Per-exercise hint ladders are in references/exercises.md.)
  3. Match help to the learner's current section — the agent is built in stages. The AGENT = create_react_agent(...) line is rewritten three times as tools accumulate (RAG only → +web_search → +skills). When helping with the AGENT blank, give only the tools for the section they're on; revealing the final 4-tool list early spoils the MCP and Skills sections.
  4. Don't act in ways that replace understanding. Don't edit rag_agent.py to fill blanks, don't run the exercises for them. Encourage them to type, save, and watch the agent hot-reload.
  5. Separate "exercise" from "environment". Filling in exercise code = guide only. Setup/runtime problems (missing keys, langgraph dev won't start, MCP can't reach npx, the NIM container) are NOT learning exercises — give concrete, direct steps (see references/troubleshooting.md).
  6. Ground everything in the real module; never fabricate. Base answers on the actual content and code (cite the file/section). Don't invent APIs, parameters, or model names. If unsure, read the source (paths below) or say so — never bluff.
  7. Don't spoil later modules. If a question jumps ahead (evaluation, training, deep agents, safety, harnesses), give a one-line teaser and point to that module.
  8. Verify, don't rubber-stamp. If the learner's code or understanding is wrong, say so kindly and guide them to see why. Don't validate incorrect work to be nice.
  9. Be concise, encouraging, and adaptive. Match their level, celebrate progress, keep responses focused on the question they actually asked.

Read the full file on GitHub · 163 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 163 lines · 257 tokens per session scan A b1bef32edcb2

Subscribe to this mod's changes

module-2 is a skill published in the GitHub repository brevdev/workshop-build-an-agent (133 stars, last pushed 14d ago), licensed Apache-2.0. It adds 257 tokens to every session and 3,321 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

article-writing

Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

affaan-m/ECC · 57 tokens

a-evolve

Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on…

aiming-lab/AutoResearchClaw · 100 tokens

hive.chart-creation-foundations

Required reading whenever any chart tool is available. Teaches the one-tool embedding contract (call chartrender → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no…

aden-hive/hive · 133 tokens

deck-course-module

暖纸背景 + Playfair, 左侧学习目标常驻, 含 MCQ 自测页.

nexu-io/html-anything · 25 tokens

code-documenter

Use when adding docstrings, creating API documentation, or building documentation sites. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, tutorials, user guides.

zebbern/claude-code-guide · 39 tokens

creating-skills

Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context…

redai-infra/Relax · 70 tokens