Introduction
Most people open Claude Code, start chatting, and tap into roughly 20% of what it can do. The other 80% lives in MCP servers, skills, sub-agents, context-management commands, and a handful of plugins that turn the CLI from “ChatGPT with edits” into a real engineering tool.
This is the intermediate-to-advanced guide that picks up where the basic Claude Code tutorial leaves
off. You’ll see the slash commands that change how you operate (/insights,
/context,
/compact), the MCP servers worth
installing first (GitHub, Context7, Playwright), a walkthrough of building custom skills, and the
scope rules that determine where everything lives.
📚 Table of contents
- Run Claude Code inside your editor, not the bare terminal
- CLAUDE.md — the project memory you set up once
- Slash commands worth knowing
- Model selection — Opus, Sonnet, Haiku
- Project vs user vs global scope
- Installing the GitHub MCP server
- Context7 for up-to-date docs
- Playwright for browser automation
- Superpowers (and why to be careful)
- dbhub for live Postgres access
- Building custom skills
- The skill loop — create, run, refine, share
- Auto-invocation: when Claude picks skills for you
- Best practices
- Common mistakes
- Frequently asked questions
🖥️ Run Claude Code inside your editor
Claude Code works fine from a raw terminal, but you’ll have a much better time if you run it as an extension inside an editor — VS Code, Cursor, Windsurf, anti-gravity, any fork will do. The benefit is visual: you see the files Claude creates, the directory structure it builds, and the diffs it applies, all in one window.
In Cursor and VS Code, install the Claude Code extension from the Extensions panel, open a project, and
spawn a new session. Functionally it’s identical to running claude
in a shell — just with the surrounding file tree available for inspection.
📒 CLAUDE.md — the project memory you set up once
By default, every Claude Code session starts amnesiac. The agent can read your repo, but it doesn’t know the rules you’ve set for it: preferred libraries, conventions, deployment commands, API contracts. CLAUDE.md is the file that fixes that. Drop it at the root of your project, spelled exactly that way, and Claude reads it at the start of every session.
What belongs in CLAUDE.md:
- Tech stack — language version, frameworks, package manager, deployment target.
- Project structure highlights the agent should know up front (instead of re-discovering them).
- Code conventions — naming, error handling, comment style, test patterns.
- Development commands — lint, test, dev server, deploy.
- API references and external integrations the agent will hit repeatedly.
- Any “always do this” or “never do this” rules specific to this project.
👉 Treat CLAUDE.md as a living file. Whenever you correct Claude on a non-obvious rule, ask it to record the rule in CLAUDE.md. Over a few weeks the file thickens into a real spec, and new sessions inherit the institutional knowledge without you having to repeat yourself.
⌨️ Slash commands worth knowing
/model
Switch between Opus, Sonnet, and Haiku mid-session. Critical for managing cost on the $20 plan.
/insights
Generates a full HTML report on your usage patterns, what’s working, where you waste tokens. Run it monthly; you’ll learn something each time.
/cost
Token spend for the current session. Useful when running on the API instead of a subscription.
/context
Shows what’s loaded in your context window — system prompt, tools, skills, MCP servers, free space. Spot bloat before it costs you.
/compact
Summarizes the current chat and continues with a smaller token footprint. Use sparingly — you lose nuance.
/mcp
Lists connected MCP servers, their tools, and lets you enable/disable individual ones to save context.
🧠 Model selection
- Sonnet — default for most coding tasks. Best cost/quality balance.
- Opus — reserve for tricky architectural work, deep reviews, or unfamiliar codebases.
- Haiku — for simple, repetitive, or large-batch work. Cheapest and fastest.
On the $20/month plan, running Opus by default eats your quota in hours. Run Sonnet, switch up only when you hit something hard.
🗂️ Project vs user vs global scope
Everything you configure — MCP servers, skills, settings — lives at one of three scopes:
- Local (default):
.claude/in the current project. Only you, only this project. - Project:
.mcp.jsonin the project. Everyone on the team, only this project. - User (global):
~/.claude/. Only you, all projects.
Most people accidentally install everything at local scope. For things you use everywhere (GitHub MCP,
your favorite skills), add --scope user
so the config follows you across projects.
🐙 GitHub MCP server
The single highest-leverage MCP. Lets Claude create remote repos, push code, manage issues, and open PRs without you ever leaving the terminal.
- Create a GitHub Personal Access Token: Settings → Developer settings → Personal access tokens → new fine-grained token. Scope: repo.
- Copy the
claude mcp add-json github <config>command from the GitHub MCP docs. - Replace the PAT placeholder with your token.
- Append
--scope userif you want it everywhere. - Run in a fresh terminal (not inside Claude Code).
- Restart Claude Code, type
/mcp, confirm GitHub appears.
Test it: “Create a new GitHub repo and push a README saying this is a demo.” If Claude
falls back to the gh CLI, nudge it
explicitly: “Use the GitHub MCP server.”
📖 Context7 for up-to-date docs
Models have a training cutoff; libraries don’t. Context7 gives Claude live access to current documentation for thousands of libraries. Install via the Claude desktop app: Code → Customize → Personal plugins → Browse plugins, search Context7, install.
Once installed, any time Claude reaches for a library it doesn’t know perfectly, it pulls the current docs. Hugely reduces stale-API bugs.
🌐 Playwright for browser automation
Same install path. Adds the ability for Claude to spin up a Playwright browser, navigate the site it just built, and verify the build worked. Closes the “works on my local server — broken in practice” gap.
🐘 dbhub for live Postgres access
If you work with Postgres regularly, the dbhub MCP server is worth adding alongside GitHub. It gives Claude direct, read/write access to your database — inspect tables, run queries, generate sample rows, and reason about schema before writing code that touches it.
The practical win: when Claude can see your schema, the SQL and ORM code it writes stops being speculative. It generates against the real shape of your data instead of a generic template. For a new feature, the typical loop becomes: ask Claude to inspect the tables involved, then ask it to draft the migration and the endpoint — both of which line up because they were built against ground truth.
⚠️ Scope dbhub carefully. Point it at a dev database, not production, unless you really know what you’re doing. Live tools that can execute writes deserve the same paranoia as a teammate with fresh commit access.
⚡ Superpowers
A bundle of pre-built agents and skills — brainstorming, mockups, code review, more. Useful but expensive: loads heavily into context, slows responses, eats tokens.
- Only enable on the Max plan unless cost isn’t a concern
- Disable when not in active use
- Treat as inspiration for your own custom skills rather than a permanent dependency
🛠️ Building custom skills
A skill is a Markdown file with a name, a description, and instructions for a repeatable workflow.
Lives in .claude/skills/<name>/SKILL.md
by default; move to global scope when you want it everywhere.
Worked example: code-review skill
Tell Claude: “Create a code-review skill. Output structured findings under Security, Error Handling, Performance, Code Quality, and Testing. For each finding, include severity, location, and suggested fix.” Claude writes the SKILL.md and registers a slash command for you.
After a restart, /code-review appears
as a runnable command. Use it on any file or directory: /code-review src/auth.
Consistent format, every run.
🔁 The skill loop
- Create. Ask Claude to write the SKILL.md from your description.
- Run. Invoke it. See what comes back.
- Refine. Tell Claude what to change about the skill, not the run. The skill body improves.
- Share. Commit it to git so teammates inherit it.
A skill that’s been refined over a month is worth more than ten new skills written this week.
🪄 Auto-invocation
You don’t always have to type the slash command. Claude scans your skill library and invokes the right one based on context. Ask “review this code” and the code-review skill auto-runs.
For this to work well, skill descriptions must be specific. A vague description like “reviews code” triggers too often or not enough. “Structures code review under Security, Error Handling, Performance, Code Quality, Testing” triggers exactly when it should.
✅ Best practices
- Run
/contextat the start of any non-trivial session - Disable MCP tools you’re not using this session — they cost context
- Set scope intentionally; default-to-local burns hours later
- Switch to Sonnet for normal work; switch to Opus only for hard problems
- Build skills the third time you do something repeatable
- Commit project-level skills and
.mcp.jsonso teammates get them - Run
/insightsmonthly to spot waste
❌ Common mistakes
- Running Opus by default on the $20 plan and running out by lunch
- Adding MCP servers without
--scope userand re-adding them in every project - Leaving 200 MCP tools loaded when you only use 10
- Installing Superpowers and forgetting it slows everything down
- Writing the same prompt repeatedly instead of building a skill
- Pasting PATs into
.mcp.jsonand committing them to git - Forgetting to restart Claude after installing a new skill or MCP server
Conclusion
The difference between a Claude Code casual user and a power user is configuration. Three MCP servers
(GitHub, Context7, Playwright), five custom skills, and a habit of running /context
before long sessions transform the tool from a chat partner into infrastructure.
Spend an evening setting it up. The next month of work pays it back ten times over.
Related reading: Claude Code hands-on deep dive — Claude ecosystem guide (Chat, Code & Desktop) — MCP explained: build your own server
Explore More on DevShelf
-
Claude Code Deep Dive: Agentic Loop and Real Examples
The foundation before the advanced setup — install, basic slash commands, and the agentic loop explained hands-on.
-
MCP Explained: Build Your Own Server
The protocol behind every MCP server you just configured — how to build a custom one when a pre-built server doesn't exist.