Claude Cli

Claude Cli

The following are the summarized topics/concepts one must know inorder to use claude cli:

  • Claude.md
  • Permissions
  • Plan mode
  • Checkpoints
  • Skills
  • Hooks
  • MCP
  • Plugins
  • Context
  • Slash Commands
  • Compaction
  • Subagents

Slash Commands

# Setup terminal
/terminal-setup 

# Set theme
/theme 

# Setup configurations
/config

# Set model (Select model and efforts - with left/right arrows)
/model 

# Name the conversation
/rename <name>

# Resume the conversation
/resume <name>

# Create initial instructions
/init

By default thinking mode is enabled, disable by typing Options + T and toggle the thinking mode. This may help reduce the token consumption

Further, you can run the commands via claude cli by append ! . For example, to list the files:

! ls -l

Configure MCP Server

Edit .claude.json file or use command line:

# Add MCP Service
claude mcp add <name> --scope [user|local]
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer <PAT>"}}' --scope user

claude mcp add azure --scope user -- npx -y @azure/mcp@latest server start

# List MCP Service
claude mcp list

# Remove MCP Service
claude mcp remove <name>

Local scope:  A local-scoped server loads only in the project where you added it and stays private to you. Claude Code stores it in ~/.claude.json

Project-scoped servers enable team collaboration by storing configurations in a .mcp.json file at your project’s root directory. 

User-scoped servers are stored in ~/.claude.json and provide cross-project accessibility, making them available across all projects on your machine while remaining private to your user account. 

Skill

Skill is a feature in agentic system, where in you teach the system to perform tasks. Think of it as writing algorithms for a specific problem, but quite literally in simple plain English. The agentic system reads these skills file and performs the actions accordingly.

Workspaces

Plugins

/plugin install superpowers@claude-plugins-official

The basic workflow superpowers can offer:

The Basic Workflow

  1. brainstorming – Activates before writing code. Refines rough ideas through questions, explores alternatives, presents design in sections for validation. Saves design document.
  2. using-git-worktrees – Activates after design approval. Creates isolated workspace on new branch, runs project setup, verifies clean test baseline.
  3. writing-plans – Activates with approved design. Breaks work into bite-sized tasks (2-5 minutes each). Every task has exact file paths, complete code, verification steps.
  4. subagent-driven-development or executing-plans – Activates with plan. Dispatches fresh subagent per task with two-stage review (spec compliance, then code quality), or executes in batches with human checkpoints.
  5. test-driven-development – Activates during implementation. Enforces RED-GREEN-REFACTOR: write failing test, watch it fail, write minimal code, watch it pass, commit. Deletes code written before tests.
  6. requesting-code-review – Activates between tasks. Reviews against plan, reports issues by severity. Critical issues block progress.
  7. finishing-a-development-branch – Activates when tasks complete. Verifies tests, presents options (merge/PR/keep/discard), cleans up worktree.