Difference between revisions of "Claude code"

From Logic Wiki
Jump to: navigation, search
Line 42: Line 42:
 
  /usage
 
  /usage
 
== Model Context Protocol (MCP) ==
 
== Model Context Protocol (MCP) ==
 +
MCP Servers give Claude access to external services.
 +
 
it consist on two parts Client and Server like  
 
it consist on two parts Client and Server like  
  
Line 62: Line 64:
 
* replace API KEY with yours
 
* replace API KEY with yours
 
* exit and restart Claude
 
* exit and restart Claude
 +
 +
== Skills ==
 +
Skills are instructions that teach Claude how to do things
 +
 +
To see the skills enter the command below
 +
/skills
 +
To run the skill ie:deploy
 +
/deploy
 +
 +
=== Creating Skill ===
 +
in the '''accept edit mode''' write a prompt like :
 +
<pre>
 +
create a custom skill called deploy. When deploying, we should run all tests first, build the production bundle and push to the staging area.
 +
</pre>
 +
* it creates a file at '''.claude/skills/deploy.md'''
 +
* move it to '''.claude/skills/deploy/SKILL.md'''
 +
* review and fix necessary steps.
 +
* exit and restart Claude
 +
=== Adding Skills ===
 +
The marketplace for skills is : [https://skillsmp.com/]. Search the skill and install it with npx or whatever you want.
 +
 +
In the first time it installs skills library and select the skill and Claude Code. Install it project or global and select symlink.
 +
 +
Exit and restart to activate it.
 +
 +
If we add frontend-design skill. run it like :
 +
<pre>
 +
/frontend-design improve the look and feel of this app. Make it modern and polished
 +
</pre>

Revision as of 14:33, 16 April 2026


Course : Mosh Claude Code Course

Alternatives of Claude Code : CoPilot, Cursor, Windsurf

Installation

Choose the right installation for the OS from https://code.claude.com/docs

Using Claude Code

Upgrade to pro plan to use it in VS Code

Some commands

Open VS and open terminal inside of VS.

claude
/login 

to remember last session

claude --resume 
/terminal-setup

it installs Shift+enter to write multi line commands

Ctrl + L clear the command

To mention a file start the name with @ sign

commit 

it creates a git add and git commit with a meaningful commit message

/init Creates CLAUDE.md file

Plan Mode / Accept Edits On

Plan mode is to add a new feature. It plans the feature and waits for user to confirm it.

Shift + tab in claude prompt switches the modes.

Managing context window

to see the context usage

/context

Compacy / Clear the context

/compact
/clear

Tracking cost

/usage

Model Context Protocol (MCP)

MCP Servers give Claude access to external services.

it consist on two parts Client and Server like

Agent -> MCP Client -> MCP Server -> Github

Each MCP adds token to prompts. Use only necessary ones.

To see MCP servers

/mcp

to add or delete mcp servers

claude mcp add ....
claude mcp remove <SERVER_NAME>

Context 7

It's a MCP which gets the latest versions and the documentation

Skills

Skills are instructions that teach Claude how to do things

To see the skills enter the command below

/skills

To run the skill ie:deploy

/deploy

Creating Skill

in the accept edit mode write a prompt like :

 create a custom skill called deploy. When deploying, we should run all tests first, build the production bundle and push to the staging area.
  • it creates a file at .claude/skills/deploy.md
  • move it to .claude/skills/deploy/SKILL.md
  • review and fix necessary steps.
  • exit and restart Claude

Adding Skills

The marketplace for skills is : [1]. Search the skill and install it with npx or whatever you want.

In the first time it installs skills library and select the skill and Claude Code. Install it project or global and select symlink.

Exit and restart to activate it.

If we add frontend-design skill. run it like :

/frontend-design improve the look and feel of this app. Make it modern and polished