Skip to content
Search

Claude Code

lastmod 2026-10-27created 2025-06-10110 edits

An agentic coding tool made by Anthropic.

Claude Code is an agentic coding tool that runs in the terminal, understands your codebase, and helps you code faster through natural language commands. It integrates directly into your development environment and streamlines your workflow without extra servers or complex setup.

Categories

Cheat Sheet

A developer summary of the main commands, shortcuts, settings, environment variables, MCP servers, and agent configuration in the latest version of Claude Code

Projects

Claude Code Guide Agent

Using @"claude-code-guide (agent)" applies the official guide on Claude Code a bit better.

Install

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

Features

The main features of Claude Code are:

  • Edit files and fix bugs across the codebase
  • Answer questions about code architecture and logic
  • Run and fix tests, linting, and other commands
  • Search git history, resolve merge conflicts, create commits and PRs
  • Browse documentation and resources on the internet using web search
  • Works with Amazon Bedrock and Google Vertex AI for enterprise deployment

Why Claude Code?

Claude Code works directly in the terminal, understands the project context, and performs real work. Claude explores the codebase as needed, without you having to add files to the context manually.

Claude Ignore File

Use a .claudeignore file to prevent Claude from reading sensitive files.

CLAUDE.md

Writing a good Claude.md

Since LLMs are stateless functions, CLAUDE.md acts as the core document that introduces the codebase to Claude in every session

  • The file should concisely cover the project's WHAT (structure), WHY (purpose), and HOW (how it works); an excess of unnecessary instructions degrades performance
  • Following the instructions in its system message, Claude may ignore the contents of CLAUDE.md if it judges them to be of low relevance
  • An effective file contains only short, universally applicable information, with detailed guidance split into separate documents and managed through Progressive Disclosure
  • CLAUDE.md is the highest-leverage point of the agent harness, so it should be written carefully by hand instead of auto-generated

Hooks

  • Claude Code now supports hooks | GeekNews
  • Hooks - Anthropic
  • Custom hooks introduced in Claude Code. They let you control the app's behavior more precisely and repeatably, without relying on the LLM's choices
  • Enables various automations such as customizing notifications, auto-formatting code, and tracking command logs
  • Runs before/after command execution, when a notification fires, when a response completes, and so on, and can be managed at the project, user, and enterprise levels through settings files
  • Through the settings file structure and matchers, only specific hooks can be run when specific tools are called
  • Input is passed in JSON format, and output controls results and feedback through the exit code or JSON
  • Hooks automatically run shell commands with the user's full permissions, so care is needed for security and safety

Hook events overview

Claude Code provides several hook events that run at various points in the workflow:

  • PreToolUse - Runs before a tool call (can block it).
  • PostToolUse - Runs after a tool call completes.
  • UserPromptSubmit - Runs when the user submits a prompt, before Claude processes it.
  • Notification - Runs when Claude Code sends a notification.
  • Stop - Runs when Claude Code finishes responding.
  • SubagentStop - Runs when a subagent task completes.
  • PreCompact - Runs when Claude Code is about to run a compact operation.
  • SessionStart - Runs when Claude Code starts a new session or resumes an existing one.
  • SessionEnd - Runs when a Claude Code session ends.

Context management

Claude Code 1M Context

Why is 1M needed? -> In real development work, the 200K limit was hit often. The context limit was reached especially in the following situations:

  • Large-scale refactoring: analyzing dozens of files at once and making consistent changes
  • Long debugging sessions: error logs, stack traces, and related code pile up and quickly hit the limit
  • Understanding legacy codebases: getting the AI to grasp old code hundreds of thousands of lines long
  • Complex architecture analysis: understanding the interactions of multiple services as a whole

Changes in Compaction behavior:

One of the most noticeable changes after the introduction of the 1M context is how often Compaction happens:

  • 200K model: by default, Compaction occurs at ~190K tokens used (95% threshold)
  • 1M model: by default, Compaction occurs at ~950K tokens used
  • Practical effect: most coding sessions can be finished without Compaction

CLAUDE_CODE_AUTO_COMPACT_WINDOW

Directly specifies the token window size used for Compaction calculations. The default is the model's actual context window size.

  • Compaction trigger token count = CLAUDE_CODE_AUTO_COMPACT_WINDOW × CLAUDE_AUTOCOMPACT_PCT_OVERRIDE / 100
  • Default (1M model): Compaction at 1,000,000 × 0.95 = 950,000 tokens
  • Conservative setting (window=500K, pct=70): Compaction at 500,000 × 0.70 = 350,000 tokens

CLAUDE_CODE_MAX_OUTPUT_TOKENS

Sets the maximum number of output tokens. Raising this value allows longer responses, but Compaction may also occur sooner.

What is Compaction?

When the context approaches its limit, Claude Code automatically performs Compaction (compression).

It saves tokens by summarizing the earlier conversation, but subtle context loss can occur in the process.

With a 1M window, Compaction happens much later, so longer sessions can be kept at full context quality.

