Everything you need to do after the initial installation and configuration of Claude Code, from structuring your CLAUDE.md to integrating MCP servers and establishing a productive daily workflow.
You've installed Claude Code and authenticated with your Anthropic account. Now what? The real power of Claude Code is unlocked not at installation but in the configuration that follows: specifically, how you shape Claude's understanding of your project and workflow.
This guide walks through the essential post-setup steps: creating and refining your CLAUDE.md file, configuring permissions and settings, connecting MCP servers, setting up custom commands, and building a workflow that scales with your team.
claude authentication flow. If not, start with the official setup docs.An agentic CLI tool that reads your codebase, edits files, runs commands, and integrates with your development tools, all through natural language, directly in your terminal.
The central instruction file Claude reads at the start of every session. It defines coding standards, architecture decisions, preferred libraries, and team conventions.
The Model Context Protocol lets Claude connect to external data sources (GitHub, Jira, Slack, Google Drive), extending its capabilities beyond your local repo.
Ensure these are in place before proceeding with the post-setup steps.
npm install -g @anthropic-ai/claude-code (Node 18+)claude and completed Anthropic account sign-ingit for diff review and commit operationsgh): recommended so Claude can manage PRs and issues without raw API callsPlace a CLAUDE.md file in your project root. This file is automatically read by Claude at the start of every session. Define your coding standards, preferred libraries, architecture rules, and anything Claude must always know.
# Project Instructions for Claude ## Stack - Backend: Node.js 20, Express, Prisma ORM - Frontend: React 18 + Vite + Tailwind CSS - Database: PostgreSQL 15 ## Code Standards - Use TypeScript strict mode - All functions must have JSDoc comments - No default exports; use named exports only - Use `gh` CLI for all GitHub operations ## Testing - Jest + Supertest for API tests - Run `npm test` before every commit
Located at ~/.claude/settings.json (global) or .claude/settings.json (project-level). Define which commands Claude can run without asking, and which always require approval.
{
"permissions": {
"allow": ["Bash(npm run *)", "Bash(git *)", "Bash(gh *)"],
"deny": ["Bash(rm -rf *)", "Bash(sudo *)"]
}
}
allow rules on shared machines. Claude will always ask before executing anything in the deny list.Place a CLAUDE.md at ~/.claude/CLAUDE.md for instructions that apply to all your projects. Great for personal preferences, global tool setups, and consistent behavior across repos.
## Global Rules - Never be sycophantic; be direct and critical - Use `gh` CLI for all GitHub operations - Always suggest running tests after code changes - Prefer functional programming patterns over OOP
Add MCP server configurations to your settings to give Claude access to external tools like GitHub, Jira, or Slack. Use the claude mcp add command or edit your settings file directly.
# Add the GitHub MCP server claude mcp add github-mcp \ --transport sse \ --url https://mcp.github.com/sse # List connected servers claude mcp list
Build reusable commands your whole team can use. Project commands go in .claude/commands/; personal commands go in ~/.claude/commands/. Each command is a Markdown file.
Review the current git diff and provide a structured PR review: 1. Summary of changes (2-3 sentences) 2. Potential bugs or edge cases 3. Performance considerations 4. Test coverage gaps 5. Suggested improvements
Invoke it with /project:review-pr in any Claude Code session.
Hooks let you run shell commands automatically before or after Claude Code actions, perfect for auto-formatting, linting, or logging.
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{ "type": "command", "command": "npm run lint:fix" }]
}]
}
}
Claude Code builds auto-memory over time, storing build commands, debugging insights, and context across sessions. Review what Claude has stored by checking ~/.claude/memory/ or asking Claude directly.
# Ask Claude what it currently remembers about this project "What do you know about this project so far?" # Ask Claude to save something explicitly "Remember that our staging environment is at https://staging.myapp.com"
This walkthrough shows how to take a new Node.js repository from zero to a fully Claude-Code-aware project with standards and MCP in under 10 minutes.
# 1. Navigate to your repo cd ~/projects/my-node-api # 2. Launch Claude Code claude # 3. Ask Claude to analyze the project and generate a CLAUDE.md "Analyze this codebase and create a CLAUDE.md with the stack, conventions, and important commands you observe." # 4. Review, edit, commit it "Looks good. Please commit the CLAUDE.md with the message: 'chore: add Claude Code instructions'" # 5. Connect GitHub MCP claude mcp add github --transport sse --url https://mcp.github.com/sse # 6. Test MCP is working "List all open pull requests in this repo."
CLAUDE.md by analyzing your codebase. It's faster and more accurate than writing it manually from scratch.Build a team-shared slash command that packages a full deployment checklist into a single, repeatable workflow your whole team can run.
## Deploy to Staging Checklist Run these steps in order: 1. Run `npm test` and confirm all tests pass. 2. Run `npm run build` and check for errors. 3. Show a summary of recent commits not yet deployed. 4. Create a git tag with today's date: `staging-YYYY-MM-DD` 5. Push the tag to origin. 6. Report the staging URL and deployment status.
Invoke with /project:deploy-staging. Claude runs each step, asks for confirmation before the push, and reports outcomes.
Automatically run Prettier every time Claude writes or edits a file, so every change is immediately lint-clean without you doing anything.
{
"permissions": {
"allow": ["Bash(npm *)", "Bash(git *)", "Bash(gh *)"]
},
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "npx prettier --write \"$CLAUDE_FILE_PATH\""
}
]
}
]
}
}
$CLAUDE_FILE_PATH environment variable is injected automatically by Claude Code with the path of the file that was just modified.Short, clear instructions outperform long documents. Aim for under 200 lines. Use bullet points and headers to organize sections.
Start a new session when the context window gets large. Use /clear or start fresh via claude --resume with a focused scope.
Only auto-allow commands you're comfortable with running unattended. When in doubt, let Claude ask. It takes one second to approve.
Version-control your project's Claude configuration alongside your code. This gives the whole team consistent AI behavior from day one.
Break large features into smaller, focused prompts. Claude performs significantly better with clear, bounded tasks than vague multi-step requests.
Treat Claude's output like any junior developer's PR: review diffs in the IDE extension or with git diff before committing or merging.
Configure a status bar script (see Freek's dotfiles) to display context usage. Start fresh before it hits 60%.
Do not put API keys, passwords, or tokens in CLAUDE.md; it's committed to your repo. Use environment variables or a .env file in .gitignore.
These tools pair directly with Claude Code to enhance your workflow, from IDE integration to MCP servers and CLI utilities.
Interactive diff viewing, inline suggestions, and visual file editing directly inside VS Code.
For IntelliJ, PyCharm, WebStorm and other JetBrains IDEs with context selection and diff review.
Gives Claude direct access to your GitHub repos, issues, pull requests, and Actions via MCP.
Official registry of all available MCP servers: Slack, Jira, Postgres, Google Drive, Figma and more.
Highly recommended companion. Claude uses gh to manage PRs, issues, and repos without raw API calls.
Pair with a PostToolUse hook to auto-format every file Claude touches. Keeps code consistently styled.
Reference ESLint in your CLAUDE.md and hook it as a PostToolUse command to validate every Claude edit.
Standalone desktop app for running Claude Code outside your IDE. Manage parallel sessions and visual diffs.
docs.claude.com
docs.claude.com
docs.claude.com
modelcontextprotocol.io
docs.claude.com
docs.claude.com
freek.dev: real-world dotfiles and configuration patterns
~/.claude/CLAUDE.md for personal preferences that apply everywhere, and a project-level CLAUDE.md for repo-specific standards. Claude reads both, with the project-level taking precedence. If a project has no CLAUDE.md, Claude falls back to your global file.
/migrations/ directory directly." You can also use the deny list in settings.json to block file write commands on specific paths. Claude respects both forms of restriction.
.claude/commands/ in your repo) are shared with your entire team and invoked with /project:command-name. Personal commands (~/.claude/commands/) are private to your machine and available across all projects, invoked without the /project: prefix.
npm install -g command.
--non-interactive (headless) mode designed for CI/CD usage. You'll need to set the ANTHROPIC_API_KEY environment variable and configure settings.json with the allowed commands your pipeline requires. Always scope permissions tightly in automated environments.
--model flag.