By Olga Safonova

Published: 2026-01-13

URL: https://olgasafonova.substack.com/p/claude-code-primitives-a-moomin-guide


I’ve been using Claude Code for months. Somewhere along the way, I started thinking of its features as Moomin characters. Not as a cute metaphor; as a genuine mental model for how these things actually behave.

Turns out, Tove Jansson’s characters map perfectly to agentic AI architecture.

Claude Code ships with six primitives. The documentation explains the syntax. It doesn’t explain the behavior. And behavior is what matters when you’re building workflows. Each primitive has a personality. Once you understand the personality, you stop fighting the tool.

Skills

Skills are Moominmamma. Markdown files Claude loads automatically based on context. Two locations: ~/.claude/skills/ for global, .claude/skills/ for project-specific.

No explicit invocation. Claude scans available skills and injects relevant ones. The matching happens through semantic similarity, not keywords. A skill about “database migrations” might activate when you mention “schema changes.”

Inside a skill file you put coding standards, API patterns, decision trees, domain terminology, code snippets. Whatever you’d normally have to repeat every conversation.

The trap: skills consume context window. Load too many and you crowd out room for actual work. Keep them focused.

Moominmamma is always present with the right knowledge at the right time. She never needs to be asked. Her handbag contains everything you might need; bandages when someone falls, warm blankets when guests arrive. You reach for something and it’s already there. Stock your skills/ directory well. Claude surfaces the right knowledge without prompting.

Subagents

Subagents are The Snork. Spawned Claude instances with isolated context windows. Created via the Task tool:

The subagent gets its own context. Doesn’t see your full conversation history. You pass specific inputs; it returns structured outputs. Parent conversation stays clean.

Why this matters: context windows are finite. A long debugging session pollutes context with stack traces, failed attempts, dead ends. Subagents let you offload deep work without the residue.

Tool scoping works here too. A “research” subagent might only get web search and file reading. A “refactor” subagent gets file editing but no shell access. Control the blast radius. Built-in types include Explore for codebase navigation, Plan for architecture design, Bash for command execution.

The Snork works on specific inventions and technical problems. Has his own workshop (isolated context). You give him a problem: “Build something that flies.” He disappears into his workshop, works independently, returns with a working solution. Task-oriented isolation beats philosophical isolation. The Snork actually ships thgs.

Hooks

Hooks are The Hemulen. Shell commands that execute deterministically on lifecycle events. Zero LLM involvement. Pure automation. Configured in .claude/settings.json:

Events: PreToolUse, PostToolUse, Notification, Stop. Execution is synchronous; blocks until complete.

Use cases I’ve found useful: audit logging for compliance, secret scanning before commits (saved me twice already), auto-formatting after file edits, notifications when long tasks finish.

The trap: over-hooking kills velocity. Every hook adds latency. Every validation adds friction. Use them for genuine guardrails, not bureaucratic checkboxes.

The Hemulen is obsessive, rule-following, deterministic. Collector of stamps, plants, butterflies. Tell him “sort these by date” and he will, perfectly, every time. Ask him to “use your judgment” and he freezes. Essential for order. Exhausting in excess.

Slash Commands

Slash Commands are Little My. User-triggered actions via /command. Defined as markdown files in .claude/commands/:

Invocation: /deploy staging

Key distinction from skills: skills activate automatically based on context. Commands activate explicitly based on user intent. Skills are background knowledge. Commands are foreground actions.

I have commands for /today, /weekly-update, /create-test-plan. A 10-word invocation expands into a 500-word instruction set. Huge time saver.

Little My is explicit, direct, invoked on purpose. Smallest but fiercest. She doesn’t hover in the background; you call her name and she acts immediately. Sharp, effective, no-nonsense. Won’t act unless asked. But when asked, acts without hesitation.

MCP Servers

MCP Servers split into two personalities. Model Context Protocol connects Claude to external tools and data sources. Configured in .claude/settings.json:

Local (stdio) is Sniff. Local process, stdin/stdout communication. Millisecond latency, no network dependency. File system operations, local database queries, system scripts. Security note: local MCP servers run with your user permissions. They can access anything you can access. Vet your servers.

Sniff never leaves Moominvalley. Eager fetcher, quick data lookups, always nearby sniffing for treasure. Quick fetches, immediate returns, no network delay.

Remote (HTTP/SSE) is Snufkin. Network calls with optional Server-Sent Events for streaming. 100ms-2s latency typical. GitHub, Notion, Slack, Stripe. Any REST/GraphQL API with an MCP wrapper. The Azure DevOps MCP server has become my go-to for work item management. No more context-switching to the browser. Moreover, I’ve built a few extra open source MCP servers for myself and my teams - MediaWiki MCP, ProductPlan MCP and Miro MCP server.

Snufkin wanders far from Moominvalley, returns seasonally. Worldly connector, brings rich experiences from distant lands. You wait a bit longer, but he returns with treasures from places you’ll never visit yourself.

Plugins

Plugins are Moominpappa. Distribution bundles combining skills, commands, hooks, and MCP configs:

One install, complete functionality. Instead of documenting “install these 5 things and configure them this way,” you ship one artifact. Onboarding drops from an hour to a minute. Teams share workflows: everyone gets the same coding conventions, deployment commands, guardrails.

Moominpappa packages adventures into memoirs and expeditions into shareable formats. His “Memoirs” are essentially a plugin manifest: curated, versioned, ready for others to install.

Claude Code

Claude Code itself is Moomintroll. The runtime orchestrating all primitives. Loads skills based on context, spawns subagents, fires hooks, routes commands, maintains MCP connections.

Without it, primitives are inert. Config files waiting for execution.

Moomintroll is the protagonist; everyone orbits around him. Curious, kind, occasionally anxious. He doesn’t have a single special power. He brings characters together, mediates their quirks, makes the valley feel like home. Without him, the characters are scattered individuals. Without Claude Code, the primitives are just config files waiting for someone to run them.

One more character: The Groke is prompt injection.

Attacks that attempt to override Claude’s instructions through malicious input. An attacker embeds commands in user-supplied data; files, API responses, form fields. The OWASP LLM Top 10 lists it as the #1 vulnerability for LLM applications.

The Groke freezes everything she touches. Lonely, desperate for warmth, but destructive. She doesn’t mean to destroy. But her nature makes her dangerous. The Groke is why you don’t trust arbitrary input blindly.

Stock Moominmamma’s handbag with domain knowledge. Give The Snork problems worth isolating. Let The Hemulen enforce your actual rules, not imaginary ones. Make Little My’s commands worth calling. Watch for The Groke.

The primitives are just config files until you understand their personalities. Now you do.