Skip to main content

Configuration & Diagnostics

AI-assisted

Claude Code configuration and diagnostics: /statusline custom status bar, settings.json autocomplete, /stats usage analytics, /doctor health check, community tools

/statusline: Custom Status Bar

Use /statusline to customize the information displayed in the bottom status bar using natural language descriptions. Alternatively, you can manually create a ~/.claude/statusline.sh script.

Information you can display includes: current model, git branch, uncommitted file count, context usage progress, session cost, and more. When you have multiple Claude windows open for different tasks, the status bar helps you quickly identify what each window is doing.

Claude Code ccstatusline custom status bar configuration interface
ccstatusline interactive status bar configuration

settings.json Autocomplete

Add $schema at the beginning of your settings.json, and VS Code / Cursor will provide autocomplete and validation for configuration options:

{
  "$schema": "https://json.schemastore.org/claude-code-settings.json"
}

Some Useful Hidden Settings

{
  "showTurnDuration": true,
  "env": {
    "DISABLE_AUTOUPDATER": "1"
  }
}
  • showTurnDuration: Display the duration of each conversation turn
  • DISABLE_AUTOUPDATER: Disable automatic update checks, reducing context overhead

/stats and /insights: Usage Analytics

/stats and /insights usage analytics screenshot
/stats and /insights usage analytics
  • /stats: Visualizes daily usage, session history, usage streaks, and model preferences, with date range filtering
  • /insights: Analyzes all your Claude Code history, tells you which workflows are effective, where bottlenecks are, and generates optimization suggestions

history.jsonl: Prompt History

Claude saves every prompt you send in ~/.claude/history.jsonl. You can ask Claude to analyze this file to find prompt patterns and optimization opportunities.

/doctor: Health Check

When you encounter strange issues, run /doctor (or claude doctor in the terminal). It checks installation status, version, authentication state, and system dependencies to help you quickly pinpoint problems.

Community Tools

The community tool ccusage can track token usage:

npx ccusage daily

If you've used --dangerously-skip-permissions or approved many commands, you can use cc-safe to scan for risks:

npx cc-safe .

It checks .claude/settings.json for high-risk commands like sudo, rm -rf, chmod 777, git reset --hard, and more.

More Slash Commands Worth Knowing

CommandFunction
/export [filename]Export conversation as plain text
/pr-comments [PR]Fetch PR comments (auto-detects current branch)
/release-notesView current version changelog
/pluginBrowse and install community plugins
/fastToggle fast mode
claude --debugEnable debug logging on startup (supports category filtering, e.g., --debug "api,hooks")
/install-github-appInstall GitHub App for automatic PR reviews

Comments

Table of Contents

Configuration & Diagnostics | Yu's Cyber Desk