Claude Code¶
Anthropic's AI coding assistant with deep reasoning capabilities and a focus on safety.
Overview¶
Claude Code is a powerful AI coding assistant from Anthropic. It excels at:
- Complex multi-step reasoning
- Thorough code analysis and review
- Safe and responsible AI assistance
- Understanding context deeply
Installation¶
Install Claude Code from Anthropic:
Basic Usage¶
# Use Claude with clinvk
clinvk --backend claude "fix the bug in auth.go"
clinvk -b claude "explain this codebase"
Models¶
| Model | Description |
|---|---|
claude-opus-4-5-20251101 |
Most capable, best for complex tasks |
claude-sonnet-4-20250514 |
Balanced performance and speed |
Specify a model:
Configuration¶
Configure Claude in ~/.clinvk/config.yaml:
backends:
claude:
# Default model
model: claude-opus-4-5-20251101
# Tool access (all, or comma-separated list)
allowed_tools: all
# Override unified approval mode
approval_mode: default
# Override unified sandbox mode
sandbox_mode: default
# Enable/disable this backend
enabled: true
# Custom system prompt
system_prompt: ""
# Extra CLI flags
extra_flags: []
Environment Variable¶
Approval Modes¶
Claude supports different approval behaviors:
| Mode | Description |
|---|---|
default |
Let Claude decide based on action risk |
auto |
Reduce prompts / auto-approve edits (backend-specific) |
none |
Never ask for approval prompts (dangerous) |
always |
Always ask for approval (when supported) |
Set via config:
Or per-command (in tasks/chains):
Sandbox Modes¶
Control Claude's file system access:
Note
sandbox_mode is a unified setting. For the claude backend, clinvk does not currently map sandbox_mode to a Claude CLI flag, so it may have no effect.
| Mode | Description |
|---|---|
default |
Let Claude decide |
read-only |
Can only read files |
workspace |
Can modify files in project |
full |
Full file system access |
Allowed Tools¶
Control which tools Claude can use:
backends:
claude:
# All tools
allowed_tools: all
# Specific tools only
allowed_tools: read,write,edit
Session Resume¶
Claude Code stores sessions and supports resuming:
Internally uses Claude's --resume flag.
Extra Flags¶
Pass additional flags to the Claude CLI:
Common flags:
| Flag | Description |
|---|---|
--add-dir <path> |
Add additional directory to context |
--print |
Print final response in non-interactive mode |
Best Practices¶
Use Opus for Complex Tasks
Claude Opus is ideal for multi-step reasoning, code architecture, and thorough reviews.
Leverage Session Continuity
Claude excels at maintaining context across a conversation. Use clinvk -c to continue sessions.
Trust the Defaults
Claude's default approval and sandbox modes are well-tuned for safety while being useful.
Use Cases¶
Code Review¶
Complex Refactoring¶
Architecture Analysis¶
Bug Investigation¶
Troubleshooting¶
Backend Not Available¶
# Check if Claude is installed
which claude
# Check clinvk detection
clinvk config show | grep claude
Rate Limits¶
If hitting rate limits, consider:
- Using a different model
- Spacing out requests
- Running in sequential mode for comparisons