Viewing Compact results

You can run it manually with /compact {내용}.

You can see the messages shrink dramatically:

claude_code_-_context_example_01.png
claude_code_-_context_example_02.png
claude_code_-_context_example_03.png

Auto-Memory

A new persistent memory feature that keeps learnings across sessions has been added.

  • Automatically remembers project context, debugging experience, preferred approaches, and so on, and reuses that information in later sessions without separate input.
  • Claude automatically saves and recalls learnings even if the user doesn't record them separately
  • Separate roles for CLAUDE.md and MEMORY.md
    • CLAUDE.md is an instruction file written by the user, containing the rules and preferences Claude should follow
    • MEMORY.md is a note space that Claude updates itself, recording what it learned during sessions
      • When the user asks it to remember something with “remember …” or similar, it is saved to this file
  • The feature can be turned off with /memory
  • See the introductory tweet by Thariq of the Claude Code team (includes video)

Subagents

Create and use specialized AI subagents in Claude Code for task-specific workflows and improved context management.

Custom subagents in Claude Code are specialized AI assistants that can be invoked to handle specific types of tasks. They enable more efficient problem-solving by providing task-specific configurations with customized system prompts, tools, and a separate context window. ​ Subagents are pre-configured AI personalities to which Claude Code can delegate tasks. Each subagent:

  • Has a specific purpose and area of expertise
  • Uses its own context window, separate from the main conversation
  • Can be configured with specific tools it is allowed to use
  • Includes a custom system prompt that guides its behavior

When Claude Code encounters a task that matches a subagent's expertise, it can delegate the task to that specialized subagent, which works independently and returns the results.

Agent Teams

"Instead of the team lead relaying everything, let team members talk to each other directly and divide the work among themselves."

To enable it, set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS in settings.json or as an environment variable.

Subagent vs Agent Teams

Both agent teams and subagents can parallelize work, but they work differently. Choose based on whether the workers need to communicate with each other:

Subagents-vs-agent-teams-dark.png

Subagents only report results back to the main agent and never talk to each other. In an agent team, teammates share a task list, claim tasks, and communicate with each other directly.

Aspect

Subagent

Agent Teams

Context

Returns only a summaryIntermediate clues are lost

Keeps an independent contextCan be revisited later

Communication

Reports only to the mainNo direct conversation between teammates

Direct messages between teammatesFree communication

Coordination

The main manages everythingNeeds instructions every time

Shared task listPicks up the next task on its own

Cost

Session ends after the taskRelatively cheap

Keeps independent sessionsCosts number of teammates × tokens

Skills

Skills to use must be specified2

Shares the leader's context 3

In summary:

  • Subagent = a 'helper' that works alone when told and reports only the results. Suited to vertical, one-off tasks and cost-efficient.
  • Agent team = a 'team' that collaborates by talking to each other. Allows horizontal, autonomous collaboration, but costs more to keep running.

Skills

See ClaudeCode:Skills for details.

Headless mode

Run Claude Code programmatically without the interactive UI

Auto Mode

Enable it with the claude --enable-auto-mode command, then switch to it with Shift+Tab

Effort

/effort {모드}

low

Simple questions, typo fixes, renaming files

Shallow and fast

medium

General code writing, organizing documents (Opus 4.6 default)

Balanced

high

Complex bug analysis, architecture design, multi-file refactoring

Deep and slow

max

Deepest thinking, no token limit (Opus 4.6 only)

Maximum

Ultraplan

/ultraplan {내용}

Goal

  • /goal feature added to Claude Code too | GeekNews
  • /goal, a goal-based automatic repeat-execution feature, added to Claude Code
  • Claude automatically keeps running multiple turns until the goal is complete
  • After each turn ends, a fast model evaluates whether the goal has been achieved
  • If incomplete, the next turn starts automatically; if complete, the goal is removed automatically
  • The evaluator judges based on the conversation history, without checking files/commands directly
  • Only one goal can be active per session
  • The active goal is also restored on --resume, --continue
  • The Claude documentation describes it as a session-scoped Stop hook wrapper
  • Similar to /goal in Codex CLI, but the implementation is described differently
  • Codex centers on goal continuation / budget limit prompt templates
  • Claude describes goal within the framework of the Stop hook, /loop, and auto mode
  • auto mode is closer to automating tool approvals, /goal to automating turn repetition
  • Both tools are converging from chat-style assistants toward goal-based autonomous workers

Advisor tool

Boosting Sonnet's intelligence by using Opus as an advisor

TMUX focus-events

Suddenly the following message appeared at the bottom right of the console:

tmux focus-events off · add 'set -g focus-events on' to ~/.tmux.conf and reattach for focus tracking

Environment Variables

After setting up a proxy such as claude-code-router or LiteLLM, change the environment variables:

