Claude Code: Difference between revisions
Appearance
mNo edit summary |
mNo edit summary |
||
| Line 36: | Line 36: | ||
|- | |- | ||
|Project memory | |Project memory | ||
|<code> | |<code>$PROJECT_DIR/CLAUDE.md</code> | ||
|- | |- | ||
|User memory | |User memory | ||
| Line 42: | Line 42: | ||
|- | |- | ||
|<s>Local project memory</s> | |<s>Local project memory</s> | ||
|<code><s> | |<code><s>$PROJECT_DIR/CLAUDE.local.md</s></code> deprecated | ||
|} | |} | ||
| Line 55: | Line 55: | ||
|- | |- | ||
|Project sub agents | |Project sub agents | ||
|<code>.claude/agents/</code> | |<code>$PROJECT_DIR/.claude/agents/</code> | ||
|} | |} | ||
* Example sub agents: | * Example sub agents: | ||
| Line 70: | Line 70: | ||
|- | |- | ||
|Project commands | |Project commands | ||
|<code>.claude/commands/</code> | |<code>$PROJECT_DIR/.claude/commands/</code> | ||
|} | |} | ||
| Line 91: | Line 91: | ||
|- | |- | ||
|Project MCP server | |Project MCP server | ||
|<code>.mcp.json</code> | |<code>$PROJECT_DIR/.mcp.json</code> | ||
| | | | ||
| -s project | | -s project | ||
| Line 114: | Line 114: | ||
|- | |- | ||
|Project settings | |Project settings | ||
|<code>.claude/settings.json</code> | |<code>$PROJECT_DIR/.claude/settings.json</code> | ||
|all users | |all users | ||
|- | |- | ||
|Project settings | |Project settings | ||
|<code>.claude/settings.local.json</code> | |<code>$PROJECT_DIR/.claude/settings.local.json</code> | ||
|local/personal only | |local/personal only | ||
|} | |} | ||
Revision as of 14:13, 31 July 2025
| Other articles |
Installation on Ubuntu (WSL2)
sudo apt install npm mkdir -p ~/.npm-global npm config set prefix ~/.npm-global echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrc npm install -g @anthropic-ai/claude-code which claude claude doctor claude --version
Memory
| file | |
|---|---|
| Project memory | $PROJECT_DIR/CLAUDE.md
|
| User memory | ~/.claude/CLAUDE.md
|
deprecated
|
Sub agents
| file | |
|---|---|
| User sub agents | ~/.claude/agents/
|
| Project sub agents | $PROJECT_DIR/.claude/agents/
|
- Example sub agents:
Custom commands
| file | |
|---|---|
| User commands | ~/.claude/commands/
|
| Project commands | $PROJECT_DIR/.claude/commands/
|
MCP Server
claude mcp list claude mcp add <name> <command> [args...] claude mcp get my-server claude mcp remove my-server
| file | CLI switch | ||
|---|---|---|---|
| Local MCP Server | ~/.claude.json
|
default | -s local |
| Project MCP server | $PROJECT_DIR/.mcp.json
|
-s project | |
| User MCP Server | ~/.claude.json
|
-s user |
settings.json
| file | scope | |
|---|---|---|
| User settings | ~/.claude/settings.json
|
|
| Project settings | $PROJECT_DIR/.claude/settings.json
|
all users |
| Project settings | $PROJECT_DIR/.claude/settings.local.json
|
local/personal only |
Example:
{
"permissions": {
"allow": [
"Bash(ls:*)"
],
"deny": []
}
}
Hook example:
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": ".claude/hooks/prompt-validator.py"
}
]
}
]
}
Command line options
claude # interactive mode claude "task" # run single task claude -p "task" # run single task, print response, exit claude --dangerously-skip-permissions claude config list claude doctor claude update
Learning Videos
| Description | Channel | URL | |
|---|---|---|---|
| 1. | Basics | Matt Maher | https://www.youtube.com/watch?v=T_IYHx-9VGU |
| 2. | Best practices | Matt Maher | https://www.youtube.com/watch?v=IUi--nVU4yA |
| H | Hooks | IndyDevDan | https://www.youtube.com/watch?v=J5B9UGTuNoM |
| H | Hooks 2 | IndyDevDan | https://www.youtube.com/watch?v=9ijnN985O_c |
| IndyDevDan | https://github.com/disler/claude-code-hooks-mastery | ||
| S | Sub agents | Matt Maher | https://www.youtube.com/watch?v=6MLyc3jYisQ |
| S | Sub agents | IndyDevDan | https://www.youtube.com/watch?v=7B2HJr0Y68g |
- Channels
- Matt Maher: https://www.youtube.com/@MetalSole
- IndyDevDan: https://www.youtube.com/@indydevdan/