Launch in Your Repo
# Navigate to your project
cd /your/project
# Launch Claude Code
claude
# Or open in a specific directory
claude --add-dir ./src
First Session Tip: Ask Claude to orient itself first: “Read the README and key source files, then summarize the architecture so we can plan new features.” This primes Claude with codebase context before you start building.
Feature Development Workflow
-
Describe the feature — Give context: what it does, which files are likely involved, and any constraints (framework, style, etc.)
-
Let Claude plan first — Say “plan this before implementing” — Claude will outline the approach and you can course-correct early.
-
Review diffs in your IDE — Changes appear as visual diffs in VS Code / Cursor / Windsurf. Accept or reject per file.
-
Iterate in the same session — Stay in one session for a feature — Claude remembers all prior context and changes made.
-
Commit with Claude — Say “commit this with a good message” — Claude writes the commit and runs git for you.
Slash Commands
| Command | Description |
|---|---|
/clear | Reset conversation context (new feature = new session) |
/compact | Summarize history to free up context window |
/model | Switch between Sonnet 4.6 and Opus 4.6 |
/resume | Resume a previous session by name or title |
/review | Ask Claude to review current changes |
/permissions | Manage what Claude can auto-approve |
/doctor | Diagnose config and permission issues |
/bug | Report a bug directly to Anthropic |
/config | Edit settings, release channel, model defaults |
/memory | View/manage what Claude remembers across sessions |
Keyboard Shortcuts
- Alt+P — Switch model mid-prompt
- Ctrl+S — Stash/restore current prompt
- Ctrl+C — Cancel current task
- Ctrl+C ×2 — Kill all background agents
- Tab — Tab autocomplete (bash mode)
- Ctrl+B — Background current task
- Alt+Del — Delete word (bash mode)
- Alt+→ — Navigate word (bash mode)
Power Prompts for Feature Dev
-
Explore the codebase and explain how [feature area] works before we add anything -
Add [feature] to [file/component]. Follow the existing patterns and coding style -
Plan the implementation of [feature] step by step, don’t write any code yet -
Write tests for the changes you just made -
Find all the places this change could break something and fix them -
Refactor [file] to be cleaner without changing behavior, then explain what you changed -
Create a new branch, implement [feature], and open a PR with a clear description -
Check the open GitHub issues and fix any related to [area]
CLAUDE.md — Your Persistent Context File
A CLAUDE.md file in your project root is read by Claude at the start of every session. It’s your standing instructions — coding standards, architecture notes, constraints, and preferences that Claude should always know.
# CLAUDE.md example
## Stack
React 18 + TypeScript, Vite, Tailwind CSS
Backend: Node.js + Express, Supabase
## Code Rules
- Use functional components, no class components
- All new components go in src/components/[feature]/
- Always add JSDoc to exported functions
- Run npm run lint before committing
## Architecture
Multi-agent platform using Agno framework.
Agents communicate via WebSocket (see src/agents/).
Pro Tip: Ask Claude to generate your CLAUDE.md: “Read the codebase and write a CLAUDE.md with our stack, folder structure, and coding conventions.”
Best Practices
-
One feature per session — Use /clear between unrelated features. Context pollution causes Claude to make inconsistent decisions.
-
Plan before you build — Always say “plan first” for anything non-trivial. Catch architectural issues before they’re in code.
-
Reference specific files — Use @filename to pin Claude’s attention. “Look at @src/agents/frontend.ts and add X” beats vague descriptions.
-
Ask for tests — Append “and write tests for this” to any feature request. Claude knows what edge cases to cover.
-
Use Opus for complex work — Switch to Opus 4.6 via /model for multi-file refactors or architectural decisions. Sonnet for quick edits.
-
Set permissions upfront — Run /permissions to pre-approve safe ops (file edits, npm install). Reduces friction during long sessions.
-
Use /compact aggressively — For long sessions, run /compact before adding a new subtask. Keeps context fresh and responses accurate.
-
Iterate, don’t overspecify — Give Claude a direction and refine. Overspecified prompts often produce worse results than conversational iteration.
Useful CLI Flags
# Run a one-off task non-interactively (great for scripts)
claude -p "Fix all TypeScript errors in src/"
# Add extra directories to context
claude --add-dir ../shared-lib
# Force reinstall / bypass lock issues
claude install --force
# Update to latest
claude update
# List configured agents
claude agents