export ANTHROPIC_BASE_URL="http://localhost:8080/v1" # 프록시 주소
export ANTHROPIC_AUTH_TOKEN="dummy-key" # 로컬이므로 아무 값이나 입력
CLAUDE_CODE_AUTO_COMPACT_WINDOW
Directly specifies the token window size used for Compaction calculations. The default is the model's actual context window size.
CLAUDE_CODE_MAX_OUTPUT_TOKENS
Sets the maximum number of output tokens. Raising this value allows longer responses, but Compaction may also occur sooner.
MAX_THINKING_TOKENS
Enables extended thinking and sets the token budget.
Lower the MAX_THINKING_TOKENS environment variable from the default 31,999 to 10,000.
This is how much the AI thinks internally before answering, and this amount is enough for most tasks. It can cut hidden costs by about 70%.
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE
Environment variable that sets the threshold (%) at which automatic text compression (Compaction) kicks in.
Setting a value lower than the default 95% (e.g., 50) starts compression before the context fills up, which prevents Context Rot and reduces costs.
CLAUDE_CODE_SUBAGENT_MODEL
There is no need to use an expensive model for the subagents that play a supporting role in Claude Code work. Set it to "haiku".
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
Enables agent teams.

How to undo workspace trust

If you mistakenly pressed Yes to trust the workspace at /home/myname/Project and want to undo it, remove it with rm -rf ~/.claude/projects/-home-myname-Project/.

Removing user settings files

Remove the following two files:

  • ~/.claude/
  • ~/.claude.json

Marketplace

Working with HTML/CSS? Add the frontend-design plugin:

/plugin marketplace add anthropics/claude-code
/plugin install frontend-design@claude-code-plugins

install-github-app

gh must be installed and logged in (gh auth login). Then the following message is printed:

Select GitHub workflows to install
  We'll create a workflow file in your repository for each one you select.

  More workflow examples (issue triage, CI fixes, etc.) at: https://github.com/anthropics/claude-code-action/blob/main/examples/

  ❯ @Claude Code - Tag @claude in issues and PR comments ✔
    Claude Code Review - Automated code review on new PRs ✔

  You must select at least one workflow to continue

  ↑↓ to navigate · Space to toggle · Enter to confirm · Esc to cancel

Translated into Korean:

설치할 GitHub 워크플로를 선택하세요. 선택한 워크플로마다 저장소에 워크플로 파일이 생성됩니다.

더 많은 워크플로 예시(이슈 분류, CI 수정 등)는 다음 링크에서 확인하세요. https://github.com/anthropics/claude-code-action/blob/main/examples/

❯ @Claude Code - 이슈 및 PR 댓글에 @claude 태그 추가 ✔
❯ Claude Code Review - 새 PR에 대한 자동 코드 리뷰 ✔

계속하려면 최소 하나 이상의 워크플로를 선택해야 합니다.

↑↓ 키를 눌러 이동 · Space 키를 눌러 토글 · Enter 키를 눌러 확인 · Esc 키를 눌러 취소

The list of added Github Actions is as follows (as of 2026-03-06):

  • ci-failure-auto-fix.yml
  • claude.yml
  • issue-deduplication.yml
  • issue-triage.yml
  • manual-code-analysis.yml
  • pr-review-comprehensive.yml
  • pr-review-filtered-authors.yml
  • pr-review-filtered-paths.yml
  • test-failure-analysis.yml

Once everything is installed, the following is opened as a PR.

🤖 Installing the Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code integration in the repository.

What is Claude Code?

Claude Code is an AI coding agent that can help with tasks such as:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And many other tasks

How it works

Once this PR is merged, you can interact with Claude by mentioning @claude in a PR or issue comment. When the workflow is triggered, Claude analyzes the comment and surrounding context and executes the request in a GitHub Action.

Important notes

  • This workflow only takes effect after the PR is merged
  • @claude mentions only work once the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in a PR or issue comment
  • Claude can access the full context of the PR or issue, including files, diffs, and previous comments

Security

  • The Anthropic API key is stored securely as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with the repository, such as writing comments, creating branches, and committing
  • You can extend the allowed tools by adding them to the workflow file as shown below:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

See the Claude Code action repository for details.

After merging the PR, get started by mentioning @claude in a comment on any PR!

Claude Code : Best practices

In summary:

  • Shares his actual work environment and workflow, describing how he runs 5 Claudes in parallel in the terminal and another 5-10 on the web
  • Uses Opus 4.5 with thinking for all work; it is large and slow, but needs less steering and is excellent at tool use, so it ends up faster
  • The whole team shares one CLAUDE.md file and adds to it every time Claude does something wrong, so the learning accumulates
  • Uses a pattern of starting most sessions in Plan mode, refining the plan thoroughly, then switching to auto-accept mode to finish in one go
  • Giving Claude a feedback loop to verify its own work is the single most important factor, improving the quality of the final output 2-3x

Claude Code gets smarter when you use Ultrathink

