NEW: Claude Code Security — research preview

Cheatsheet

85 slash commands - the ones that change your workflow

POPULARRead time: 5 min

Claude Code Cheatsheet

85 slash commands. Most people know 5. Here are the ones that change your workflow.

Essential Commands

CommandWhat It Does
/planPreview changes before execution (Plan Mode)
/compactCompress session history (70% threshold)
/clearClear session context (90% threshold)
/contextShow current context (files, tools, rules)
/costDisplay token usage and costs
/statsSession statistics

Bundled Skills

Pre-loaded skill commands:

CommandPurposeExample
/batchRun parallel agents/batch "Task 1" "Task 2" "Task 3"
/simplify3-agent code review/simplify on complex code
/debugInteractive debugger/debug, then paste error
/loopAgentic loop for complex tasks/loop "Implement X with tests"
/claude-apiLoad API reference/claude-api (in-session docs)

Harness Commands (ECC-Powered)

CommandPurpose
/harness-auditReliability + eval readiness audit
/loop-startStart controlled agentic loop
/loop-statusCheck loop execution status
/quality-gateRun checks on paths/repo
/model-routeRoute tasks by complexity/budget

Permission Modes

Cycle with Shift+Tab:

  1. default - Ask before each change
  2. acceptEdits - Accept file changes, ask about command execution
  3. plan - Show plan without executing
  4. auto - Classify actions and decide automatically
  5. dontAsk - Never ask, log decisions
  6. bypassPermissions - Unrestricted (not recommended)

Set with:

claude --permission-mode auto "your task"

Session Management

FlagPurposeExample
--resumeResume previous sessionclaude --resume
--fork-sessionBranch sessionclaude --fork-session SESSION_ID
--from-prLoad PR contextclaude --from-pr 42 "review changes"
--effortTask difficulty hintclaude --effort high "complex refactor"

Compaction Strategy

Token Usage
    50% → Monitor
    70% → /compact
    90% → /clear or new session

What /compact preserves:

  • File edits
  • Task completion status
  • Key decisions
  • Tool results

What it removes:

  • Verbose reasoning
  • Intermediate steps
  • Duplicate context

Anti-Patterns to Avoid

❌ Task without recent CLAUDE.md update
❌ Task without clear scope
❌ Using /clear mid-implementation
❌ Running agent teams without checkpoints
❌ Bypassing permissions in complex work


Pro Tip: Combine /plan with --effort low for quick exploratory runs, then /batch for parallel implementation with --effort high.