Danny Willems -- Work In Progress

A mathematician fighting for privacy and security on the Internet, while dreaming about describing the Universe with equations and symbols.

██████╗██╗ █████╗ ██╗ ██╗██████╗ ███████╗ ██████╗ ██████╗ ██████╗ ███████╗ ██╔════╝██║ ██╔══██╗██║ ██║██╔══██╗██╔════╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██║ ██║ ███████║██║ ██║██║ ██║█████╗ ██║ ██║ ██║██║ ██║█████╗ ██║ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ ██║ ██║ ██║██║ ██║██╔══╝ ╚██████╗███████╗██║ ██║╚██████╔╝██████╔╝███████╗ ╚██████╗╚██████╔╝██████╔╝███████╗ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝

Claude Code Cheat Sheet

Quick reference for Anthropic's CLI coding assistant
Last updated: January 2026

Installation

PlatformCommand
macOS/Linuxcurl -fsSL https://claude.ai/install.sh | bash
Homebrewbrew install --cask claude-code
Windowsirm https://claude.ai/install.ps1 | iex
WinGetwinget install Anthropic.ClaudeCode

Slash Commands

CommandDescription
/agentsCreate and manage subagents
/allowed-toolsManage tool permissions
/bugReport issues
/configInteractive settings configuration
/contextView context usage breakdown
/helpDisplay all available commands
/hooksSet up automation triggers
/install-github-appSet up GitHub Actions integration
/mcpConfigure MCP servers
/terminal-setupInstall keyboard shortcuts
/vimEnable vim-style editing

Read more: Comprehensive slash commands guide

Tip: Use /context regularly to monitor token usage and avoid context exhaustion.

Configuration Files

FileScopeLocation
User settingsAll projects~/.claude/settings.json
Project settingsTeam (git tracked).claude/settings.json
Local settingsPersonal (git ignored).claude/settings.local.json
Memory fileProject contextCLAUDE.md (hierarchical)
Custom agentsSubagent definitions.claude/agents/
Custom commandsSlash commands.claude/commands/

Read more: CLAUDE.md memory system explained

Context Categories

CategoryDescription
System promptClaude's base instructions
System toolsBuilt-in tools (Read, Write, Bash, etc.)
Custom agentsYour .claude/agents/ definitions
Memory filesYour CLAUDE.md files
MCP toolsModel Context Protocol servers
ReservedBuffer (~40-45k) for auto-compact
MessagesConversation history
Free spaceAvailable for new content

Read more: Understanding the /context command

GitHub Integration

Quick Setup:

/install-github-app

@claude Mentions:

@claude review this PR
@claude fix the TypeError in dashboard
@claude implement user authentication
@claude /review

Local Git Operations:

commit these changes
create a pr for this branch
what changes made it into v1.2.3?

Read more: GitHub workflow integration

CLI Arguments

ArgumentDescription
-p "prompt"Print mode (single query, then exit)
--model <model>Specify Claude model
--max-turns <n>Limit conversation turns
--allowed-tools <list>Restrict available tools
--mcp-config <path>MCP configuration file
--debugEnable debug output

Piping:

tail -f app.log | claude -p "analyze these logs"
cat error.txt | claude -p "explain this error"

Hooks

HookTrigger
PreToolUseBefore a tool is executed
PostToolUseAfter a tool completes
UserPromptSubmitWhen user sends a message
SessionStartWhen a new session begins

Example use cases:

  • Auto-format code after edits
  • Run linters before commits
  • Send notifications on completion

MCP (Model Context Protocol)

Connect external tools and data sources:

  • Google Drive (design docs)
  • Figma (designs)
  • Slack (team communication)
  • Jira (issue tracking)
  • Custom tooling

Setup:

/mcp
Warning: MCP tools can consume significant context (40%+). Disable unused servers.

Keyboard Shortcuts

ShortcutAction
Ctrl+CCancel current operation
Ctrl+DExit Claude Code
TabAutocomplete
Up/DownNavigate history
Ctrl+TToggle syntax highlighting (in /theme)

Install terminal shortcuts:

/terminal-setup

Best Practices

  1. Use CLAUDE.md - Encode project conventions, build commands, standards (guide)
  2. Start focused sessions - New conversations for distinct tasks
  3. Be specific - Target file reads, specific grep patterns
  4. Use Task tool - Let Claude spawn subagents for exploration
  5. Monitor /context - Avoid context exhaustion
  6. Review changes - Always review before accepting

Resources

[ More articles coming soon - check back for updates ]