Anthropic published documentation on advanced usage of Claude Code, its Claude-based CLI agent tool. Using certain keywords ("think", "ultrathink", etc.) makes Claude use more compute resources (tokens) and think more deeply

  • "think" → 4,000 tokens, "megathink" → 10,000 tokens, "ultrathink" → up to 31,999 tokens allocated
  • This was confirmed directly in Claude Code's internal code, and appears to be a feature of Claude Code rather than of Claude itself
  • Developers can use this feature to make Claude, as an agentic coding tool, handle complex problems more effectively

How to use every Claude Code feature

  • How I use every Claude Code feature | GeekNews
  • Based on extensive use of Claude Code in personal projects and an enterprise monorepo, describes how the core components and advanced features are used in practice
  • The key to running agents effectively is the quality of the final PR, not the output style or UI, and the goal is "shoot and forget" delegation
  • The center of the codebase is the CLAUDE.md file, which acts as a “constitution” defining the agent's behavior rules and tool usage
  • Raises the level of collaboration and automation through features such as context management, slash commands, subagents, Hooks, and GitHub Action (GHA)
  • Distinguishes the relationship between Skills and MCP (Model Context Protocol), emphasizing a flexible, scripting-centered agent structure
  • Provides a practical guide to extending Claude Code from a simple CLI tool into enterprise-grade AI development infrastructure

How Claude Code creator Boris Cherny uses Claude Code

Setting up a parallel environment

  • Runs 5 Claudes in parallel in the terminal, numbers the tabs 1-5, and uses system notifications to know when input is needed

Running web and local in parallel

  • Runs another 5-10 Claudes in parallel on the claude.ai/code web as well, alongside the local Claudes
  • Hands off local sessions to the web (using &), starts sessions directly in Chrome, and switches in both directions with --teleport
  • Also starts several sessions from the iOS app every morning and during the day, and checks on them later

Model choice: Opus 4.5 with thinking

  • Uses Opus 4.5 with thinking for all work
  • The best coding model he has used so far
  • Larger and slower than Sonnet, but needs less steering and is excellent at tool use
  • As a result, it almost always reaches the final result faster than smaller models

Team-level knowledge accumulation through CLAUDE.md

  • Keeps a single CLAUDE.md file in the Claude Code repository, shared by the whole team
  • Checked into git, with the whole team contributing several times a week
  • Every time Claude does something wrong, it is added to CLAUDE.md to prevent the same mistake next time
  • Other teams keep their own CLAUDE.md as well, and each team is responsible for keeping it up to date

Updating CLAUDE.md during code review

  • During code review, tags @.claude on coworkers' PRs to add to CLAUDE.md as part of the PR
  • Uses the Claude Code GitHub Action (/install-github-action)
  • Similar to Dan Shipper's concept of Compounding Engineering

Plan mode and auto-accept workflow

  • Starts most sessions in Plan mode (shift+tab twice)
  • If the goal is a PR, goes back and forth with Claude in Plan mode until satisfied with the plan
  • Once the plan is settled, switching to auto-accept edits mode usually lets Claude finish it in one go (1-shot)
  • A good plan really matters

Automating repetitive work with slash commands

  • Uses a slash command for every "inner loop" workflow done many times a day
  • Saves repeated prompting, and Claude can use these workflows too
  • Commands are checked into git and stored in the .claude/commands directory
  • E.g., uses the /commit-push-pr slash command dozens of times every day
    • Precomputes information such as git status with inline bash for fast execution and to avoid unnecessary round trips with the model

Using subagents

  • Uses several subagents regularly
    • code-simplifier: simplifies code after Claude finishes its work
    • verify-app: contains detailed instructions for end-to-end testing of Claude Code
  • Like slash commands, the idea is to automate the most common workflows done in most PRs

Code formatting with the PostToolUse hook

  • Uses a PostToolUse hook to handle Claude's code formatting
  • Claude generates well-formatted code by default, and the hook handles the remaining 10% to prevent formatting errors in CI later

Managing permissions

  • Doesn't use --dangerously-skip-permissions
  • Instead uses /permissions to pre-allow common bash commands known to be safe in his environment
  • Avoids unnecessary permission prompts
  • Mostly checked into .claude/settings.json and shared with the team

Using Claude Code's tool integrations

  • Claude Code uses all the tools on his behalf
    • Searching and posting on Slack (via the MCP server)
    • Answering analytics questions by running BigQuery queries (bq CLI)
    • Fetching error logs from Sentry
  • The Slack MCP configuration is checked into .mcp.json and shared with the team

Handling long-running tasks

  • For very long tasks, picks one of three approaches:
    • (a) Prompts Claude to verify its work with a background agent when it's done
    • (b) Uses an agent Stop hook to verify more deterministically
    • (c) Uses the ralph-wiggum plugin devised by Geoffrey Huntley
  • In a sandbox, uses --permission-mode=dontAsk or --dangerously-skip-permissions so Claude can focus on the work without permission prompts

