Jump to content

Claude Code/Cheat Sheet: Difference between revisions

From Wiki
Marcluer (talk | contribs)
Marcluer (talk | contribs)
 
(12 intermediate revisions by the same user not shown)
Line 14: Line 14:
== Keyboard / UI ==
== Keyboard / UI ==
<pre>
<pre>
shift-tab        # Normal- / Auto-Accept- / Plan-Mode
shift-tab        # normal- / auto-accept- / planning-Mode
ctrl-esc        # quick launch claude from ide (not working!)
ctrl-R          # detailed output
esc-esc          # jump to previous message
 
ctrl-esc        # quick launch from ide (not working!)
</pre>
</pre>
== /commands (built-in)==
== /commands (built-in)==
Line 27: Line 30:
# always write unit tests        # Add to memory
# always write unit tests        # Add to memory
!ls                              # Run bash commands
!ls                              # Run bash commands
/init                            # initialize CLAUDE.md
/output-style                    # Default, Explanatory, Learning
</pre>
</pre>


Line 46: Line 52:
/mcp__github__list_prs</pre>
/mcp__github__list_prs</pre>


== Memory ==
== Memory file (CLAUDE.md) ==
{| class="wikitable"
<pre>
|+
IMPORTANT        # emphasis
!
@README.md      # link to files
!file
</pre>
|-
|Project memory
|<code>./CLAUDE.md</code>
|-
|User memory
|<code>~/.claude/CLAUDE.md</code>
|}
 
== sub agents ==
* https://docs.anthropic.com/en/docs/claude-code/sub-agents
{| class="wikitable"
|+
!
!file
|-
|User sub agents
|<code>~/.claude/agents/</code>
|-
|Project sub agents
|<code>.claude/agents/</code>
|}


== thinking ==
== thinking ==
Line 77: Line 62:
think
think
think more, think a lot, think harder, think longer
think more, think a lot, think harder, think longer
ultrathink
</pre>
</pre>


Line 82: Line 68:
<pre>
<pre>
claude --dangerously-skip-permissions
claude --dangerously-skip-permissions
claude [options] [command] [prompt]
claude -p                              # print response and exit
claude -p "Whats my age again?"
</pre>
</pre>
== Mechanisms ==
{| class="wikitable"
|+
Sub-Agents, Slash Commands, Skills, Memory, Output-Styles
! Feature !! Invocation !! Context !! Use When
|-
| '''Sub-Agents''' || Automatic OR explicit || Separate context window per agent || You need specialized AI for specific tasks with focused tools/prompts
|-
| '''Slash Commands''' || Explicit
(/command)
| Adds to current conversation || You repeat the same prompt frequently
|-
| '''Skills''' || Automatic
(Claude decides)
| Progressive disclosure
(loads files as needed)
| Complex multi-file capability that Claude should discover automatically
|-
| '''CLAUDE.md''' || Automatic
(loaded at startup)
| Always in context || Persistent memory, preferences, conventions across sessions
|-
| '''Output Styles''' || Manual
(/output-style)
| Replaces system prompt || Change Claude's overall personality/behavior for entire session
|}




[[Category:Programming]]
[[Category:Programming]]
[[Category:AI]]
[[Category:AI]]

Latest revision as of 17:48, 24 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

Sub-Agents, Slash Commands, Skills, Memory, Output-Styles
Feature Invocation Context Use When
Sub-Agents Automatic OR explicit Separate context window per agent You need specialized AI for specific tasks with focused tools/prompts
Slash Commands Explicit

(/command)

Adds to current conversation You repeat the same prompt frequently
Skills Automatic

(Claude decides)

Progressive disclosure

(loads files as needed)

Complex multi-file capability that Claude should discover automatically
CLAUDE.md Automatic

(loaded at startup)

Always in context Persistent memory, preferences, conventions across sessions
Output Styles Manual

(/output-style)

Replaces system prompt Change Claude's overall personality/behavior for entire session