/help #shows complete command list
/help compact #shows detailed syntax for the compact command
/init #scans package.json, tsconfig.json, etc., and creates a 15-30 line CLAUDE.md file with detected conventions
/doctor #runs 5-8 checks in under 15 seconds and reports any issues with green (OK) or red (failure) status
/compact #compresses current session
/clear #use when switching topics or after 20+ exchanges; keyboard shortcut Ctrl+L
/rewind #runs once to undo one turn; can be run multiple times to go back further
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This is my ClaudeCode's StatusLine bashscript for showing the current directory, model name, and git status if applicable. | |
| # ref.: https://code.claude.com/docs/en/statusline | |
| # Read JSON data that Claude Code sends to stdin | |
| input=$(cat) | |
| # Extract information from JSON using jq | |
| CC_VER=$(echo "$input" | jq -r '.version') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1. Handle line endings automatically for text files | |
| # This ensures LF in the repo, but OS-native endings in the working directory | |
| * text=auto | |
| # 2. Explicitly declare text files (especially your programming language file endings) to be normalized to LF in the repo | |
| *.c text | |
| *.h text | |
| *.cpp text | |
| *.py text | |
| *.java text |
Claude Code uses a dual-memory system to balance your explicit instructions with its own learned observations.
| Feature | CLAUDE.md (Static Memory) | MEMORY.md (Auto Memory) |
|---|---|---|
| Who Writes It? | You (Manual) | Claude (Automated) |
| Content | "Project rules, architecture, tech stack." | "Patterns, ""gotchas,"" and user preferences." |
| Location | Your Project Root (git-tracked). | ~/.claude/projects/ (system-local). |
| Persistence | Permanent and shared with your team. | Local to your machine; session-dependent. |
Session Context Window (200k total)
ββββββββββββββββββββββββββββββββββββββββββββββ
β System Prompt + Tools: 15.9k (8%) β β Fixed allocation
β CLAUDE.md + Memory: 2.8k (1.4%) β β Fixed allocation
ββββββββββββββββββββββββββββββββββββββββββββββ€
β Messages (grows over time): 89.5k (44.7%) β β This grows
ββββββββββββββββββββββββββββββββββββββββββββββ€
β Free Space: 59k (29.5%) β β This shrinks
β Autocompact Buffer: 33k (16.5%) β β Reserved
Here's a practical reference table for what healthy, warning, and critical levels look like for each category:
| Category | Healthy | Warning | Critical | Breach Consequences |
|---|---|---|---|---|
| System Prompt | <5k tokens | 5-8k tokens | >8k tokens | Reduced context for actual work; slower responses |
| System Tools | <10k tokens | 10-20k tokens | >20k tokens | Context starvation; frequent compacting; tool failures |
| Memory Files | <1k tokens | 1-2k tokens | >2k tokens | Important instructions being truncated; Claude "forgetting" conventions |
| Messages | <40% of total | 40-60% of total | >60% of total | Rapidly approaching limit; autocompact ineffective |
| Free Space | >30% | 15-30% | <15% | Autocompact may fail; Claude may refuse new tasks |
| Autocompact Buffer | >20% | 15-20% | <15% | Summaries become poor; important context lost |
| Total Usage | <70% | 70-85% | >85% | Performance degradation; risk of hitting limit mid-task |
flowchart TB
subgraph Request1[Request 1: Cache Write]
A1[System prompt<br/>CLAUDE.md + Tools]
A2[User message 1]
A3[Cache Storage]
A1 --> A3
A2 --> B[Process full request]
A3 --> B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Check out detailed blog post at https://blog.codonomics.com/2026/01/accessing-windows-host-from-wsl2-linux.html | |
| ### Start: Adding Windows Host IP to WSL2 Hosts File | |
| # Add to the end of ~/.bashrc or ~/.zshrc | |
| echo "Updating Windows host IP in /etc/hosts..." | |
| # Get Windows IP from default route | |
| WIN_HOST_IP=$(ip route show | grep -i default | awk '{print $3}') | |
| # Check if we got a valid IP | |
| if [ -n "$WIN_HOST_IP" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================= | |
| # MINICONDA CHEATSHEET (Python Environment & Package Management) | |
| # ============================================= | |
| # Lightweight version of Anaconda for Python environments. | |
| # Install: https://docs.conda.io/projects/miniconda/en/latest/ | |
| # Docs: https://conda.io/projects/conda/en/latest/commands.html | |
| # --------------------------------------------------------------------- | |
| # 1. INSTALLATION & SETUP | |
| # --------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================= | |
| # UV CHEATSHEET (Python Package & Env Management) | |
| # ============================================= | |
| # Astral's ultra-fast alternative to pip/venv. | |
| # Install: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| # Docs: https://github.com/astral-sh/uv | |
| # --------------------------------------------------------------------- | |
| # 1. VIRTUAL ENVIRONMENTS | |
| # --------------------------------------------------------------------- |