In Session 5 you used subagents, plan mode, and CLAUDE.md to navigate and analyze large systems. This session goes deeper into those tools and introduces the remaining power-user features: MCP servers for live data access, skills for reusable workflows, worktrees for parallel branch work, hooks for deterministic automation, and extended thinking for complex reasoning. You can also paste screenshots directly into Claude for visual debugging — see Images & Screenshots for details.
MCP Servers and Skills
What it is: MCP (Model Context Protocol) servers give Claude live access to external systems — databases, APIs, file systems, and custom tools — through a standardized protocol. Instead of copy-pasting a schema into your prompt, you connect Claude to your dev database and it queries the real thing. Instead of describing your CI status, Claude reads it directly from GitHub. Skills are the other side of extensibility: reusable prompt templates stored in .claude/skills/ that encode your team’s best practices into one-command workflows. A senior engineer writes a skill once (like generate-endpoint or security-audit), commits it to the repo, and every team member can invoke it as a slash command. Together, MCP servers expand what Claude can access and skills standardize how your team uses it.
Demo prompt:
Query the dev database to show me the users table schema.
Then write and run a query to find users with duplicate emails.
Show me the results.
Try it now: If you have an MCP server configured (database, GitHub, or filesystem), ask Claude a question that requires live data — a query, a PR summary, or a file listing from outside your project. If you do not have one configured yet, try adding a filesystem server: claude mcp add --transport stdio shared-docs -- npx -y @modelcontextprotocol/server-filesystem /path/to/team/docs. For skills, look at the .claude/skills/ directory in your project and invoke one with a slash command, or create a simple skill that generates a file following your team’s conventions.
Go deeper: MCP Servers — configuration, troubleshooting, and patterns for database, GitHub, and custom servers. Skills — writing SKILL.md files, the $ARGUMENTS variable, progressive disclosure architecture, and sharing across teams.
Subagents and Plan Mode
What it is: Subagents let Claude fork parallel investigation threads — each one explores an independent area and reports back to the main conversation. This turns serial exploration (ask about module A, wait, ask about module B, wait, ask about module C, wait, synthesize) into a single prompt that investigates all three simultaneously. Plan mode (/plan) is complementary: it tells Claude to propose an approach before writing any code. Instead of jumping straight to implementation, Claude outlines what it will change, where, and why — giving you a decision point before any files are modified. Use subagents when you have multiple independent areas to investigate. Use plan mode when the task is complex enough that you want to review the strategy before execution.
Demo prompt:
/plan
I need to replace our homegrown caching layer with Redis.
Before making any changes, investigate the current state and
propose an approach. Use subagents to check in parallel:
1. All files that import or reference the current cache module
2. Configuration files related to caching
3. Tests that mock or stub the cache
4. Any documentation that mentions the caching strategy
Then propose 2-3 migration approaches with tradeoffs.
Try it now: Pick a non-trivial task in your project — a refactoring, a library migration, or a new feature that touches multiple modules. Start with /plan and ask Claude to investigate and propose approaches before writing code. Review the plan it produces: does it account for all the files you would expect? Are the tradeoffs realistic? Approve or adjust the plan before letting it proceed.
Go deeper: Subagents — when to use parallel investigation, strategy templates for bugs and architecture. Plan Mode — entering and exiting plan mode, reviewing proposals, and combining with the explore-plan-code-commit workflow.
Worktrees, Hooks, and Extended Thinking
What it is: These features round out the power-user toolkit. Git worktrees (claude --worktree feature-name) let you run multiple Claude sessions on different branches simultaneously. At scale, you can run 3-5+ instances in parallel across separate terminal tabs — each isolated, each on its own branch — for batch migrations, parallel investigations, or keeping feature work going while fixing a production issue. Custom agents (.claude/agents/*.md files) let you define persistent, specialized agents with specific tools, models, and system prompts — a read-only code reviewer, a security auditor, a build validator. Unlike temporary subagents, custom agents are checked into version control and shared with the team. Run /agents to create and manage them. Hooks are deterministic automation that fires on specific Claude Code events (PreToolUse, PostToolUse, Notification, and others). Unlike CLAUDE.md instructions which are non-deterministic, hooks execute every time — use them for linting, formatting, security checks, or auto-running tests after edits. Extended thinking gives Claude a dedicated reasoning step before responding, which improves accuracy on complex architecture questions, tricky debugging, and multi-step refactoring where getting the order of operations wrong causes cascading failures. It is enabled by default; use /effort to control how much reasoning Claude applies.
Demo prompt:
Think step by step about this refactoring before making changes.
I need to extract the payment processing logic from OrderService
into a dedicated PaymentService. Consider:
- What methods need to move?
- What shared state or dependencies are involved?
- What is the safest order of operations to avoid breaking tests
at any intermediate step?
- Are there any circular dependency risks?
Show me your reasoning, then propose the step-by-step plan.
Try it now: Try adjusting effort level on a problem you already know the answer to — a tricky bug you recently fixed or an architecture question you debated with your team. Run /effort high and compare Claude’s reasoning to your own. For hooks, check if your project has a .claude/settings.json with hooks configured, or add a simple one that runs your linter after every file edit.
Go deeper: Worktrees — parallel branch exploration, multi-session workflows, and scaling to 5+ instances. Custom Agents — defining persistent agents with specific roles, tools, and models. Hooks — event types, configuration, and examples for linting and security checks. Extended Thinking — when to use it, which problem types benefit most, and when it is overkill.
Key Takeaways
- MCP servers transform Claude from a text-based tool into one with live access to your databases, APIs, and systems. Start with one server (database or GitHub) and expand from there.
- Skills encode institutional knowledge into reusable slash commands. Any task you do the same way more than twice is a skill candidate.
- Subagents turn serial investigation into parallel investigation. Use them whenever you have two or more independent areas to explore.
- Plan mode gives you a review checkpoint before Claude writes code. Use it for any task complex enough that you would want to see the strategy first.
- Hooks provide deterministic guarantees that CLAUDE.md instructions cannot. Use hooks for anything that must happen every time — linting, formatting, security checks.
- Worktrees let you run multiple Claude instances in parallel, each on its own branch. Scale from 2 to 5+ instances for batch migrations, parallel investigations, or keeping feature work going during a hotfix.
- Custom agents (
.claude/agents/) define persistent, specialized roles — code reviewer, security auditor, build validator — with specific tools and models. Check them into git so the whole team benefits. - Extended thinking improves accuracy on complex architecture questions, multi-step refactoring, and tricky debugging. Trigger it with “think step by step” when the order of operations matters.
Practice
Put these advanced tools to work with the Advanced Scenarios — MCP server integration, subagent orchestration, and custom skill building exercises.