Module 1: Foundations — Reference Materials

This document compiles the essential information you need to get started with Claude Code. Refer to it whenever you get stuck or need to look up a command.

Audience: Tech-savvy individuals who have no prior experience with the CLI or programming


Table of Contents


1. Claude Code Basic Commands (Slash Commands)

This is a list of slash commands you can use inside Claude Code. When you see the > prompt, type a command starting with / to use it.

Basic Commands

CommandDescriptionWhen to Use
/helpDisplay helpWhen you want to see available commands
/statusShow current session statusWhen you want to check the active model or working directory
/exitQuit Claude CodeWhen you want to end your session

Conversation Management Commands

CommandDescriptionWhen to Use
/clearClear conversation historyWhen you want to switch to a new topic
/compactSummarize and compress conversation historyWhen a long conversation starts slowing things down

Settings & Information Commands

CommandDescriptionWhen to Use
/costShow token usage and cost for the current sessionWhen you want to check your usage
/configView or change settingsWhen you want to review or modify Claude Code settings
/modelSwitch the AI modelWhen you want to try a different model

Project Management Commands

CommandDescriptionWhen to Use
/initInteractively create a CLAUDE.mdWhen you want to set up initial project configuration

Startup Options

These are options you can add when launching claude from the terminal.

CommandDescriptionExample
claudeLaunch in normal interactive modeclaude
claude -p "instruction"Execute a single instruction and exitclaude -p "Tell me today's date"
claude --continueResume from the previous sessionclaude --continue
claude --versionDisplay the versionclaude --version

Responding to Permission Prompts

When Claude Code asks for confirmation before performing file operations or running commands, here is how to respond.

ResponseMeaningWhen to Use
y or EnterAllow this time onlyWhen you have reviewed the action and it looks fine
nDenyWhen it is not the intended operation
aAlways allow this type of operationWhen you want to auto-approve a trusted, recurring action

Keyboard Shortcuts (Inside Claude Code)

ShortcutAction
Ctrl + C twiceForce quit Claude Code
Ctrl + DExit Claude Code
EscCancel the text you are typing

Tip: Anything starting with / is a slash command. Regular text in your language is treated as an instruction to Claude Code.


2. Common Terminal Commands

These are basic commands you use in the terminal (outside of Claude Code, on the regular command line). This is a curated list of the minimum commands that are useful to know when working with Claude Code.

Check Where You Are

CommandMeaningExampleSample Output
pwdDisplay the current folder locationpwd/home/yuichiro/Documents

What it stands for: pwd = Print Working Directory

This command tells you “where you currently are” on your computer. If you ever feel lost, just run pwd.

View Folder Contents

CommandMeaningExampleDescription
lsList folder contentslsShows files and folders in the current directory
ls -laShow a detailed listingls -laShows all files including hidden ones, with size and modification dates

What it stands for: ls = List

On Windows: In PowerShell, you can use dir instead of ls for the same result.

CommandMeaningExampleDescription
cd foldernameMove into the specified foldercd DocumentsMove into the Documents folder
cd ..Go up one foldercd ..Move to the parent folder
cd ~Go to your home foldercd ~Move to your home folder

What it stands for: cd = Change Directory

Analogy: Think of cd like taking an elevator in a building. cd Documents is “go to the Documents floor,” cd .. is “go down one floor,” and cd ~ is “go back to the ground floor (home).”

Work with Files and Folders

CommandMeaningExampleDescription
mkdirCreate a new foldermkdir my-projectCreates a folder called my-project
catDisplay file contentscat memo.txtShows the full contents of memo.txt
cpCopy a filecp memo.txt memo-backup.txtCopies memo.txt as memo-backup.txt
mvMove or rename a filemv old.txt new.txtRenames old.txt to new.txt
rmDelete a filerm memo.txtDeletes memo.txt

What they stand for:

  • mkdir = Make Directory
  • cat = Concatenate (originally for joining files; commonly used to display file contents)
  • cp = Copy
  • mv = Move
  • rm = Remove

