We use cookies to enhance your experience on the site
CodeWorlds

Pro Techniques: Customizing Your Crew

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.

Subagents: Specialist Crewmates

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.md

Each file describes the agent's job, its system prompt, and which tools it may use. Manage them in the REPL with:

1/agents

When 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.

Skills: Reusable Capabilities

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/changelog

Skills 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: Connecting to the Wider World

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-github

Or configure servers in a project file:

1# MCP servers can be declared here
2.mcp.json

Manage and inspect your connections inside the REPL:

1/mcp

With 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: Automatic Crew Orders

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 tool
  • PostToolUse
    - after a tool runs (e.g. run Prettier after every edit)
  • Stop
    - when Claude finishes responding
  • SessionStart
    - when a session begins

Here 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.

Settings and Permissions

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.

Putting It All Together

A fully outfitted ship looks like this:

  • CLAUDE.md
    - the logbook, so Claude knows your conventions
  • Plan Mode - propose before editing on big tasks
  • Subagents in
    .claude/agents/
    - specialists for review and testing
  • Skills - reusable
    /commands
    for repeated jobs
  • MCP in
    .mcp.json
    - connections to GitHub, databases, and more
  • Hooks in
    .claude/settings.json
    - auto-format, auto-test, guard rails
  • Permissions - pre-approved safe commands

That is a crew that practically sails itself.

Try It Yourself

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.

Final Summary 🎓🎉

Congratulations, @name! You've completed the entire Vibecoding voyage!

Here's the treasure you've gathered:

Vibecoding (Modules 0-13)

Module 0 - Cursor basics ✅ Module 1 - Next.js setup ✅ Modules 2-13 - 12 social media clones

Claude Code (Module 14)

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! 💻✨

Go to CodeWorlds