Claude Seekho

Claude Code

Claude Code is Anthropic's agentic coding tool. It runs in your terminal (and VS Code, JetBrains, the desktop app, web, Slack), reads the codebase, edits files, runs commands, runs tests, and creates git commits and PRs.

16.1 Install and start

# macOS / Linux / WSL (native installer)
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
# or via npm
npm install -g @anthropic-ai/claude-code

cd my-project
claude                      # interactive session
claude "fix this bug"  # start with a prompt
claude -p "give a summary" --output-format json   # headless / scripting
claude -c                   # continue the last conversation
claude -r                   # resume an old session (picker)

16.2 How it works

Claude Code agent loop
  1. 1.Gather context: read files, grep, git
  2. 2.Plan: decide the approach in plan mode
  3. 3.Act: edit files, bash commands
  4. 4.Verify: tests, build, lint
  5. 5.Repeat / report: until the work is done

Every tool call goes through the permission system

16.3 Memory: CLAUDE.md

FileScopeUse
Managed / enterprise policyThe whole organizationCompany-wide rules
~/.claude/CLAUDE.mdUser (all projects)Personal preferences
./CLAUDE.mdProject (committed to git)Build commands, architecture, conventions
CLAUDE.local.mdProject, only youPersonal project notes (gitignore)
Subfolder CLAUDE.mdWhen working in that folderModule-specific rules

The /init command scans the codebase and creates a starter CLAUDE.md. In CLAUDE.md you can import other files with @path/to/file. Keep it short and specific — it is loaded in every session.

# Project: Billing API (.NET 8)

## Commands
- Build: `dotnet build`
- Test: `dotnet test --filter Category!=Integration`

## Conventions
- Async method names end with `Async`.
- Never hand-edit EF Core migrations.
- Update `docs/api.md` on every public API change.

16.4 Slash commands (important)

CommandWhat it does
/initCreate CLAUDE.md
/clearClear the conversation (new task)
/compact [focus]Summarize history to save context
/contextHow full the context window is
/modelSwitch model (Opus, Sonnet, Haiku...)
/configSettings
/permissionsAllow/deny rules
/memoryEdit CLAUDE.md files
/mcpManage MCP servers, OAuth login
/agentsCreate/manage subagents
/hooksConfigure hooks
/pluginInstall plugins / marketplaces
/resumeOpen an old session
/review, /security-reviewCode review / security review
/cost, /usageTokens/cost and plan usage
/helpAll commands

Custom slash command: create a .claude/commands/fix-issue.md file (with the $ARGUMENTS placeholder) — it runs as /fix-issue 123. In newer versions these have merged with skills.

16.5 Keyboard shortcuts and input tricks

ShortcutWhat it does
Shift+TabCycle permission modes (default → accept edits → plan ...)
EscStop Claude midway
Esc EscRewind: go back to the previous message/checkpoint
@fileMention a file to put it in context
!commandRun a bash command directly, output goes into context
# / memoryQuickly add a note to memory (depends on version)
Ctrl+CCancel / exit
Image paste / dragGive a screenshot or design mockup

16.6 Permission modes

ModeBehavior
defaultAsks permission on every risky action (edit, bash)
acceptEditsAutomatically accepts file edits, asks on commands
planRead-only: only explore and plan, nothing changes
autoA classifier auto-approves safe actions, stops on risky ones
bypassPermissionsEverything allowed — only in an isolated sandbox/container
// .claude/settings.json (project, committed to git)
{
  "permissions": {
    "allow": ["Bash(dotnet test:*)", "Bash(git status)", "Read(./src/**)"],
    "deny":  ["Read(./.env)", "Bash(rm -rf:*)"]
  },
  "env": { "ASPNETCORE_ENVIRONMENT": "Development" }
}

Settings hierarchy (high → low priority): managed policy → command-line args → .claude/settings.local.json → .claude/settings.json → ~/.claude/settings.json.

16.7 Hooks

Hooks are shell commands that run deterministically on Claude Code lifecycle events — not left to the model. For example a formatter after every edit, or blocking a dangerous command.

EventWhen it runs
PreToolUseBefore a tool runs (you can block / modify)
PostToolUseAfter a tool runs (format, lint)
UserPromptSubmitWhen the user submits a prompt (add context / validate)
NotificationWhen Claude waits for permission or input
Stop / SubagentStopWhen the response ends
PreCompactBefore compaction
SessionStart / SessionEndSession start / end
{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Edit|Write",
      "hooks": [{ "type": "command", "command": "dotnet format --include $CLAUDE_FILE_PATHS" }]
    }]
  }
}

16.8 Subagents

A subagent is a specialized assistant that runs in its own separate context window, with its own tools and system prompt. The main conversation stays clean — the subagent returns only a summary. Create one with /agents or put a file in .claude/agents/.

---
name: test-runner
description: Runs tests after a code change and fixes failures. Use proactively.
tools: Read, Edit, Bash, Grep
model: sonnet
---
You are a test automation expert. Run the tests, if they fail find the root cause,
make a minimal fix, and run them again. Give a short report at the end.

16.9 Plugins, MCP and integrations

ItemWhat it is
PluginsA bundle of commands, subagents, skills, hooks, MCP servers; installed from a marketplace with /plugin
MCPConnect tools like GitHub, Jira, DB, Figma, Sentry (claude mcp add)
IDEVS Code / JetBrains extension: diff view, selection context
GitHub Actions/install-github-app; work starts by mentioning @claude in a PR/issue
Git worktreesSeveral Claude sessions in parallel on different branches
Headless modeclaude -p in CI/CD and scripts; --output-format stream-json
Claude Code on the webTasks in a cloud sandbox from the browser, also from mobile
CheckpointsA snapshot before every edit; you can rewind

16.10 Best workflow

  1. Explore: "First read the relevant files, do not write code yet."
  2. Plan: Have it make a plan in plan mode (Shift+Tab) and review it.
  3. Code: Have it implement, in small steps.
  4. Verify: Have it check with tests / build / screenshots (TDD is best).
  5. Commit: Have it write the commit message and create the PR.
  6. New unrelated task? /clear. Context filling up? /compact.