How to Set Up Claude Code in 2026.

10 min read
By Houston IT Developers
Claude Code configuration files open in a dark-themed code editor

When Anthropic launched Claude Code, our team started using it on custom web development projects immediately. At first, it felt like talking to a brilliant intern who knew nothing about our codebase. Claude would suggest npm install when we use Bun. It'd write class components when our entire codebase uses hooks. It kept trying to push directly to main.

Then we discovered that Claude Code has an entire configuration system most developers never touch. After a month of experimenting across real client projects, here's what actually moved the needle — and what you can skip.

Why Most Developers Get Mediocre Results From Claude Code

Out of the box, Claude Code doesn't know your coding conventions, your build commands, your team's Git workflow, or the gotchas lurking in your codebase. Without configuration, it has to guess — and guessing leads to code that doesn't match your style guide, suggestions that break your build, and the same mistakes repeated across sessions.

The good news? There's a fix, and it takes about 10 minutes. Here's a quick video walkthrough of Claude Code in action before we dive into the configuration:

CLAUDE.md — The One File That Changes Everything

If you read nothing else in this post, read this section.

Create a file called CLAUDE.md in your project root. Claude reads it at the start of every conversation and treats it like permanent context. Think of it as a README written specifically for your AI assistant.

Here's the catch most guides get wrong: they tell you to document everything. Don't. A 500-line CLAUDE.md is worse than no CLAUDE.md at all. Claude starts losing focus when there's too much noise.

Here's what actually belongs in there:

# Build & Run
- `bun dev` — dev server on :3000
- `bun test` — Vitest
- `bun run build` — production build (run before committing)

# Rules That Matter
- TypeScript strict mode. No `any` types. Ever.
- We use Drizzle ORM, not Prisma. Don't suggest Prisma.
- Import paths use @/ alias (mapped to src/)
- IMPORTANT: Never push to main. Always create a feature branch.

# Architecture (the non-obvious stuff)
- API routes validate input with Zod schemas in src/lib/validators/
- All database queries go through src/db/
- The Stripe webhook at /api/webhooks/stripe needs raw body

Notice what's NOT in there: no explanation of what React is, no "write clean code" platitudes, no file-by-file codebase breakdown. Only things that prevent mistakes.

The golden rule: For every line, ask — "Would Claude screw something up without knowing this?" If no, delete it.

The Hierarchy Nobody Talks About

CLAUDE.md files stack. You can have multiple at different levels:

LocationWhat It DoesShare With Team?
~/.claude/CLAUDE.mdYour rules for ALL projectsNo (personal)
./CLAUDE.mdProject rulesYes (commit to Git)
./CLAUDE.local.mdYour personal project overridesNo (auto-gitignored)
./src/frontend/CLAUDE.mdOnly activates in that directoryYes (commit to Git)

This means your team shares CLAUDE.md in Git, but each developer keeps a CLAUDE.local.md with personal preferences. The backend dev who wants verbose types and the frontend dev who prefers concise JSX can both be happy.

You can also import other files to stay organized:

See @README.md for project overview
See @docs/api-reference.md for API docs
See @docs/git-workflow.md for branch strategy

The .claude/ Directory: Your Configuration Hub

Inside .claude/ lives everything else. Here's the structure worth building:

.claude/
├── settings.json          # Team permissions (what Claude can/can't do)
├── settings.local.json    # Your personal overrides (gitignored)
├── rules/                 # Path-specific instructions
│   ├── api-routes.md
│   └── react-components.md
├── skills/                # Custom slash commands
│   ├── fix-issue/SKILL.md
│   └── deploy/SKILL.md
└── hooks/                 # Automated guardrails
    └── protect-files.sh

Let's walk through the parts that matter.

Claude Code Settings: Permissions That Prevent Mistakes

.claude/settings.json is your permission system. The most valuable part isn't what you allow — it's what you deny.

{
  "permissions": {
    "allow": [
      "Bash(bun run *)",
      "Bash(git commit *)",
      "Bash(git push origin feature/*)"
    ],
    "deny": [
      "Bash(rm -rf *)",
      "Bash(git push * main)",
      "Bash(git push --force *)",
      "Read(./.env*)"
    ]
  }
}

That config alone has saved us from at least three accidental force-pushes. Claude gets enthusiastic about deploying things — guardrails keep that enthusiasm productive.

Claude Code Rules: Context That Loads Automatically

For larger codebases, .claude/rules/ lets you write instructions that only activate when Claude works with matching files:

# .claude/rules/api-routes.md
---
paths:
  - "src/app/api/**/*.ts"
---

Every API route MUST:
1. Validate input with a Zod schema
2. Wrap the handler in try/catch
3. Return format: { error: string, status: number }
4. Never expose stack traces to clients

Your React component rules won't clutter the context when Claude is working on API routes, and vice versa.

Skills: The Feature That Made Our Team 3x Faster

Claude Code skills are custom slash commands, and they're the single most underrated feature. Instead of explaining your workflow every time, you encode it once.

# .claude/skills/fix-issue/SKILL.md
---
name: fix-issue
description: Fix a GitHub issue end-to-end
user-invocable: true
---

Fix GitHub issue #$ARGUMENTS:

1. Read the issue with `gh issue view $ARGUMENTS`
2. Find the relevant code
3. Implement the fix
4. Write a test that would have caught the bug
5. Run `bun test` to verify
6. Commit: "fix: [description] (closes #$ARGUMENTS)"
7. Push and create a PR with `gh pr create`

Now any developer types /fix-issue 247 and Claude handles the whole workflow — consistently, every time.

The killer feature is dynamic content injection. Skills can run shell commands that execute before Claude processes them:

---
name: standup
description: Generate standup summary
---