Most important tip: provide a verification feedback loop

  • The most important factor for getting great results from Claude Code: give Claude a way to verify its work
  • With this feedback loop, the quality of the final output improves 2-3x
  • Claude tests every change it lands on claude.ai/code with the Claude Chrome extension
    • Opens a browser, tests the UI, and iterates until the code works and the UX is good
  • How to verify differs by domain
    • It can be as simple as running a bash command
    • Running a test suite
    • Testing the app in a browser or phone simulator
  • It is worth investing in making this verification process robust

Practical usage tips shared by the creator of Claude Code

Make the most of parallel work

  • Running 3-5 git worktrees at once, each with its own Claude session in parallel, is the top productivity tip inside the Claude Code team
  • Some prefer git checkout, but most Claude Code team members prefer worktrees
    • This is why native worktree support was added to the Claude Desktop app
  • Some name their worktrees and set up shell aliases (za, zb, zc) to switch with a single keystroke
  • Some team members keep a separate "analysis" worktree just for reading logs and running BigQuery

Always start complex tasks in Plan Mode

  • Start complex tasks in plan mode and pour energy into planning so Claude can complete the implementation in one go
  • Another approach: have one Claude write the plan, then spin up a second Claude to review it as a staff engineer
  • The moment things go sideways, go back to plan mode immediately and re-plan; don't keep pushing
  • Explicitly telling it to enter plan mode for the verification step is effective too

Keep investing in CLAUDE.md

  • After every correction, instruct "Update CLAUDE.md so you don't repeat the same mistake"
  • Claude is very good at writing down rules for itself
  • Keep revising CLAUDE.md over time, repeating until Claude's mistake rate measurably drops
  • One engineer keeps a notes directory for every task/project, tells Claude to update it with every PR, and points CLAUDE.md at it

Create your own Skills and commit them to git

Tips from the Claude Code team:

  • Turn anything you do more than once a day into a Skill or Slash Command
  • Create a /techdebt slash command to find and remove duplicated code at the end of a session
  • Set up a slash command that syncs 7 days of Slack, GDrive, Asana, and GitHub into a single context dump
  • Build an analytics-engineer style agent that writes dbt models, reviews code, and tests in the dev environment
  • Learn more: Extend Claude with skills

Let Claude fix bugs

  • Enable Slack MCP, paste a Slack bug thread into Claude, and just type "fix" to fix it without switching context
  • Or just say "Go fix the failing CI tests" and leave the how to Claude
  • Hand docker logs to Claude to troubleshoot distributed systems — it is surprisingly capable

Level up your prompting

  • Use Claude as a reviewer by instructing "Review these changes rigorously, and don't make a PR until I pass your test"
  • Say "Prove to me this works" and have it diff the behavior between the main branch and the feature branch
  • When you get a mediocre fix, instruct "Knowing everything you know now, scrap this and implement the elegant solution"
  • Writing detailed specs and removing ambiguity before handing off work is the key to better output

Terminal and environment setup

  • The Claude Code team prefers the Ghostty terminal
    • Strengths: synchronized rendering, 24-bit color, and proper Unicode support
  • Customize the status bar with /statusline to always show context usage and the current git branch
  • Color-code and name terminal tabs and use tmux — one tab per task/worktree
  • Recommends using voice dictation
    • You speak 3x faster than you type, and prompts get much more detailed
    • On macOS, enable it by pressing the fn key twice
  • Additional tip: Optimize your terminal setup

Using subagents

  • Add "use subagents" to a request when you want Claude to throw more compute at it
  • Delegate individual tasks to subagents to keep the main agent's context window clean and focused
  • Set up a hook that routes permission requests to Opus 4.5 — it scans for attacks and auto-approves safe requests

Using Claude for data and analytics

  • Ask Claude Code to use the "bq" CLI to pull and analyze metrics on the fly
  • A BigQuery skill is checked into the codebase, and the whole team runs analytics queries directly in Claude Code
  • Hasn't written SQL by hand in over 6 months
  • Works the same for any database that has a CLI, MCP, or API

Learning with Claude

  • Enable the "Explanatory" or "Learning" output style in /config and Claude explains the why behind its changes
  • Ask it to generate a visual HTML presentation explaining unfamiliar code — it makes surprisingly good slides
  • Ask it to draw ASCII diagrams to understand new protocols and codebases
  • Build a spaced-repetition learning skill
    • The user explains what they understood, Claude asks follow-up questions to fill the gaps, and the results are saved

Making Claude Code the best design partner

Prompt engineering#Making Claude Code the best design partner

The complete Claude Code guide: 70 power tips from a hackathon winner

