Claude Code: Output Styles
Last updated: 2026-08-31
Output styles control how Claude Code "speaks" — from concise to verbose, plain text to JSON, choosing the right style makes information more digestible.
💡 Tip: Output styles don't affect Claude Code's capabilities, only how it presents results. Use default for daily dev, JSON for automation scripts.
📋 Prerequisites: Chapter 16 - Agent Skills and skill-creator
1. What You'll Learn
- Built-in output styles
- Custom output formats
- Style selection per scenario
- JSON output for script integration
- Output style configuration
2. Built-in Output Styles
(1) Style List
| Style | Description | Use Case |
|---|---|---|
| default | Balanced information | Daily development |
| concise | Most compact output | Quick queries |
| verbose | Detailed explanations | Learning/debugging |
| code | Code-centric | Pure code generation |
| plan | Plan before execute | Complex tasks |
(2) Style Switching
BASH
# Command line
claude --style concise
claude --style verbose
# In-session
> /style concise
> /style verbose
# In CLAUDE.md
## Output Preferences
- Use concise style
- Show diff for code modifications
▶ Example 1: Style Output Comparison
TEXT
📖 Display only
# Default: balanced information about changes and results
# Concise: just ✅ Added resetPassword() to user.service.ts, 4 tests, 2 files changed
# Verbose: full step-by-step analysis, implementation details, test descriptions
3. Custom Output Formats
(1) Define in CLAUDE.md
MARKDOWN
## Output Preferences
- Only show diff for code changes, not full file
- Use English for code, native language for descriptions
- Auto-run tests after file modification
- Show failure reason and fix plan when tests fail
- No need to explain each step (unless asked)
(2) Task-Level Format Control
TEXT
📖 Display only
> List all TODO comments, output in JSON format
> Compare Express vs Fastify performance, show as table
> Generate API documentation, Markdown format
> Refactor this function, only output modified code
▶ Example 2: Formatted Output
TEXT
📖 Display only
> List test coverage for all services under src/services/, show as table
Claude Code:
| Service | Coverage | Missing |
|:--------|:---------|:--------|
| user.service.ts | 92% | delete method |
| auth.service.ts | 85% | refresh token |
| payment.service.ts | 0% | **no tests** |
Average: 64% | Below 80%: 3 services
4. JSON Output for Scripts
(1) Command Line JSON Output
BASH
claude -p "List all TypeScript errors" --output json
# Output structure
{
"task": "list TypeScript errors",
"result": { "errors": [...], "total": 1 },
"usage": { "tokens": 15420, "cost_usd": 0.31 }
}
▶ Example 3: Automated Code Review Script
BASH
#!/bin/bash
# auto-review.sh - Auto-review git changes
CHANGED_FILES=$(git diff --name-only HEAD~1)
for file in $CHANGED_FILES; do
RESULT=$(claude -p "Review $file code quality, focus on security" --output json)
ISSUES=$(echo "$RESULT" | jq '.result.issues | length')
if [ "$ISSUES" -gt 0 ]; then
echo "⚠️ Found $ISSUES issues in $file"
else
echo "✅ $file looks good"
fi
done
5. Output Style Configuration
(1) Global Default Style
JSON
// ~/.claude/settings.json
{
"output": {
"defaultStyle": "concise",
"showDiff": true,
"language": "en",
"autoTest": true
}
}
(2) Dynamic Switching
TEXT
📖 Display only
> From now on use verbose style
> /style concise # Switch back
> This task use JSON output # Single-task specification
6. Comprehensive Example: Multi-Scenario Style Strategy
TEXT
📖 Display only
# Daily development (default)
claude
> Refactor UserService
# Quick fix (concise)
claude --style concise
> Fix this typo
# Learning new project (verbose)
claude --style verbose
> Explain this project's architecture
# Automation scripts (JSON)
claude -p "Code review" --output json | jq '.result'
❓ FAQ
Q Do different styles consume different Tokens?
A Yes. verbose consumes most, concise least. Difference can be 2-3x. Daily use: default or concise.
Q Is JSON output format stable?
A Mostly stable but may change with versions. Add error handling in scripts.
Q Can I customize Markdown templates?
A You can describe output format requirements in CLAUDE.md; Claude Code will try to follow. No strict template system.
Q How to make output more concise?
A Use concise style + precise instructions + CLAUDE.md saying "no need to explain steps".
📖 Summary
- Five built-in styles: default, concise, verbose, code, plan
- Daily: default; Quick: concise; Learning: verbose
- JSON output suits script integration and automation
- CLAUDE.md can define project-level output preferences
- Style only affects presentation, not code quality
📝 Exercises
- Basic (⭐): Complete the same task in three different styles, compare output differences.
- Intermediate (⭐⭐): Write a simple code review script using JSON output format.
- Advanced (⭐⭐⭐): Design team output style standards in CLAUDE.md for consistent experience.