Starting a Session
Open your terminal, navigate to your project directory, and run:
claude
You'll see an interactive prompt like this:
╔══════════════════════════════════╗ ║ Claude Code · claude-sonnet ║ ╚══════════════════════════════════╝ > _
Claude Code is ready to receive instructions in natural language. You can write to it as if it were a coworker.
Your First Task
Try something simple to get started. Type:
> ¿Qué archivos hay en este directorio?
Claude Code will run ls or find and show you the result. You'll notice that before running any tool, it asks for confirmation or shows you what it's about to do.
Understanding the Workflow
Claude Code operates in cycles of:
- Think — analyzes your request and plans the steps.
- Act — uses tools (read files, run commands, edit code).
- Show — presents the results and changes made.
- Wait — returns to waiting for your next instruction.
Operating Modes
Normal mode (default)
Claude Code asks for confirmation before editing files or running important commands. Ideal for getting started and maintaining control.
Auto mode
Claude completes tasks autonomously without asking for confirmation at each step. Useful when you trust the task and want speed:
claude --dangerously-skip-permissions
Plan mode
Type /plan before your request so Claude shows you the plan before executing anything. Ideal for complex tasks:
> /plan refactoriza el módulo de autenticación para usar JWT
Examples of First Tasks
Understanding an Existing Project
> Explícame la estructura de este proyecto y qué hace cada carpeta
> ¿Qué hace la función processPayment en src/payments.ts?
Creating a New File
> Crea un componente React llamado Button con variantes primary y secondary en TypeScript
Fixing an Error
> Tengo este error en la consola: [pegar el error] — ayúdame a resolverlo
Running Tests
> Ejecuta los tests y si hay fallos, corrígelos
Exiting Claude Code
You can exit with Ctrl + C, Ctrl + D, or by typing:
> /exit
Starting with a Direct Prompt
If you know exactly what you want, you can pass it directly to the command without entering interactive mode:
claude "explica el archivo package.json" claude "añade tipos TypeScript al archivo utils.js"
"Print" mode (direct output)
To use Claude Code in scripts or pipelines:
claude -p "resume los cambios en este diff" < cambios.diff
The -p flag makes Claude respond once and exit, ideal for automation.