Skip to main content

Claude Code basic

pre-requisite: node (install node on the system) 

Install with command - (claude cli installation)

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

As installation complete, put the command : claude


commands useful:

1. /terminal-setup

2. /init --> summarize in .md file (route of project directory)

# and give instruction, will be remembered or added to claude.md file, so  Claude will take care of it.

/memory

3. To add context

     - put @ and path of the file.

    - open file and select where you want to make change

4. /exit --> to exit the chat session

    /compact -->compacts the chat and context into small summary

/clear --> clears entire session context and chat history

press ESC twice --> rewind to a previous point in the session

5. Custom Command

inside .claude folder, can create a .md file. User the name of file as command. Written instruction/prompt in the file, will be executed as an when the custom command is executed.


6. put ! for bash command or working with git

7. put ? to get available different commands (other than with '/')

=================================================

                        MCP(Model Context Protocol)

======================================================

Allows model to interact with external sources

Comments

Popular posts from this blog

API Basics

 

Algorithm solving Common Patterns & Techniques

  These are targeted data manipulation strategies used to handle arrays, strings, and linked lists efficiently. Two Pointers : Uses two reference pointers to iterate through a data structure simultaneously, typically from opposite ends or at different speeds (Fast & Slow pointers). Sliding Window : Maintains a subset of data (a "window") over a sequential structure to track running statistics without recalculating the whole set. Prefix Sum : Pre-computes and stores cumulative sums of an array to allow for \(O(1)\) constant-time range sum queries. Dynamic Programming (DP ): Dynamic programming is an optimization technique used to solve problems by breaking them down into simpler subproblems and storing the results of these subproblems to avoid redundant computations. It is particularly effective for problems exhibiting overlapping subproblems and optimal substructure. Greedy Algorithm Breadth-First Search (BFS) / Depth-First Search (DFS) : Systematic graph and tree travers...