Context Engineering for Coding Agents

5 min read · Maps the Hugging Face Context Course onto real enforcement

TL;DR: Context engineering structures knowledge (skills, MCP, plugins, sub-agents). ThumbGate is the hook layer — PreToolUse gates that block known-bad tool calls after context fails. Without matchable surfaces, “promotion” is theater.

What the course gets right

Hugging Face’s Context Course frames the key constraint: an agent is only as good as the context it can find. Skills, MCP tools, plugins, sub-agents, and hooks are the portable layers Claude Code, Codex, and OpenCode all share.

That framing is correct — and incomplete for production. Agents also need a hard wall on irreversible actions (email send, force-push, spend, rm -rf). Prompt prose and skill markdown cannot guarantee that wall.

Course units → ThumbGate surfaces

HF unitLayerThumbGate / fleet surface
1Agent Skillsskills/*, ~/.grok/skills/*, progressive disclosure
2MCPMCP profiles, allowlists, multi-surface gate match (tool name + args)
3Plugins / workflowsWorkflow packs, Grok Rhai workflows, marketplace adapters
4Sub-agentsParallel agents with Linear/vault ownership (no lock steal)
5HooksProduct core: PreToolUse gate-check, spend-guard, outbound-email-guard
6Nano harnessgate-check stdin contract, CLI operational surfaces

Why hooks are the product wedge

Skills tell the agent what “good” looks like. Hooks decide whether a tool call is allowed to run. When auto-promoted rules only matched shell command strings, MCP Gmail send_message never fired a gate — the classic “prose rule” failure. ThumbGate now matches multiple surfaces (command, tool name, light endpoint fields) and keeps catastrophic actions on a hard floor.

See also: MCP Pre-Action Checks Explained and AC/DC + runtime enforcement.

GSD + Ralph (how we operate)

Promotion without a matchable tool surface is not enforcement.

Start ThumbGate Pro Setup guide GitHub

FAQ

Is ThumbGate a context-engineering framework?

ThumbGate is the infrastructure firewall for agent tools. It pairs with context engineering: you structure skills and MCP; ThumbGate enforces pre-action policy and turns thumbs-down into matchable prevention rules.

Does this replace the HF course?

No. The course teaches layers and practice. Use it as a design checklist; use ThumbGate when irreversible tool calls must not depend on the model obeying prose.

Where do I put irreversible policy?

In hooks/gates with patterns that match real tool surfaces — not only in skill markdown.

Related product docs: context engineering map in the ThumbGate repo (docs/context-engineering/).