Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
GimmeJob
Sign in
Certification learning path · Claude Code 101 · Chapter 04 / 07

Claude Code 101 Course Preparation

Customizing Claude Code

The fourth section of Claude Code 101 covers five ways to shape Claude Code for a project. The quiz checks which one fits which job.

CLAUDE.md: project memory

  • A Markdown file that Claude reads at the start of every session in the project: how to build and test, conventions, things to avoid.
  • Project: CLAUDE.md in the repository, committed and shared with the team. User: ~/.claude/CLAUDE.md, your personal preferences for every project.
  • /init drafts a CLAUDE.md from your codebase, and /memory shows which memory files are loaded.
  • Keep it short and concrete. "Run npm run verify before every commit" works; "write good code" does nothing.

Subagents: delegated specialists

  • Markdown files with YAML frontmatter: a name, a description of when to use the subagent, an optional tools list and model, then a system prompt.
  • Project: .claude/agents/, shared through the repository. User: ~/.claude/agents/, available in all your projects. When names clash, the project one wins.
  • Built-in subagents include Explore, Plan and general-purpose.
  • Each subagent works in its own context and returns a summary, which keeps the main conversation clean.
  • Write a specific description, such as "Use after test files change", so Claude knows when to delegate. Limit tools: a reviewer rarely needs Edit.

Skills: reusable procedures

  • A folder with a SKILL.md file of instructions, plus any scripts or templates, in .claude/skills/ or ~/.claude/skills/.
  • Claude loads a skill when a task matches its description. Run /skills to see what is available.
  • Use a skill for "how we do X", such as writing a bug report or a release checklist.

MCP: external tools and data

  • The Model Context Protocol connects Claude Code to other systems: an issue tracker, a database, a browser.
  • Add a server with claude mcp add. A project-scoped server lives in .mcp.json in the repository, so the whole team gets it.
  • Keep secrets out of the committed file; reference environment variables instead.

Hooks: rules that always run

  • Shell commands that Claude Code runs at fixed points, configured in settings.json. Common events are PreToolUse (before a tool runs), PostToolUse (after it runs), UserPromptSubmit, Stop and SessionStart.
  • A PreToolUse hook that exits with code 2 blocks the tool call, and its stderr message goes to Claude. Exit code 1 does not block anything, a common mistake.
  • PostToolUse cannot undo a call that already ran. Its stderr is shown to Claude so the next step can change.
  • Use configured hooks for the events and matched tools they cover: formatting after an edit, blocking a particular Write/Edit call, or a notification. Enforce critical backend or filesystem policy at those boundaries too.

Which one?

You wantUse
Every session to know how to run the testsCLAUDE.md
Block matched Write/Edit calls targeting a training fileA PreToolUse hook
A test-review specialist with read-only toolsA subagent
Bug reports written the same way every timeA skill
Claude to read and create Jira issuesAn MCP server

The rule of thumb: instructions such as CLAUDE.md and skills make the right behaviour likely; hooks execute deterministic checks for configured events. They do not universally cover Bash, alternate paths, other tools or remote side effects.

Test a real hook boundary

The supplied PreToolUse hook accepts a JSON event on stdin. Write/Edit targeting .env.training exits 2 and writes a reason to stderr; normal answer.py exits 0. Malformed event objects are rejected. The settings example matches only those tools. Bash, symlink aliases and remote writes require separate controls; do not call a hook a general security sandbox. Shared config must contain no credentials.

Source registry

Reviewed 2026-11-25 · 4 chapter references
Claude Code 101

Course outline, learning objectives and current supported account/API prerequisites for Claude Code 101.

Anthropic · official training
Source ↗
Create custom subagents

Subagent files, frontmatter, project and user locations, priority and built-in subagents.

Anthropic · official documentation
Source ↗
Hooks reference

Hook events, matchers and exit-code behaviour, including exit code 2 blocking PreToolUse.

Anthropic · official documentation
Source ↗
Model Context Protocol

Specification for MCP servers, clients, resources, tools and transports.

Model Context Protocol · official specification
Source ↗