Each tip comes with commands, scripts, and configuration files you can actually use

  1. The agentic developer's mindset
    1. The first step to conquering big problems: divide and conquer (ykdojo #3)
    2. Plan mode vs. YOLO mode (Ado #18, #19)
    3. Context: the art of mastering the AI's memory (ykdojo #5, #8, Ado #15)
    4. Choosing the right level of abstraction (ykdojo #32)
    5. Be braver in unknown territory (ykdojo #35)
  2. Solid fundamentals - environment setup and essential commands
    1. See everything at a glance with a custom status line (ykdojo #0)
    2. Mastering the essential slash commands (ykdojo #1, Ado #4, #16, #17)
    3. CLAUDE.md: a project manual for the AI (Ado #1, #2, ykdojo #30)
    4. Quick access with terminal aliases (ykdojo #7)
    5. Session management: how not to lose your conversations (Ado #9, #10, #11, #12)
  3. Core techniques for maximum productivity
    1. Coding by voice (ykdojo #2)
    2. The art of extracting terminal output (ykdojo #6)
    3. Cmd+A/Ctrl+A: the power of select all (ykdojo #10)
    4. Using Markdown and Notion (ykdojo #19, #20)
    5. Mastering keyboard shortcuts (Ado #5, #6, #7, #8, ykdojo #38)
    6. Editing prompts in Vim mode (Ado #13)
    7. Navigating and editing the input box (ykdojo #38)
  4. The art of context management
    1. Proactive context compaction (ykdojo #8)
    2. Multitasking with terminal tabs (ykdojo #14)
    3. Cloning and half-cloning conversations (ykdojo #23)
    4. X-ray vision with /context (Ado #15)
    5. Getting absolute paths with realpath (ykdojo #24)
  5. Mastering Git and GitHub workflows
    1. Using Git and the GitHub CLI like a pro (ykdojo #4)
    2. Parallel branch work with Git worktrees (ykdojo #16)
    3. Interactive PR review (ykdojo #26)
    4. Auditing approved commands (ykdojo #33)
  6. Advanced features - MCP, Hooks, Agents
    1. MCP: connecting to the outside world (Ado #22, #23, #24, #25)
    2. Hooks: enforcing rules (Ado #26)
    3. Skills: reusable knowledge (Ado #27)
    4. Agents: specialized subagents (Ado #28)
    5. Plugins: feature bundles (Ado #29)
    6. CLAUDE.md vs Skills vs Slash Commands vs Plugins (ykdojo #25)
  7. System optimization and automation
    1. Slimming down the system prompt (ykdojo #15)
    2. Manual exponential backoff for long-running tasks (ykdojo #17)
    3. Running bash commands and agents in the background (ykdojo #36)
    4. Automating automation (ykdojo #41)
    5. CI/CD integration with Headless mode (Ado #30)
  8. Containers and sandboxes
    1. Isolating risky work in containers (ykdojo #21)
    2. Sandbox mode and permission management (Ado #20)
    3. YOLO mode: when to take the risk (Ado #20)
  9. Browser integration and web automation
    1. Native browser integration (Ado #21)
    2. Playwright MCP (Ado #22)
    3. Gemini CLI as a fallback (ykdojo #11)
  10. Real-world use cases
    1. Completing the write-test cycle (ykdojo #9)
    2. Investing in your own workflow (ykdojo #12)
    3. Searching conversation history (ykdojo #13)
    4. Using it as a writing assistant (ykdojo #18)
    5. Using it as a research tool (ykdojo #27)
    6. Mastering ways to verify output (ykdojo #28)
    7. Using it as a DevOps engineer (ykdojo #29)
    8. Using it as a universal interface (ykdojo #31)
    9. Writing lots of tests (TDD) (ykdojo #34)
    10. Simplifying complex code (ykdojo #40)
  11. Advanced patterns and philosophy
    1. Balancing planning and rapid prototyping (ykdojo #39)
    2. The era of personalized software (ykdojo #37)
    3. Using it is the best way to learn (ykdojo #22)
    4. Sharing knowledge and contributing (ykdojo #42)
    5. Keep learning (ykdojo #43)
  12. Advanced features and the SDK
    1. Extended Thinking (Ado #19)
    2. LSP integration (Ado #31)
    3. Claude Agent SDK (Ado #31)
    4. Team settings and shared workflows (Ado #30)
  13. Learning roadmap and next steps
    1. Roadmap for beginners (1-3 months)
    2. Roadmap for intermediate users (3-12 months)
    3. Roadmap for advanced users (1+ years)
    4. Must-read references

15 hidden powerful features of Claude Code

Claude Code creator Boris Cherny lists hidden or underused features such as the mobile app, automatic scheduling, session forking, and parallel worktrees

  • The Code tab in the iOS/Android apps lets you write code without a laptop, and the --teleport command moves sessions between mobile, web, desktop, and terminal
  • /loop and /schedule let you set up automatically repeating tasks for up to a week, fully automating PR management, code review, Slack feedback, and more
  • The /batch command fans out dozens to thousands of worktree agents in parallel, useful for large-scale code migrations and similar work
  • The --bare flag can make SDK startup up to 10x faster, and is planned to become the default

Mobile app

  • Claude Code supports iOS/Android mobile apps, accessible from the Code tab on the left side of the app
  • A convenient way to make code changes without opening a laptop

Moving sessions between mobile, web, desktop, and terminal

  • With claude --teleport or the /teleport command, a cloud session can be continued on the local machine
  • With the /remote-control command, a session running locally can be controlled remotely from a phone or the web
    • Can be kept always on with the "Enable Remote Control for all sessions" setting in /config

/loop and /schedule

  • /loop and /schedule are among the most powerful features of Claude Code, letting you schedule automatic runs for up to a week at a time
  • Real-world examples:
    • /loop 5m /babysit — automatically handles code review, rebases automatically, and shepherds PRs all the way to production
    • /loop 30m /slack-feedback — automatically creates PRs from Slack feedback every 30 minutes
    • /loop /post-merge-sweeper — automatically creates PRs that address missed code review comments
    • /loop 1h /pr-pruner — automatically closes stale or unnecessary PRs
  • Turning workflows into skills + loops enables powerful automation

Hooks

  • Hooks let you insert deterministic logic at each stage of the agent lifecycle
  • Examples:
    • SessionStart — dynamically loads context when Claude starts
    • PreToolUse — logs every bash command the model runs
    • PermissionRequest — routes permission requests to WhatsApp to approve or deny them directly
    • Stop — nudges Claude to keep going whenever it stops
  • Official documentation: https://code.claude.com/docs/en/hooks

Cowork Dispatch

  • Dispatch is a secure remote control feature of the Claude Desktop app that can check Slack and email, manage files, and work on your laptop while you are away
  • Can use MCP, the browser, and computer resources with the user's permission

Chrome extension — frontend work

  • A core principle of Claude Code: Claude needs a way to verify its output directly in order to iterate and improve
    • If you ask it to build a website without a browser, the result will inevitably be poor; give it a browser and it writes code and iterates until the result is good
  • The Chrome/Edge extension works more reliably than similar MCPs for web code work

Claude Desktop app — running and testing web servers automatically

  • The Desktop app bundles a feature that lets Claude run web servers automatically and test them in a built-in browser
  • In the CLI or VSCode, similar functionality is possible through the Chrome extension

Forking sessions (Fork)

  • Two ways to fork an existing session:
    • Run the /branch command inside a session
    • Run claude --resume <session-id> --fork-session from the CLI

/btw — side queries

  • A side query feature that lets you ask quick questions while the agent is working

Git Worktrees

  • Claude Code has deep support for git worktrees, which are essential when running many parallel tasks in the same repository
  • Start a new worktree session with the claude -w command, or use the "worktree" checkbox in the Claude Desktop app
  • Users of a non-git VCS can customize the worktree creation logic with the WorktreeCreate hook

/batch — large-scale parallel fan-out

  • /batch interviews you to determine the scope of the work, then distributes it across dozens to thousands of worktree agents
  • Especially useful for parallelizable work such as large-scale code migrations

--bare flag — optimizing SDK startup speed

  • By default, running claude -p or the TypeScript/Python SDK automatically discovers the local CLAUDE.md, settings, and MCP
  • For non-interactive use, specifying them explicitly with --system-prompt, --mcp-config, --settings, etc. is more appropriate
  • Using the --bare flag can make SDK startup up to 10x faster
    • Because of a shortcoming in the initial design, it is currently opt-in, and is planned to become the default in a future version

--add-dir — access to multiple repositories

  • The --add-dir or /add-dir command gives Claude permission to access and work in additional folders
  • Adding "additionalDirectories" to the team-shared settings file settings.json makes Claude Code always load those folders automatically on startup

--agent — custom agents

  • After defining agents in the .claude/agents directory, you can specify a custom system prompt and tools with the claude --agent=<name> command
  • A powerful but often overlooked feature; see the official documentation: https://code.claude.com/docs/en/sub-agents

/voice — voice input

  • Code by voice with the /voice command
    • CLI: run /voice, then hold the spacebar
    • Desktop: click the voice button
    • iOS: enable the dictation setting

A mere 65-line Markdown file that tries to fix the LLM coding problems pointed out by Andrej Karpathy

A mere 65-line Markdown file (CLAUDE.md) that tries to fix the LLM coding problems pointed out by Andrej Karpathy became explosively popular on GitHub, causing a sensation among Claude Code users: “just add this one file and the AI gets much smarter.”

File contents: 4 core principles (inspired by Karpathy's critique of LLM coding)

  • Think Before Coding: state assumptions, ask when uncertain, stop when confused
  • Simplicity First: don't add features, abstractions, or error handling that weren't requested
  • Surgical Changes: change only what was requested and leave the rest alone
  • Goal-Driven Execution: turn tasks into concrete goals, like “make the tests pass” instead of “add a feature”

Users poured in reports that injecting these principles as a prompt makes Claude show less excessive creativity, fewer odd assumptions, and less unnecessary refactoring, and write more stable, predictable code.

# CLAUDE.md

Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.

**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.

## 1. Think Before Coding

**Don't assume. Don't hide confusion. Surface tradeoffs.**

Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.

## 2. Simplicity First

**Minimum code that solves the problem. Nothing speculative.**

- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

## 3. Surgical Changes

**Touch only what you must. Clean up only your own mess.**

When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.

When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.

The test: Every changed line should trace directly to the user's request.

## 4. Goal-Driven Execution

**Define success criteria. Loop until verified.**

Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan:
1. [Step] → verify: [check] 2. [Step] → verify: [check] 3. [Step] → verify: [check]
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.

---

**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.

A real developer's practical workflow

See Vibe coding#A real developer's practical workflow.

The Claude hacking incident

Troubleshooting

Calling jobstart from a Neovim plugin doesn't run it

You need to add the 'pty': v:true option.

A specific Bash command is allowed even though it isn't in settings.json

Check the project memory:

~/.claude/projects/-home-user-myproj/memory/MEMORY.md

Write(.env) is not matched by file permission checks — only Edit(path) rules are. Use Edit(.env) instead

Problem: In the permission deny rules of .claude/settings.json, the Write(.env*) pattern doesn't actually match anything.

Permission deny rule (../../.claude/settings.json): Write(.env*) is not matched by file permission checks — only Edit(path) rules are. Use Edit(.env*) instead (Edit rules cover all file-editing tools).

Cause

  • The file permission check system only recognizes rules of the form Edit(path)
  • The Write(...) form is not checked (i.e., the rule does nothing)
  • Edit rules apply not only to Edit but to all tools that modify files (including Write)

Solution

To block writing/modifying .env files, change it as follows:

{
  "permissions": {
    "deny": [
      "Edit(.env*)"
    ]
  }
}

In other words, you must change Write(.env*) → Edit(.env*) for it to actually block anything.

grep on '...' after a cd would search a directory that cannot be determined here, and a Read() deny rule is configured; only you can approve running it anyway.

A workaround for the issue of permission checks suddenly increasing in ClaudeCode. Permission prompts related to the following message became more frequent:

grep on '...' after a cd would search a directory that cannot be determined here, and a Read() deny rule is configured; only you can approve running it anyway.

In short, add the following to the CLAUDE.md file:

## Bash command rules

Do not chain `cd DIR && <command>`.
Address files by absolute path, and use the tool's own directory flag when a command must run elsewhere: `git -C DIR`, `make -C DIR`, `npm --prefix DIR`, `pytest DIR`.
A subshell (`cd DIR && ...`) counts as the same compound.

See also

  • Claude
  • Vibe Coding
  • Claude Squad - a terminal workspace management tool for multiple AI code agents
  • Claude Code Router - open source that routes Claude Code requests to various models
  • Omnara - run Claude Code from anywhere
  • Claudia - a desktop companion for Claude Code
  • opcode - a powerful GUI app & toolkit for Claude Code
  • GitHub Copilot CLI
  • Claude Code Action - a general-purpose action for code Q&A and automated fixes in GitHub PRs and issues
  • Continuous Claude - a workflow tool that runs Claude Code repeatedly to automate PR creation, checks, and merging
  • claude-code-router
  • LiteLLM - Python SDK, Proxy Server (AI Gateway) to call 100+ LLM APIs
  • Open Code - an AI coding agent for the terminal
  • claude-mem - a memory compression system for keeping context across Claude Code sessions
  • Claudable - an open-source web builder using local CLI agents
  • Claude Chill - fixing Claude Code flicker in the terminal
  • OpenWork - an OpenCode-based alternative to Claude Cowork
  • Clopus-watcher - an autonomous 24/7 on-call engineer in the style of Claude Code - an AI-based monitoring tool aimed at automating incident response in Kubernetes environments
  • Fluid - Claude Code for infrastructure
  • ccusage - a CLI tool for analyzing Claude Code/Codex usage
  • Cloudrouter - a skill that lets Claude Code/Codex spin up cloud VMs and GPUs
  • Call-me - Claude Code calls you on the phone
  • Context Mode - an MCP server that cuts Claude Code's context consumption by 98%
  • ClaudeTuner - a usage tracking tool built out of curiosity: "Am I really using as much as this plan gives me?"
  • CodexBar - conveniently view usage stats for Codex/Claude Code and others
  • OpenGenerativeUI - an open-source AI-based generative UI framework. (Reimplements the interactive visual generation feature released by Claude)
  • claw-code - a Python clean-room rewrite project based on the leaked Claude Code source
  • Claw-Empire - an AI agent empire commanded from the CEO's desk
  • Paperclip - open source that runs your company with AI
  • Korean: 컨텍스트 부패 (Context Rot)

Favorite site

Tutorials

Guides

Articles

References


  1. Cc.storyfox.cz_-Claude_Code_Cheat_Sheet-_Windows.pdf ↩

  2. Create custom subagents - Claude Code Docs # Supported frontmatter fields ↩

  3. Orchestrate teams of Claude Code sessions - Claude Code Docs # Context and communication ↩

  4. Claude_Code_Complete_Guide_-_70_Power_Tips_from_a_Hackathon_Worker.pdf ↩

author Zer0 sitemap