Warning: Files deleted with rm do not go to the Recycle Bin and cannot be recovered. Always back up important files before deleting them.

How to Read Paths

A path is the “address” of a file or folder.

/home/yuichiro/Documents/project/report.md
 |      |         |         |        |
 |      |         |         |        └── File name
 |      |         |         └── Project folder
 |      |         └── Documents folder
 |      └── User's folder
 └── Root (top level)
SymbolMeaningExample
/Folder separator (\ on Windows)/home/yuichiro
~Shorthand for the home folder~/Documents = /home/yuichiro/Documents
.Current folder./memo.txt = memo.txt in the current folder
..Parent folder (one level up)../ = parent folder

Keyboard Shortcuts (In the Terminal)

ShortcutAction
Ctrl + CInterrupt the running command
Ctrl + LClear the screen (history is preserved)
Up arrow keyRecall the previous command
TabAuto-complete commands or file names

Tip: The Tab key auto-complete feature is incredibly handy. Type the first few characters of a file name and press Tab to fill in the rest automatically. It helps you avoid typos in file names.


3. Glossary

This glossary explains terms used in Claude Code and this course in a way that is accessible to non-engineers. Entries are sorted alphabetically.

#TermDescription
1AI AgentA system where AI autonomously performs “actions” such as file operations and command execution. Unlike a chat AI that “only answers,” an agent “carries out tasks”
2APIStands for Application Programming Interface. A mechanism for software to exchange data with other software. Claude Code communicates with Anthropic’s API behind the scenes
3API KeyAn authentication string (like a password) used to access an API. Must never be shared with others
4CLIStands for Command Line Interface. A method of operating a computer by typing text with a keyboard. The opposite of GUI (see below)
5CLAUDE.mdA configuration file for Claude Code. Write your project information and preferences here, and Claude Code will automatically read it on startup
6CSVStands for Comma-Separated Values. A file format that stores data separated by commas. Can be opened in Excel or Google Sheets
7GitA tool for tracking the change history of files. It records “when, what, and how something was changed.” Claude Code can integrate with Git inside a project
8GUIStands for Graphical User Interface. A method of using a computer via mouse or touch interactions. Most everyday apps use a GUI
9MarkdownA lightweight markup language that uses symbols like # and * to add headings, bullet points, and other formatting to text. Commonly used in Claude Code output. File extension: .md
10Node.jsA runtime environment for the JavaScript programming language. Required software for running Claude Code
11npmStands for Node Package Manager. A tool for installing and managing Node.js packages (software). Used to install Claude Code
12Current DirectoryThe folder you are currently in. In the terminal, you are always inside some folder. You can check it with pwd. Claude Code uses this folder as its starting point
13File ExtensionThe part at the end of a file name such as .md, .txt, or .csv. It indicates the file type. For example, .md is a Markdown file
14CommandAn instruction typed into the terminal. Examples: ls, cd, claude, etc.
15ContextThe scope and background of information that the AI is aware of. As a conversation grows longer, older information is gradually forgotten. Using CLAUDE.md allows you to keep important information always available
16Slash CommandAn operational command inside Claude Code that starts with /, such as /help or /exit
17SessionThe entire interaction from launching Claude Code to exiting it
18TerminalThe application used to access the CLI. On Mac it is “Terminal.app”; on Windows it is “PowerShell” or “Windows Terminal”
19DirectorySynonymous with “folder.” In the terminal world, folders are called directories
20TokenThe smallest unit used by AI when processing text. In English, one token is roughly 3-4 characters. Tokens are used to measure usage and calculate costs
21PathA string that indicates the address (location) of a file or folder. Example: /home/yuichiro/Documents/memo.txt
22PromptHas two meanings: (1) An instruction or question given to the AI. (2) An input-waiting symbol in the terminal, such as > or $
23Home DirectoryYour personal folder. On Mac: /Users/username; on Linux: /home/username. Can be abbreviated with ~

4. FAQ (Frequently Asked Questions)

Q1: Is Claude Code free to use?

A: Installing Claude Code itself is free, but using it requires an Anthropic API key or a subscription plan. With an API key, you pay based on usage (pay-as-you-go). With a Claude Pro or Claude Max plan, you pay a flat monthly fee. You can run the /cost command during a session to check your current usage. Please refer to Anthropic’s official website for the latest pricing.

Q2: Where are files created by Claude Code saved?

A: They are saved in the folder where you launched Claude Code (the current directory). You can check the current folder with the pwd command. If you want to specify a save location, include the folder name or path in your instruction (e.g., “Save it in the reports folder” or “Save it to ~/Documents/”).

Q3: Is it safe to share confidential or personal information with Claude Code?

A: Information you input into Claude Code is sent to Anthropic’s API servers for processing. According to Anthropic’s privacy policy, data sent via the API is not used for model training. However, for highly confidential information or personal data, be sure to check your organization’s security policy. We also recommend not including confidential information in your CLAUDE.md file.

Q4: I gave it the wrong instruction. Can I undo it?

A: In some cases, Claude Code will ask for confirmation before creating or modifying files. At that point, you can choose n (No) to cancel. If the action has already been carried out, try asking Claude Code to “Undo the recent change.” For projects using Git, you can also restore files from the change history.

Q5: Claude Code seems to be stuck. What should I do?

A: Press Ctrl + C to interrupt, then restart with the claude command. If it stopped in the middle of a long process, resetting the history with /clear and trying again sometimes helps. You can also use claude --continue to resume from where the previous conversation left off.

Q6: Even though I give instructions in my language, it sometimes responds in English.

A: Adding explicit language instructions in your CLAUDE.md, such as “Language: English” and “All responses should be in English,” significantly increases the likelihood of responses in your preferred language. You can also add “Please respond in English” on the spot.

Q7: Can Claude Code connect to the internet and retrieve the latest information?

A: Claude Code communicates with Anthropic’s AI model to operate. Depending on your environment and tool settings, it may be able to fetch web pages. However, for real-time information (today’s weather, the latest news, etc.), we recommend verifying AI responses against official sources rather than relying on them directly.

Q8: Do I have to create a CLAUDE.md file?

A: It is not required. Claude Code works perfectly fine without a CLAUDE.md. However, having one saves you from repeating the same context every time and improves the quality and consistency of outputs. We strongly recommend creating one, especially if you repeatedly request the same type of task.

Q9: Can I use Claude Code differently across multiple projects (folders)?

A: Yes, you can. By placing a separate CLAUDE.md in each folder, you can use Claude Code with different settings per folder. For example:

sales-reports/
  ├── CLAUDE.md    ← Settings for sales reports
  └── ...

marketing-content/
  ├── CLAUDE.md    ← Settings for marketing content
  └── ...

When you launch claude in each folder, the corresponding CLAUDE.md is automatically loaded.

Q10: How do I update Claude Code?

A: Run the following command in your terminal:

npm update -g @anthropic-ai/claude-code

Regular updates let you benefit from new features and bug fixes. You can check your current version with claude --version.


5. Troubleshooting

Here are common issues and their solutions, organized by situation.

5.1 Cannot Install

SymptomCauseSolution
npm: command not foundNode.js is not installedDownload and install the LTS version from the Node.js official website
node: command not foundTerminal was not restarted after installing Node.jsClose the terminal and reopen it in a new window
EACCES: permission deniedNo write permission to the installation directory (Mac/Linux)Add sudo at the beginning of the command: sudo npm install -g @anthropic-ai/claude-code (you will be prompted for a password; nothing will appear on screen as you type, but this is normal)
Installation gets stuck partway throughNetwork connection issueCheck your internet connection. If you are on a corporate network with a proxy, consult your IT department
Error about an old Node.js versionAn outdated version of Node.js is installedNode.js v18 or later is required. Check your version with node -v; if it is old, reinstall the latest LTS version from the official website

5.2 Cannot Launch

