What follows is my primer on Claude Code Developent.
Plan Mode is useful for exploring your system architecture and implementation philosophy.
To enter plan mode manually, just press Shift+Tab twice.
Here's what Claude itself says about plan mode:
⏺ Plan mode is a special mode in Claude Code where I explore your codebase and design an implementation approach before writing any code.
How it works:
- Entry: For non-trivial implementation tasks (like adding new features, refactoring, or architectural changes), I can enter plan mode to design an approach first
- In plan mode: I thoroughly explore your codebase using search and read tools, understand existing patterns, and create a detailed implementation plan
- Approval: I present the plan to you for review and approval before making any actual changes
- Exit: Once you approve, I exit plan mode and execute the plan
Why it's useful:
- Prevents wasted effort by getting alignment upfront
- Lets you review the approach before code is written
- Ensures I understand your codebase architecture first
- Gives you control over significant changes
When I use it:
- New features with multiple implementation options
- Multi-file refactoring
- Architectural decisions
- When requirements need clarification
After you finish working with an specific task, it is recommended you clean the Context Window.
To clean the context Window, just type the command /clear.
If you are worried about having to keep explaining things that were explained before, don't fret, there are ways to avoid this.
Sometimes you are still working with a task but the context window is becoming too big.
In these cases you can use the command /compact to summarize and compact the current conversation.
It is also useful if you want to clear the conversation with /clear but want to give Claude some of the previous context by
pasting the relevant information from the previous conversation.
When you run Claude Code from the terminal, the folder you are inside becomes your project's root folder. Claude will check the contents of the folder and try to understand what the project is about and how it is organized.
However, it's very useful that you tell Claude the most relevant and universally useful information about your project.
This is achieved by creating a CLAUDE.md file in your project's root folder. Try to think about information that is universally applicable across your project. Keep your CLAUDE.md as concise as possible, around 60 lines is usually the recommended size.
If you need to exceed 60 lines, then use instructions as a metric and stay at around 50 instructions (and less than 300 lines total).
For more information, this article from HumanLayer is very interesting and has a few more tips.
An specific section of the article about Progresive Disclosure is included here as it is very helpful:
Instead of including all your different instructions about building your project, running tests, code conventions, or other important context in your CLAUDE.md file, we recommend keeping task-specific instructions in separate markdown files with self-descriptive names somewhere in your project.
For example:
agent_docs/ |- building_the_project.md |- running_tests.md |- code_conventions.md |- service_architecture.md |- database_schema.md |- service_communication_patterns.md
One of the most useful features of Claude is Agent Skills.
You create skills inside SKILL.md files. An example could
be an skill called code-reviewer.
The first step would be to create a code-reviewer folder:
mkdir -p ~/.claude/skills/code-reviewerTip: Skills located on ~/.claude are global and can be used on any project.
You can create skills specific to your project by putting them inside
a .claude folder located in your project's root.
Now create the SKILL.md file inside the folder:
---
name: code-reviewer
description: Reviews code for bugs and style issues. Use when reviewing pull requests or checking code quality.
allowed-tools: Read, Grep, Glob
---
When reviewing code:
1. Check for security vulnerabilities
2. Look for performance issues
3. Verify code style consistency
4. Suggest improvementsTo verify if your skill is available, run Claude Code and give it the following prompt:
What Skills are available?
If your new skill is avaible it should be in the list provided by Claude.
For more information about Skills, please visit: https://code.claude.com/docs/en/skills