Jump to content

Claude Code/Cheat Sheet: Difference between revisions

From Wiki
Marcluer (talk | contribs)
mNo edit summary
Marcluer (talk | contribs)
Line 76: Line 76:
== Mechanisms ==
== Mechanisms ==
{| class="wikitable"
{| class="wikitable"
|+
|+ Claude Code Features Comparison
!
! Feature !! Invocation !! Context !! Use When !! Location !! Example Use Cases
!
!
!
|-
|-
|Agents
| '''Sub-Agents''' || Automatic OR explicit || Separate context window per agent || You need specialized AI for specific task types with focused tools/prompts || `.claude/agents/` or `~/.claude/agents/` || Code reviewer, debugger, data analyst - tasks requiring expertise with own context
|
|
|
|-
|-
|Sub-Agents
| '''Slash Commands''' || '''Explicit''' (`/command`) || Adds to current conversation || You repeat the same prompt frequently and want quick access || `.claude/commands/` or `~/.claude/commands/` || `/review`, `/optimize`, `/commit` - simple prompts you invoke manually
|
|
|
|-
|-
|Slash Commands
| '''Skills''' || '''Automatic''' (Claude decides) || Progressive disclosure (loads files as needed) || Complex multi-file capability that Claude should discover automatically || `.claude/skills/` or `~/.claude/skills/` || PDF processing, Excel analysis - capabilities with scripts/docs Claude auto-invokes
|
|
|
|-
|-
|Skills
| '''CLAUDE.md''' || Automatic (loaded at startup) || Always in context || Persistent memory, preferences, conventions across sessions || `CLAUDE.md`, `.claude/CLAUDE.md`, `~/.claude/CLAUDE.md` || Coding standards, architecture patterns, frequently used commands, team conventions
|
|
|
|-
|-
|CLAUDE.md
| '''Output Styles''' || Manual (`/output-style`) || Replaces system prompt || Change Claude's overall personality/behavior for entire session || `.claude/output-styles/` or `~/.claude/output-styles/` || Learning mode, explanatory mode, non-coding tasks (writing, research, etc.)
|
|
|
|-
|Output styles
|
|
|
|}
|}
[[Category:Programming]]
[[Category:Programming]]
[[Category:AI]]
[[Category:AI]]

Revision as of 09:11, 21 October 2025

Other articles

Keyboard / UI

shift-tab        # normal- / auto-accept- / planning-Mode
ctrl-R           # detailed output
esc-esc          # jump to previous message

ctrl-esc         # quick launch from ide (not working!)

/commands (built-in)

/clear                           # Clear conversation history
/ide
/cost                            # Show costs of current session
/agents                          # Manage agents

@filename.txt                    # @file mention
# always write unit tests        # Add to memory
!ls                              # Run bash commands

/init                            # initialize CLAUDE.md
/output-style                    # Default, Explanatory, Learning

/commands (custom)

/command1 [argument]             # .claude/commands/command1.md (project command)
/command2 [argument]             # ~/.claude/commands/command2.md (user command)

                                 # commands in subfolders
/frontend:test                   # .claude/commands/frontend/test.md 

                                 # arguments
/fix-issue 123                   # $ARGUMENTS <- 123

/commands (mcp)

/mcp                             # list mcp servers
/mcp__github__list_prs

Memory file (CLAUDE.md)

IMPORTANT        # emphasis
@README.md       # link to files

thinking

think
think more, think a lot, think harder, think longer
ultrathink

CLI

claude --dangerously-skip-permissions

claude [options] [command] [prompt]
claude -p                              # print response and exit
claude -p "Whats my age again?"

Mechanisms

Claude Code Features Comparison
Feature Invocation Context Use When Location Example Use Cases
Sub-Agents Automatic OR explicit Separate context window per agent You need specialized AI for specific task types with focused tools/prompts `.claude/agents/` or `~/.claude/agents/` Code reviewer, debugger, data analyst - tasks requiring expertise with own context
Slash Commands Explicit (`/command`) Adds to current conversation You repeat the same prompt frequently and want quick access `.claude/commands/` or `~/.claude/commands/` `/review`, `/optimize`, `/commit` - simple prompts you invoke manually
Skills Automatic (Claude decides) Progressive disclosure (loads files as needed) Complex multi-file capability that Claude should discover automatically `.claude/skills/` or `~/.claude/skills/` PDF processing, Excel analysis - capabilities with scripts/docs Claude auto-invokes
CLAUDE.md Automatic (loaded at startup) Always in context Persistent memory, preferences, conventions across sessions `CLAUDE.md`, `.claude/CLAUDE.md`, `~/.claude/CLAUDE.md` Coding standards, architecture patterns, frequently used commands, team conventions
Output Styles Manual (`/output-style`) Replaces system prompt Change Claude's overall personality/behavior for entire session `.claude/output-styles/` or `~/.claude/output-styles/` Learning mode, explanatory mode, non-coding tasks (writing, research, etc.)