SymptomCauseSolution
claude: command not foundInstallation is incomplete or the path is not configuredRe-run npm install -g @anthropic-ai/claude-code. If that does not help, restart your terminal
Authentication / API key errorsAPI key is not set or is invalidFollow the instructions shown when launching claude to complete authentication. Check the status of your API key on the Anthropic console
ECONNREFUSED / connection errorNo internet connectionCheck your internet connection. Additional settings may be required in VPN or corporate proxy environments

5.3 Issues During Use

SymptomCauseSolution
No response (long wait)Processing is taking time, or a network issueIf there is no response after 3+ minutes, press Ctrl + C to interrupt and restart with claude
Rate limit exceeded errorAPI calls concentrated in a short period, hitting the rate limitWait a few minutes and try again
Suddenly becomes slowConversation has grown long and the context has become very largeUse /compact to compress the conversation, or /clear to reset it
Garbled charactersTerminal character encoding is not set to UTF-8Change the character encoding to UTF-8 in your terminal settings. This is usually not an issue on Mac/Linux. On Windows, additional settings may be required
Says it cannot find a fileClaude Code was launched from a different folder (current directory) than expectedCheck the current working directory with /status. Exit, navigate to the correct folder with cd, and restart
Unintended files were changed or createdYou accidentally approved a permission prompt without reading itAsk Claude Code to “Undo the recent change.” In the future, read the confirmation carefully before pressing y

5.4 Windows-Specific Issues

SymptomCauseSolution
Commands do not work in PowerShellAdministrator privileges are requiredRight-click PowerShell and select “Run as administrator,” then try again
Script execution policy errorPowerShell security settings restrict script executionRun Set-ExecutionPolicy RemoteSigned -Scope CurrentUser in PowerShell, then try again
Path separators use \Windows uses \ (backslash) as the folder separatorClaude Code accepts both / (forward slash) and \ in instructions, so there is no need to worry about this

5.5 If Nothing Else Works

Try the following steps in order:

  1. Copy the error message When an error appears, copy it exactly as shown. It is fine if it is in English.

  2. Ask Claude Code If Claude Code is running, paste the error message and ask, “What is the cause and solution for this error?”

  3. Restart the terminal Simply closing and reopening the terminal app sometimes resolves the issue.

  4. Restart your computer Many temporary problems are resolved by restarting your computer.

  5. Check the official documentation The Claude Code official documentation has the latest information and troubleshooting guides.

  6. Contact your IT department For issues related to corporate networks, proxies, or security settings, please consult your IT department.


Quick Reference Card

A one-page summary of the things you use every day. Print it out and keep it handy.

+----------------------------------------------------------+
|            Claude Code Quick Reference                    |
+----------------------------------------------------------+
|                                                          |
|  [Launch & Exit]                                         |
|    Launch:  claude                                       |
|    Exit:    /exit  or  Ctrl+C twice                      |
|    Resume:  claude --continue                            |
|                                                          |
|  [Common Slash Commands]                                 |
|    /help    ... Show help                                |
|    /status  ... Check status                             |
|    /clear   ... Reset conversation                       |
|    /compact ... Compress conversation                    |
|    /cost    ... Check usage costs                        |
|                                                          |
|  [Permission Prompt Responses]                           |
|    y ... Allow    n ... Deny    a ... Always allow        |
|                                                          |
|  [Basic Terminal Commands]                               |
|    pwd      ... Show current location                    |
|    ls       ... List files                               |
|    cd name  ... Move to folder                           |
|    cd ..    ... Go up one level                          |
|    cat name ... Display file contents                    |
|    mkdir    ... Create a folder                          |
|                                                          |
|  [Tips for Writing Instructions]                         |
|    1. Be specific about what you want created            |
|    2. Specify the file format (Markdown, CSV, etc.)      |
|    3. Specify the file name                              |
|    4. If it doesn't work, give additional instructions   |
|                                                          |
+----------------------------------------------------------+

Revision History

DateDescription
2026-03-11Initial version