keepcalculator

06 Numbers and Powers

Claude Code for Engineers: First Week Workflow

Card No. 06·71483 · Updated · Standard formula, shown below

Claude Code is Anthropic’s command-line coding agent that can read, edit, and test code in your repository. In your first week, the practical workflow is: start with small, well-scoped tasks, use the built-in permission controls, and review every change before committing. This article gives you a day-by-day plan, common pitfalls, and how to fit Claude Code into your existing Git workflow.

What Claude Code Actually Does

Claude Code runs in your terminal, connects to Anthropic’s Claude models (Sonnet 4, Opus 4, etc.), and operates on your local files. It can:

  • Read and search your codebase (using grep, glob, and file reads)
  • Edit multiple files, create new ones, and delete files
  • Run commands (tests, linters, builds) and read their output
  • Use Git to show diffs, commit changes, and create branches
  • Use tools like Playwright for browser testing

You interact with it conversationally in the terminal. It’s not a background daemon; you run it per session, and it has a context window of about 200k tokens (roughly 150k words) per session. It remembers the conversation and file contents within that window.

Prerequisites and Setup

Before your first session, install Claude Code via npm (npm install -g @anthropic-ai/claude-code) and authenticate with your Anthropic account (requires a paid plan; the free tier is limited). You’ll need Node.js 18+ and a terminal that supports ANSI colors. For best results, work in a Git repository—Claude Code uses Git to show diffs and to revert changes if needed.

Set up a CLAUDE.md file in your project root. This is a plain-text file where you can put project-specific instructions: build commands, test commands, coding style, and any “don’t touch” files. Claude Code reads this file automatically at session start, which dramatically improves output quality. For example:

Build: npm run build
Test: npm test
Style: Use 2-space indent, single quotes, no semicolons
Never edit: /src/generated

Day 1–2: Small Tasks and Learning the Controls

Start with tiny, self-contained tasks to learn how Claude Code behaves. Good first tasks:

  • Fix a typo in a comment or string
  • Add a missing unit test for a simple function
  • Refactor a small function to be more readable
  • Update a README section

Use the interactive mode: type your request, then review the diff that Claude proposes. You can accept, reject, or ask for changes. Key commands:

  • /init – create a CLAUDE.md from your repo’s existing docs
  • /clear – reset the conversation context (do this often)
  • /status – show current git status and recent changes
  • Ctrl+C – interrupt Claude mid-task (it will stop and ask what to do)

Always enable the permission mode that asks before running commands (the default). You can approve or deny each command. For file edits, Claude shows a diff; you can edit the diff directly before accepting.

Day 3–4: Medium-Sized Features and Bug Fixes

Once you’re comfortable, move to real issues. A good workflow:

  1. Open a fresh session with claude in your repo.
  2. Describe the bug or feature in detail, referencing file paths if you know them. Example: “The login form doesn’t validate email format. Look at src/components/Login.js and add validation before submit.”
  3. Let Claude explore. It will read relevant files, run tests, and propose a plan. Ask it to explain the plan before making changes.
  4. Have it make the changes, then run the relevant tests.
  5. Review the diff carefully. Use git diff to see all changes at once.
  6. Commit only when you’re satisfied.

Common mistake: giving too broad a task like “fix all bugs in this module.” Claude will do a lot, but you’ll spend more time reviewing than if you’d done it yourself. Break work into chunks that produce a reviewable diff (under ~200 lines).

Day 5–7: Refining Your Workflow

By now you’ll notice patterns. Use these tips to speed up:

  • Create multiple CLAUDE.md files for different directories (Claude reads the closest one).
  • Use @file syntax to attach a file to your message: @src/utils.js fix the bug in the parse function.
  • Use --continue to start a new session with the previous conversation’s summary (useful for long tasks).
  • Set up a pre-commit hook that runs linters and tests, so Claude’s changes are automatically checked.
  • For repetitive tasks, write a prompt template in a markdown file and paste it.

Also, learn to use --model flag to switch between Claude models. Sonnet 4 is faster and cheaper for routine tasks; Opus 4 is better for complex reasoning. You can also use --permission-mode to auto-accept commands in a sandboxed environment (but be careful).

Common Pitfalls and How to Avoid Them

Even experienced engineers hit these:

  • Context loss: Claude forgets earlier parts of the conversation. Use /clear and re-summarize the task, or use @file to re-attach key files.
  • Over-editing: Claude sometimes reformats code or changes style. Add explicit instructions in CLAUDE.md: “Do not reformat code unless asked.”
  • Running destructive commands: Always check what commands Claude wants to run. It might run rm -rf if you ask it to “clean up”. Use permission mode to require approval for dangerous commands.
  • Ignoring tests: Claude may not run tests unless you ask. Always say “run the tests after making changes.”
  • Not reviewing diffs: Never accept changes blindly. Use git diff and read every line.

Costs and Limits

Claude Code is not free. You pay per token (input and output) based on the model you use. A typical session for a small task might cost a few cents; a large refactor could cost a few dollars. You can set a spending limit in the Anthropic console. The context window is 200k tokens; if your conversation exceeds that, Claude will summarize and truncate, which can lose important details. To avoid this, keep sessions short and focused.

Frequently Asked Questions

Can Claude Code work with my existing IDE? Yes, but not directly. It runs in the terminal, but you can use it alongside VS Code or JetBrains. Many engineers run Claude Code in a split terminal and use their IDE for manual editing and debugging. There are also community plugins that integrate Claude Code into IDEs, but they are not official.

Does Claude Code send my code to the cloud? Yes, your code is sent to Anthropic’s servers to process your requests. If you have sensitive code, check your company’s policy. Anthropic states that API data is not used for training by default, but you should verify with your admin. There is no fully local version.

How is Claude Code different from GitHub Copilot? Copilot is an autocomplete that suggests code inline. Claude Code is an agent that can perform multi-step tasks, run commands, and edit multiple files. It’s more like a junior developer than a smart autocomplete. You can also use both—Copilot for quick completions, Claude Code for larger tasks.

What if Claude Code makes a mistake that breaks my code? Because you’re in Git, you can always revert. Before starting a task, commit your current state. If Claude’s changes break something, use git checkout -- . to revert. Also, use branches: create a new branch for each Claude task, so you can merge or discard easily.

Can I use Claude Code for code review? Yes, you can ask it to review a pull request. It will read the diff and comment on potential issues. However, it’s not a substitute for human review—it may miss context or suggest changes that don’t fit your architecture. Use it as a second pair of eyes.

Is Claude Code safe for production code? It depends on how you use it. With careful review, it can be safe. Always run tests, review diffs, and never give it access to production databases or secrets. Use environment variables for secrets, and never ask Claude to print them.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →