Claude Code Quick Reference¶
Quick lookup for common commands and workflows.
Comprehensive Guide
For detailed explanations, see Working with Claude Code
Logsift Commands¶
Run with Explicit Command¶
- First argument: Exact command in quotes
- Second argument: Timeout in minutes (optional, default: 10)
Run with Natural Language¶
- Describe what you want to run
- Claude figures out the exact command
Built-in Commands¶
/cost # View token usage this session
/clear # Clear context between work sessions
/model # View/change active model
/help # View available commands
Commit Agent¶
# Invoke with natural language
"Let's commit this work"
"Create a commit for these changes"
"Commit the staged files"
# Agent workflow:
# 1. Analyzes staged changes
# 2. Groups into atomic commits
# 3. Generates conventional commit messages
# 4. Runs pre-commit (background → logsift)
# 5. Fixes errors iteratively
# 6. Reports summary
# Benefits:
# - Saves ~5000-6000 tokens per commit
# - Isolates commit workflow from main context
# - Handles pre-commit automation
# - Splits multi-concern changes intelligently
Common Workflows¶
Run and Fix Script¶
# 1. Run with logsift
/logsift "bash script.sh" 15
# 2. Claude analyzes errors and fixes them
# 3. Claude re-runs automatically
# 4. Iterate until all errors resolved
Check Token Usage¶
Error Fixing Phases¶
- Initial Analysis: Read all errors, identify patterns
- Root Cause Investigation: Related errors? Independent errors?
- Solution Strategy: Fix root cause or fix independently
- Iterative Fix-and-Rerun: Verify fixes, continue until resolved
- Verification: Confirm robustness
Quick Decisions¶
Use /logsift when:
- You know the exact command
- Fast execution, no ambiguity
Use /logsift-auto when:
- Describing what to run
- Don't know exact paths/flags
Fix as root cause when:
- Same file/module/dependency
- Error messages indicate same issue
Fix independently when:
- Different scripts/components
- Unrelated error types
Key Principles¶
✅ Do:
- Read files before editing
- Determine error relationships
- Fix root causes when they exist
- Fix independently when appropriate
- Use context for quality fixes
❌ Don't:
- Background logsift processes
- Suppress errors without understanding
- Guess and check without reading files
- Force false root cause connections
- Stop after first error resolved
Troubleshooting¶
# Logsift not found
cargo install logsift
# Need more details from logsift
cat ~/.local/share/logsift/logs/latest-session.json
Related Docs¶
- Working with Claude Code - Complete guide
- Usage Guide - Pre-logsift monitoring
- Hooks Reference - All hooks