| name | claude-devtools-inspector |
| description | Inspect Claude Code session logs, tool calls, token usage, subagents, and context window using claude-devtools visual UI |
| triggers | ["inspect claude code session logs","analyze claude token usage and context window","debug claude tool calls and subagents","view claude code session history","check what claude did in this session","examine claude context compaction","review claude memory and thinking steps","troubleshoot claude code behavior"] |
claude-devtools Inspector
Skill by ara.so — Devtools Skills collection.
claude-devtools is the missing DevTools for Claude Code. It reads session logs from ~/.claude/ and reconstructs everything Claude Code hides: tool calls, token usage, subagent trees, thinking steps, context window breakdown, and memory layers. Works with all existing sessions — no wrapper, no API keys, no configuration.
What claude-devtools Does
- Session inspection: View full transcripts of any Claude Code session with syntax-highlighted messages
- Tool call visibility: See exact inputs/outputs for Read, Edit, Bash, Search, and all other tools
- Token attribution: Per-turn breakdown across 7 categories (CLAUDE.md, skills, @-mentions, tool I/O, thinking, team overhead, user text)
- Context compaction: Visualize when context hits limits and what gets compressed/dropped
- Subagent trees: Isolated execution traces for nested agents with cost/duration metrics
- Memory viewer: Browse project memory layers stored in
~/.claude/projects/<project>/memory/
- Thinking steps: Full extended thinking content that's invisible in the terminal
- Copy/paste: Export sessions to Markdown/JSON, one-click copy on code blocks
Installation
Desktop App (macOS)
brew install --cask claude-devtools
open https://github.com/matt1398/claude-devtools/releases/latest
Docker / Standalone Server
docker compose up
docker build -t claude-devtools .
docker run -p 3456:3456 -v ~/.claude:/data/.claude:ro claude-devtools
Build from Source
git clone https://github.com/matt1398/claude-devtools.git
cd claude-devtools
pnpm install
pnpm dev
pnpm build
Key Configuration
claude-devtools reads from ~/.claude/ by default. No config files needed.
Environment Variables (Docker/Standalone)
CLAUDE_ROOT=~/.claude
HOST=0.0.0.0
PORT=3456
Custom Claude Directory
If your Claude data is in a non-standard location:
docker run -p 3456:3456 -v /custom/path:/data/.claude:ro claude-devtools
Session Log Format
Claude Code writes JSONL logs to ~/.claude/sessions/<session-id>.jsonl. Each line is a JSON object:
interface SessionLogEntry {
type: 'user' | 'assistant' | 'tool_use' | 'tool_result' | 'thinking' | 'team_message';
timestamp: string;
content?: string;
tool_name?: string;
tool_input?: Record<string, unknown>;
tool_output?: string;
tokens?: {
input: number;
output: number;
cache_read?: number;
cache_creation?: number;
};
context?: {
used: number;
limit: number;
segments: { type: string; tokens: number }[];
};
}
Common Use Cases
Inspect a Running Session
claude code --session my-task
Find High Token Usage
cat ~/.claude/sessions/<session-id>.jsonl \
| jq 'select(.tokens.input > 10000) | {timestamp, tokens}'
Export Session Transcript
Debug Context Compaction
When Claude "forgets" earlier context:
- Open session in claude-devtools
- Navigate to Context tab
- Look for red/orange segments in token visualization
- Hover over compacted segments to see what was dropped
- Click "Show Compaction Events" to see exact turn numbers
Review Tool Calls
Check Subagent Activity
View Project Memory
SSH Remote Sessions
Inspect sessions on remote machines:
Host prod-server
HostName 192.168.1.100
User deploy
IdentityFile ~/.ssh/id_rsa
Notification Setup
Trigger alerts on specific events:
{
".env access": {
pattern: "\\.env",
field: "tool_input.path"
},
"High token usage": {
threshold: 50000,
field: "tokens.input"
},
"Tool error": {
field: "tool_output",
contains: "error|failed|exception"
}
}
{
"API key exposure": {
pattern: "(sk-[A-Za-z0-9]{32}|ghp_[A-Za-z0-9]{36})",
field: "content"
}
}
Troubleshooting
Session Not Appearing
ls -la ~/.claude/sessions/
chmod 755 ~/.claude
chmod 644 ~/.claude/sessions/*.jsonl
Docker Volume Mount Issues
chmod -R 755 ~/.claude
volumes:
- /home/user/.claude:/data/.claude:ro
docker exec <container-id> ls -la /data/.claude/sessions
Incomplete Session Data
claude --version
jq empty ~/.claude/sessions/<session-id>.jsonl
High Memory Usage (Large Sessions)
docker run -m 4g -p 3456:3456 claude-devtools
macOS Gatekeeper Block
xattr -d com.apple.quarantine /Applications/claude-devtools.app
API Reference (Standalone Mode)
When running as a server (Docker/Node), claude-devtools exposes:
GET /api/sessions
GET /api/sessions/:id
GET /api/sessions/:id/export?format=markdown|json|txt
GET /health
Integration with Claude Code
claude code --session my-feature
Performance Tips
find ~/.claude/sessions -mtime +30 -delete
Security Notes
- claude-devtools is read-only — never modifies session logs
- Standalone server has zero outbound network calls
- For maximum isolation:
docker run --network none -p 3456:3456 -v ~/.claude:/data/.claude:ro claude-devtools
- See
SECURITY.md in repo for full threat model
Development Commands
pnpm test
pnpm typecheck
pnpm lint
pnpm check
pnpm build
Resources