The Context Course
by Hugging Face
Hugging Face's free course on context engineering for code agents — skills, MCP, plugins, subagents and hooks, applied to real ML work.
Overview
The Context Course is Hugging Face's free, certificate-bearing course on context engineering, framed as 'context engineering for AI code agents: structuring knowledge so an agent can efficiently find what it needs, when it needs it to improve its generated outputs.' It runs across seven units — Unit 0 Welcome & Onboarding, Unit 1 Skills: Portable Knowledge, Unit 2 MCP: The Model Context Protocol, Unit 3 Plugins: Bundling for Distribution, Unit 4 Subagents: Multi-Agent Workflows, Unit 5 Hooks: Observing and Guarding the Lifecycle, and Unit 6 Bonus: Nano Harness — each with interactive quizzes. What separates it from the many generic prompt-engineering courses is that every technique is exercised against genuine ML workloads rather than demos: three deep-dive projects cover agent-driven pre-training research workflows, post-training where you fine-tune and evaluate a chat model against a nano benchmark, and inference where you optimize a local model with llama.cpp. You bring your own code agent — Claude Code, Codex, OpenCode or Pi are all supported — and define its context with SKILLS.md files, MCP servers, plugins, subagents and lifecycle hooks. It is written by Ben Burtenshaw, an ML engineer at Hugging Face, with Atin Kumar Singh and contributions from Maya Nielan and Ryan Whitehead on the Claude Code sections; the material is developed in the open at github.com/huggingface/context-course. Two certificates are offered: Context Fundamentals (roughly 2-3 weeks) and Context Engineering (5-8 weeks, including a capstone).
At a Glance
- Topic
- Skills
- Level
- Intermediate
- Format
- Course
- Cost
- Free
- Duration
- 7 units, ~2-3 hours each (one unit/week; 2-3 weeks for the fundamentals certificate, 5-8 weeks with the capstone)
- Provider
- Hugging Face
- Hands-on
- Yes — code/exercises
- Certificate
- Available
What You’ll Learn
- ✓Write portable SKILLS.md files that give a code agent reusable, discoverable domain knowledge
- ✓Wire MCP servers into a code agent so it can call real tools and data sources
- ✓Bundle skills, tools and prompts into plugins that can be distributed to a team
- ✓Delegate scoped work to subagents and design multi-agent workflows that stay debuggable
- ✓Use lifecycle hooks to observe, gate and guard what an agent is allowed to do
- ✓Run agent-driven pre-training research experiments instead of hand-executing every step
- ✓Fine-tune and evaluate a chat model against a nano benchmark with agent assistance
- ✓Optimize local inference with llama.cpp under an agent's control and measure the result
Highlights
- •Every unit is applied to real ML work — pre-training, post-training and inference — not toy chatbot demos
- •Agent-agnostic: works with Claude Code, Codex, OpenCode or Pi rather than locking you to one vendor
- •Covers the full context stack in one place — skills, MCP, plugins, subagents and hooks — which most tutorials treat separately
- •Two graded certificates (fundamentals at 2-3 weeks, full engineering track at 5-8 weeks with a capstone)
- •Developed openly on GitHub (huggingface/context-course) with quizzes per unit and an issue tracker for corrections
- •Free, including the certificates — only a Hugging Face account and an installed code agent are required
Who It’s For
Best For
- ✓AI engineers who already use a code agent daily and want more reliable output from it
- ✓ML practitioners automating training, evaluation and inference workflows with agents
- ✓Platform teams standardizing agent context (skills, MCP servers, hooks) across a company
- ✓Anyone who has read about Agent Skills and MCP but never shipped either
Prerequisites
- •Comfortable with Python basics — variables, functions, loops and file I/O
- •Able to navigate directories and run scripts from the command line
- •A Hugging Face account and at least one code agent installed (Claude Code, Codex, OpenCode or Pi)
FAQ
What is The Context Course?
A free, hands-on Hugging Face course that teaches context engineering for AI code agents: how to structure skills, tools, subagents and hooks so an agent finds the right knowledge at the right moment. It is aimed at engineers who already use Claude Code, Codex, OpenCode or Pi and want them to reliably do real machine-learning work — pre-training experiments, fine-tuning runs, and local inference optimization — rather than toy tasks. You finish able to package your own reusable agent context and ship it.
Is The Context Course free?
The Context Course is free to access.
What level is The Context Course for?
The Context Course is aimed at a intermediate audience. Recommended background: Comfortable with Python basics — variables, functions, loops and file I/O, Able to navigate directories and run scripts from the command line, A Hugging Face account and at least one code agent installed (Claude Code, Codex, OpenCode or Pi).
How long does The Context Course take?
Expect roughly 7 units, ~2-3 hours each (one unit/week; 2-3 weeks for the fundamentals certificate, 5-8 weeks with the capstone). Most learners work through it at their own pace.
What will I learn from The Context Course?
You'll learn: Write portable SKILLS.md files that give a code agent reusable, discoverable domain knowledge; Wire MCP servers into a code agent so it can call real tools and data sources; Bundle skills, tools and prompts into plugins that can be distributed to a team; Delegate scoped work to subagents and design multi-agent workflows that stay debuggable; Use lifecycle hooks to observe, gate and guard what an agent is allowed to do; Run agent-driven pre-training research experiments instead of hand-executing every step; Fine-tune and evaluate a chat model against a nano benchmark with agent assistance; Optimize local inference with llama.cpp under an agent's control and measure the result.
Topics
Sources
This page was written from 3 sources, 1 on domains other than huggingface.co.