The final leg, @name! Captain Redbeard saves the best treasure for last - the newest, most powerful features that turn Claude Code from a single first mate into a whole disciplined crew. Subagents, skills, MCP, hooks, and settings.
A subagent is a specialized crewmate with its own prompt and its own set of tools. Claude delegates focused tasks to them - one for code review, one for writing tests, and so on. The main session stays clean while the specialist does deep work.
You define a subagent as a markdown file:
1# Subagents live here, one markdown file each
2.claude/agents/code-reviewer.md
3.claude/agents/test-writer.mdEach file describes the agent's job, its system prompt, and which tools it may use. Manage them in the REPL with:
1/agentsWhen you ask Claude to review code, it can hand the task to your
code-reviewer subagent automatically - like a captain assigning the right sailor to the right duty.A skill is a reusable, model-invoked capability. Once installed, Claude can call it when relevant, and you can invoke it yourself as a slash command:
1# A skill named "changelog" is invoked like this
2/changelogSkills package up a repeatable task - generating a changelog, scaffolding a component, running a deployment checklist - so you never re-explain it. Think of skills as the standing orders pinned to the ship's wall.
MCP (Model Context Protocol) lets Claude Code connect to external tools and data: GitHub, databases, Slack, a browser, and more. This is how your ship trades with other ports.
Add an MCP server from the command line:
1# Register a new MCP server
2claude mcp add github npx -y @modelcontextprotocol/server-githubOr configure servers in a project file:
1# MCP servers can be declared here
2.mcp.jsonManage and inspect your connections inside the REPL:
1/mcpWith MCP wired up, you can ask Claude to read a GitHub issue, query your database, or post to Slack - all without leaving the terminal.
Hooks are shell commands that run automatically when events happen. They are the bosun's whistle - the crew acts the moment the signal sounds. You configure them in
.claude/settings.json.Common events:
PreToolUse - before Claude uses a toolPostToolUse - after a tool runs (e.g. run Prettier after every edit)Stop - when Claude finishes respondingSessionStart - when a session beginsHere is a hook that runs Prettier after every file edit:
1// .claude/settings.json
2{
3 "hooks": {
4 "PostToolUse": [
5 {
6 "matcher": "Edit",
7 "hooks": [
8 { "type": "command", "command": "npx prettier --write ." }
9 ]
10 }
11 ]
12 }
13}Hooks can also block dangerous actions - for example, refusing edits to a protected file. The crew enforces the rules so you don't have to watch every move.
Claude Code reads settings from
.claude/settings.json (per project) and ~/.claude/settings.json (global). Here you set permission rules, environment variables, hooks, and the default model.Permission rules let you pre-approve safe commands so Claude doesn't ask every time:
1// .claude/settings.json
2{
3 "permissions": {
4 "allow": [
5 "Bash(git*)",
6 "Read",
7 "Edit"
8 ]
9 },
10 "model": "claude-sonnet-4-6"
11}The rule
Bash(git*) means "allow any git command without asking." Combined with the permission modes from the last lesson (default, plan, acceptEdits, bypassPermissions), you control exactly how much rope your crew gets.A fully outfitted ship looks like this:
CLAUDE.md - the logbook, so Claude knows your conventions.claude/agents/ - specialists for review and testing/commands for repeated jobs.mcp.json - connections to GitHub, databases, and more.claude/settings.json - auto-format, auto-test, guard railsThat is a crew that practically sails itself.
Open the sandpack and study the real configuration files: a subagent, a settings file with hooks and permissions, and an MCP config. These are the genuine shapes Claude Code expects.
Congratulations, @name! You've completed the entire Vibecoding voyage!
Here's the treasure you've gathered:
✅ Module 0 - Cursor basics ✅ Module 1 - Next.js setup ✅ Modules 2-13 - 12 social media clones
✅ Fundamentals - install,
/login, models, claude -p, @ file context, real flags
✅ Workflow - /init, Plan Mode, implement, review, headless CI
✅ Newest features - subagents (.claude/agents/), skills (/command), MCP (.mcp.json), hooks & permissions (.claude/settings.json)You now command both Cursor and Claude Code - the AI-first editor and the agentic terminal crew. You're ready to build professional applications with AI at the helm! 🏴☠️
Fair winds, and keep coding! 💻✨