## What happened since yesterday
!`git log --since="yesterday" --oneline --author="$(git config user.name)"`

## Open PRs
!`gh pr list --author=@me`

Summarize my progress for standup.

Every morning, /standup gives you a ready-to-paste update based on your actual Git activity.

Claude Code Hooks: Guardrails That Can't Be Ignored

CLAUDE.md instructions are advisory. Hooks are deterministic — they always execute, and they can block actions entirely.

Auto-format after every edit (eliminates "can you format that?" back-and-forth):

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "npx prettier --write $(jq -r '.tool_input.file_path')"
          }
        ]
      }
    ]
  }
}

Protect sensitive files from accidental edits:

#!/bin/bash
# .claude/hooks/protect-files.sh
FILE=$(cat | jq -r '.tool_input.file_path')

if [[ "$FILE" == *".env"* ]] || [[ "$FILE" == *"secrets"* ]]; then
  echo "Blocked: $FILE is protected" >&2
  exit 2  # Exit code 2 = block the action
fi

The three hook events worth knowing:

EventWhen It FiresBest Use
PostToolUseAfter an edit succeedsAuto-format, run linter
PreToolUseBefore a tool runsBlock dangerous commands
StopClaude finishes respondingVerify tests still pass

Claude Code Memory: It Gets Smarter Over Time

Claude Code has an auto-memory system at ~/.claude/projects/<your-project>/memory/. The first 200 lines of MEMORY.md load into every session automatically.

You don't manage this — Claude does it. But you can steer it:

  • "Remember that we switched from PostgreSQL to PlanetScale" — Claude saves it
  • "Forget the old API endpoint pattern" — Claude removes it
  • /memory — View and edit what Claude has stored

After a few weeks, Claude knows your project's quirks almost as well as you do. The debugging solution it found on Tuesday is still there on Friday.

Claude Code MCP Servers: Connect to External Tools

MCP (Model Context Protocol) connects Claude to external tools. Create .mcp.json in your project root:

{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    },
    "sentry": {
      "type": "http",
      "url": "https://mcp.sentry.dev/mcp"
    }
  }
}

With GitHub MCP, Claude reads issues, reviews PRs, and checks CI status without you copy-pasting links. With Sentry, it looks up error traces and fixes bugs with full stack context.

Team of developers collaborating at a desk with laptops and monitors in a modern office workspace
Team of developers collaborating at a desk with laptops and monitors in a modern office workspace

The Setup Impact Chart: Where to Spend Your Time

Not all configuration is created equal. Here's what we found after tracking setup time versus actual impact across six months of AI-powered development projects:

ConfigurationSetup TimeImpact on Output QualityPriority
CLAUDE.md10 minMassive — eliminates 80% of convention errorsDo today
settings.json (deny rules)5 minHigh — prevents destructive mistakesDo today
2-3 Custom Skills20 minHigh — saves 30+ min/day on repeated workflowsThis week
Path-specific Rules15 minMedium — better for large/monorepo codebasesThis week
PostToolUse Hook (formatter)5 minMedium — eliminates formatting back-and-forthThis week
MCP Servers10 minMedium — depends on your tool stackWhen needed
Memory tuningOngoingLow effort — Claude learns on its ownPassive
PreToolUse Hooks15 minSituational — only if you have sensitive filesWhen needed
Custom Agents30 minNiche — useful for specialized review workflowsAdvanced

The first three rows take 35 minutes combined and deliver 90% of the value. Start there.

The 5-Minute Quick Start

If you want to set up the essentials right now:

# 1. Generate a baseline CLAUDE.md
claude /init

# 2. Create the directory structure
mkdir -p .claude/{rules,skills/fix-issue,hooks}

# 3. Add basic permissions
cat > .claude/settings.json << 'EOF'
{
  "permissions": {
    "allow": ["Bash(npm run *)"],
    "deny": ["Bash(rm -rf *)", "Bash(git push --force *)", "Read(./.env*)"]
  }
}
EOF

# 4. Create your first skill
cat > .claude/skills/fix-issue/SKILL.md << 'EOF'
---
name: fix-issue
description: Fix a GitHub issue
user-invocable: true
---
Fix issue #$ARGUMENTS. Read it, implement the fix, write tests, create a PR.
EOF

# 5. Commit and share with your team
git add CLAUDE.md .claude/
git commit -m "feat: add Claude Code project configuration"

That's it. You're already ahead of 90% of developers using Claude Code.

Claude Code Configuration Compounds Over Time

Here's what nobody tells you: setting up Claude Code isn't a one-time task. It's a living system that gets smarter.

Your CLAUDE.md evolves as your project grows. Your skills library expands as you spot repetitive workflows. Claude's memory fills in the gaps you didn't think to document. Your rules get more precise as you discover edge cases.

A month from now, Claude won't just know your build commands — it'll know that your CI fails when you forget to update the OpenAPI spec, that the billing module has a quirky state machine, and that you prefer descriptive variable names over comments.

The teams that invest in configuration now will have an AI teammate that genuinely understands their codebase by next quarter. The ones that don't will still be explaining their folder structure every Monday morning.

Start with CLAUDE.md. The rest follows naturally.


Houston IT Developers builds custom software, web applications, and AI-powered solutions for businesses across Houston. Want help integrating AI tools into your development workflow? Schedule a free consultation — we've been doing this since 2005.

Houston IT Developers

Houston IT Developers

Houston IT Developers is a leading software development and digital marketing agency based in Houston, Texas. We specialize in web development, mobile apps, and digital solutions.

View all posts →

Need Help With Your Project?

Our team of experts is ready to help you build your next web or mobile application. Get a free consultation today.

Get in Touch

Related Posts