Documentation Guide ยท AI

Claude Code: Post-Setup Guide

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.

23 March 2026 By Richard Gamarra
claude-code anthropic cli ai-dev
๐Ÿ“‹

Overview #

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.

โ„น๏ธ
This guide assumes Claude Code is already installed and you have completed the initial claude authentication flow. If not, start with the official setup docs.

๐Ÿง  What Claude Code Does

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.

๐Ÿ“ Key File: CLAUDE.md

The central instruction file Claude reads at the start of every session. It defines coding standards, architecture decisions, preferred libraries, and team conventions.

๐Ÿ”Œ MCP Integration

The Model Context Protocol lets Claude connect to external data sources (GitHub, Jira, Slack, Google Drive), extending its capabilities beyond your local repo.

โœ…

Requirements #

Ensure these are in place before proceeding with the post-setup steps.

๐Ÿ”ง

Post-Setup Steps #

  1. Create or Refine Your Project CLAUDE.md

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

    CLAUDE.md (example)
    # 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
  2. Configure settings.json Permissions

    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.

    .claude/settings.json
    {
      "permissions": {
        "allow": ["Bash(npm run *)", "Bash(git *)", "Bash(gh *)"],
        "deny":  ["Bash(rm -rf *)", "Bash(sudo *)"]
      }
    }
    โš ๏ธ
    Be conservative with allow rules on shared machines. Claude will always ask before executing anything in the deny list.
  3. Create a Global CLAUDE.md (Personal Instructions)

    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.

    ~/.claude/CLAUDE.md (global)
    ## 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
  4. Connect MCP Servers

    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.

    terminal (add MCP server)
    # Add the GitHub MCP server
    claude mcp add github-mcp \
      --transport sse \
      --url https://mcp.github.com/sse
    
    # List connected servers
    claude mcp list
  5. Create Custom Slash Commands

    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.

    .claude/commands/review-pr.md
    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.

  6. Set Up Hooks for Automation

    Hooks let you run shell commands automatically before or after Claude Code actions, perfect for auto-formatting, linting, or logging.

    .claude/settings.json (hooks)
    {
      "hooks": {
        "PostToolUse": [{
          "matcher": "Write|Edit",
          "hooks": [{ "type": "command", "command": "npm run lint:fix" }]
        }]
      }
    }
  7. Verify Auto-Memory and Session Continuity

    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.

    claude session
    # 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"
๐Ÿš€

Step-by-Step Examples #

Example 1: Setting Up a Node.js Project From Scratch

Beginner

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.

terminal (step by step)
# 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."
๐Ÿ’ก
Let Claude generate the initial CLAUDE.md by analyzing your codebase. It's faster and more accurate than writing it manually from scratch.

Example 2: Creating a Custom /deploy-staging Command

Intermediate

Build a team-shared slash command that packages a full deployment checklist into a single, repeatable workflow your whole team can run.

.claude/commands/deploy-staging.md
## 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.

Example 3: Using PostToolUse Hook for Auto-Formatting

Advanced

Automatically run Prettier every time Claude writes or edits a file, so every change is immediately lint-clean without you doing anything.

.claude/settings.json (complete hooks config)
{
  "permissions": {
    "allow": ["Bash(npm *)", "Bash(git *)", "Bash(gh *)"]
  },
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write|Edit|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "npx prettier --write \"$CLAUDE_FILE_PATH\""
          }
        ]
      }
    ]
  }
}
โ„น๏ธ
The $CLAUDE_FILE_PATH environment variable is injected automatically by Claude Code with the path of the file that was just modified.
โญ

Best Practices #

๐Ÿ“

Keep CLAUDE.md Concise

Short, clear instructions outperform long documents. Aim for under 200 lines. Use bullet points and headers to organize sections.

๐Ÿ”

Refresh Context on Long Sessions

Start a new session when the context window gets large. Use /clear or start fresh via claude --resume with a focused scope.

๐Ÿ”’

Be Conservative with Permissions

Only auto-allow commands you're comfortable with running unattended. When in doubt, let Claude ask. It takes one second to approve.

๐Ÿ‘ฅ

Commit CLAUDE.md and .claude/

Version-control your project's Claude configuration alongside your code. This gives the whole team consistent AI behavior from day one.

๐ŸŽฏ

Give Claude One Task at a Time

Break large features into smaller, focused prompts. Claude performs significantly better with clear, bounded tasks than vague multi-step requests.

๐Ÿงช

Always Review Before Merging

Treat Claude's output like any junior developer's PR: review diffs in the IDE extension or with git diff before committing or merging.

๐Ÿ“Š

Monitor Context Window Usage

Configure a status bar script (see Freek's dotfiles) to display context usage. Start fresh before it hits 60%.

๐Ÿ›ก๏ธ

Never Store Secrets in CLAUDE.md

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.

๐Ÿ› ๏ธ

Recommended Extensions & Tools #

These tools pair directly with Claude Code to enhance your workflow, from IDE integration to MCP servers and CLI utilities.

๐Ÿ”—

References #

โ“

FAQ #

Do I need a separate CLAUDE.md for every project?

+
No, but it's strongly recommended. You have two levels: a global ~/.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.

How do I prevent Claude from touching certain files?

+
Add explicit rules to your CLAUDE.md, such as "Never modify files in the /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.

What's the difference between project commands and personal commands?

+
Project commands (.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.

Can I use Claude Code on Windows?

+
Yes, with one prerequisite: Git for Windows must be installed first. After that, Claude Code installs and runs normally on Windows 10/11 via the standard npm install -g command.

How does auto-memory work and can I clear it?

+
Claude Code automatically saves useful learnings about your project (build commands, debugging notes, environment details) to a memory store between sessions. You can view stored memories by asking Claude, or clear specific items by telling Claude to forget them. Memory files are stored locally on your machine.

Is Claude Code safe to use in a CI/CD pipeline?

+
Yes, Claude Code supports a --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.

Does Claude Code support multiple models?

+
Yes. Claude Code works with claude-opus-4-6, claude-sonnet-4-6, and claude-haiku-4-5. Enterprise users can also route through Amazon Bedrock or Google Cloud Vertex AI. You can specify a model in your settings or per-session with the --model flag.
โ†‘ Back to top