mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-24 23:06:33 +08:00
chore: sync content to repo (#9615)
Co-authored-by: kamranahmedse <4921183+kamranahmedse@users.noreply.github.com>
This commit is contained in:
co-authored by
kamranahmedse
parent
0b6a6cad47
commit
0f5818451b
@@ -0,0 +1,3 @@
|
||||
# File Path Mentions (@)
|
||||
|
||||
File path mentions, triggered by typing the `@` symbol followed by a filename or folder, allow you to manually point the AI toward specific parts of your codebase. This creates a direct reference that prioritizes those files in the current conversation, ensuring the assistant analyzes the exact code you are interested in without having to search your entire project first. It supports autocomplete, so as you type after the @ symbol, a list of matching files appears, allowing you to quickly select the correct path and add it to the conversation context.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Multiline input (\)
|
||||
|
||||
Multiline input allows you to format complex instructions across several lines without immediately sending the prompt to the AI. The fastest way to create multiline input is by typing `\` followed by `Enter`. This works in all terminals by default and tells the system to treat the next line as a continuation of the current one. However, depending on your terminal and configuration, alternative methods may be available.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Bash Mode (!)
|
||||
|
||||
Bash Mode (triggered by prefixing your input with an exclamation mark !) is a powerful feature that allows you to execute shell commands directly on your machine without involving the Claude Code's reasoning or consuming any tokens. While the AI assistant normally uses the "Bash tool" to run commands on your behalf (which costs money and takes time for the model to "think"), Bash Mode is your direct line to the terminal.
|
||||
@@ -0,0 +1,3 @@
|
||||
# claude --add-dir
|
||||
|
||||
The `claude --add-dir` command is a startup flag that allows you to include extra folders in your working session before the interface even opens. By providing one or more directory paths when you launch the tool (for example, `claude --add-dir ../library --add-dir ./docs`), you grant the assistant permission to read and modify files in those external locations alongside your current project. This is particularly useful for cross-repository tasks, such as updating a shared library and its dependent application simultaneously, as it ensures the AI has a unified view of all relevant codebases from the very first prompt.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Agent Team
|
||||
|
||||
Agent Teams are an experimental multi-agent orchestration feature in Claude Code that allows you to coordinate multiple AI instances working in parallel on a single project. Unlike standard subagents, which operate in silos and only report back to a parent, Agent Teams function as a collaborative network where a designated Team Lead manages a shared task list and delegates work to Teammates who can message each other directly to share findings or debate solutions. This approach is specifically designed to handle "wide" tasks—such as simultaneous cross-layer feature development (frontend, backend, and tests) or deep debugging where different agents test competing hypotheses—by giving each agent its own independent context window to prevent token bloat in the main session.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /agents
|
||||
|
||||
The `/agents` command is a specialized management interface used to create, configure, and orchestrate sub-agents within your Claude Code environment. This command transitions from a single-assistant model to a multi-agent workflow, allowing you to delegate specific types of work—like security auditing, unit testing, or architectural planning—to "specialists" that have their own isolated context windows and tailored system prompts.
|
||||
@@ -0,0 +1,3 @@
|
||||
# API Usage
|
||||
|
||||
Claude Console authentication uses a pay-as-you-go model where the tool connects directly to the Anthropic API using a personal API key rather than a flat-rate monthly subscription. To set this up, you must first create an account at the Claude Console, generate a secret API key, and ensure you have a balance of credits in your account. This mode is ideal for power users or developers who prefer to pay only for the specific amount of data—or tokens—processed during their coding sessions. Because this connection communicates directly with the API, it also allows you to choose specific model versions and provides more granular control over your billing and usage thresholds.
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Be mindful of extensions
|
||||
|
||||
Carefully managing extensions—such as MCP servers, skills, and subagents—is vital because every active integration consumes a portion of Claude’s finite context window, and excessive "context pollution" can lead to degraded reasoning or higher operational costs. While global extensions provide broad utility, they are re-read during every interaction; therefore, it is a best practice to use "lazy loading" by keeping specialized instructions in subdirectory CLAUDE.md files or on-demand skills that only enter the context when specifically triggered. For high-volume tasks like log analysis or extensive file searches, you should offload the work to subagents, which operate in an isolated context window and return only a concise summary to your main session, effectively shielding your primary conversation from token bloat. By intentionally scoping your tools and disabling those not needed for your current task, you preserve the high-quality "reasoning core" of the model, ensure that critical instructions aren't "lost in the middle," and maximize the value of features like prompt caching to keep your development cycles fast and cost-effective.
|
||||
@@ -0,0 +1,3 @@
|
||||
# claude -c
|
||||
|
||||
The `claude -c` command (short for --continue) is a CLI flag used to instantly reopen the most recent conversation session in your current directory. Instead of starting a fresh chat with a clean context, this command restores the previous conversation history, allowing you to pick up exactly where you left off without having to re-explain your project’s state or repeat previous instructions.
|
||||
@@ -0,0 +1,3 @@
|
||||
# claude -p
|
||||
|
||||
The `claude -p` command (short for --print) activates Print Mode, which runs Claude Code as a non-interactive, single-use utility rather than a continuous chat session. When you use this flag, you provide a prompt directly in the command line; Claude then executes its agentic loop—researching, editing files, or running commands as needed—and exits immediately once the task is complete. This mode is designed primarily for automation and scripting, allowing you to integrate Claude's reasoning into CI/CD pipelines, shell scripts, or "one-liners".
|
||||
@@ -0,0 +1,3 @@
|
||||
# claude -r
|
||||
|
||||
The `claude -r` command (short for --resume) allows you to restart a specific past conversation by providing its unique Session ID. Unlike the `-c` flag, which automatically opens the very last session you had, `-r` gives you the precision to jump back to any session from your history, ensuring you can continue a specific line of work without losing context or previous tool outputs. If you run the command without an ID—simply typing `claude --resume` —it opens an interactive session picker where you can scroll through a list of recent conversations, see their titles, and choose the one you want to reactivate.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Claude CLI
|
||||
|
||||
Claude Code CLI is a command-line tool that acts as an agentic AI coding partner by interacting directly with your local files and terminal. To set it up, you first need an active Claude subscription or an Anthropic Console account. On macOS or Linux, you can install it by running a simple command in your terminal (curl -fsSL https://claude.ai/install.sh | bash), while Windows users can use PowerShell (irm https://claude.ai/install.ps1 | iex). Once installed, navigate to your project folder, type claude to start a session, and follow the prompts to log in via your browser. From there, you can ask questions or give instructions, and the assistant will propose specific code changes for you to review and approve
|
||||
@@ -0,0 +1,3 @@
|
||||
# claude "query"
|
||||
|
||||
The `claude "query"` command allows you to start the Claude Code interactive REPL (Read-Eval-Print Loop) with an initial instruction already provided. By passing a string as an argument directly after the `claude` command, the assistant will immediately begin processing that request—such as "explain this project" or "fix the lint errors"—the moment the interface loads. This method is more efficient than opening the tool first and typing your request manually, as it combines the startup and the initial task into a single step while still keeping the session open for further conversation and follow-up actions.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Claude Workflow
|
||||
|
||||
The Claude Code workflow operates as a continuous agentic loop where the AI moves through four primary phases: Explore, Plan, Implement, and Verify. It begins by indexing your local codebase and reading persistent instructions from your CLAUDE.md file to align with your project's specific standards. When you issue a prompt, Claude uses its suite of built-in tools to research the files (Explore), proposes a detailed step-by-step strategy for the change (Plan), and—upon your approval—executes the modifications using file-editing and shell tools (Implement). The cycle concludes by running your defined test suites or linters (Verify) to ensure no regressions were introduced, often utilizing MCP servers to sync the final results with external platforms like GitHub or Jira.
|
||||
@@ -0,0 +1,3 @@
|
||||
# claude command
|
||||
|
||||
The `claude` command is the primary entry point used to launch the Claude Code interface from your terminal. When you type this command within a project directory, it initializes the agentic environment, indexes your local files, and establishes a secure connection to the AI model so you can begin issuing natural language instructions. It also supports various flags to customize Claude Code’s behavior.
|
||||
@@ -0,0 +1,3 @@
|
||||
# CLAUDE.md
|
||||
|
||||
`CLAUDE.md` is a configuration file placed in a project's root directory that provides the AI assistant with specific rules, project context, and custom instructions for that particular codebase. It acts as a set of persistent guidelines that the AI reads at the start of every session to ensure its code suggestions align with your project's coding standards, tech stack, and architectural patterns. By defining your preferred naming conventions, testing frameworks, or known edge cases within this file, you can maintain consistency across a team and prevent the assistant from making repetitive mistakes. This file is particularly useful for documenting complex workflows or "gotchas" that are unique to your local environment, effectively acting as a specialized instruction manual for the AI.
|
||||
@@ -0,0 +1,3 @@
|
||||
# CLAUDE.md
|
||||
|
||||
CLAUDE.md is a project-specific markdown file that acts as the "persistent memory" and onboarding manual for Claude Code, ensuring the AI adheres to your unique development standards across every session. Since Claude begins each new interaction with a blank context, this file is automatically read at launch to provide essential project "WHY, WHAT, and HOW"—including your tech stack, directory structure, preferred coding patterns (e.g., "Use functional React components"), and exact shell commands for building or testing. By maintaining this document in your project root or `.claude/` directory, you eliminate the need to repeat basic instructions in your prompts, significantly reduce "hallucinations" or stylistic drift, and keep the AI aligned with your team's specific conventions. You can quickly bootstrap a custom version by running the `/init` command, which analyzes your repository to detect frameworks and suggest a baseline configuration.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /clear
|
||||
|
||||
The `/clear` command is a utility tool that removes all previous messages, tool outputs, and file contents from the active conversation history. It wipes the current context, allowing you to start a fresh dialogue with the AI without exiting the application or losing your current working directory settings. This is particularly useful for reducing token costs and preventing "context drift," where the AI might become confused by old instructions or irrelevant code snippets from a previous task.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Code Intelligence Plugin
|
||||
|
||||
In Claude Code, Code Intelligence plugins extend the CLI's native search capabilities by integrating with the Language Server Protocol (LSP), granting Claude the same "IDE-level" awareness found in modern editors. By installing language-specific plugins via the `/plugin` command, you enable Claude to perform high-precision navigation—including jumping to definitions, finding references, and listing symbols—rather than relying solely on keyword-based grep searches. These plugins also provide instant diagnostics, allowing Claude to detect and fix type errors or syntax warnings immediately after an edit is made.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Commo Usecases
|
||||
|
||||
Claude Code can be used for a wide range of professional software development tasks, from legacy system modernization and large-scale refactoring to rapid prototyping for startups. Organizations use it to navigate and modernize massive codebases containing millions of lines of code, while data science teams employ it to convert exploratory research from notebooks into production-ready data pipelines. In daily engineering workflows, it is frequently applied to automate unit testing, diagnose complex bugs using stack traces, and manage dependency upgrades across entire repositories. Additionally, it has become a powerful tool for infrastructure automation, where DevOps teams use it to manage Kubernetes clusters, configure monitoring systems, and build CI/CD pipelines through natural language instructions.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Community Tools
|
||||
|
||||
Community tools extend the capabilities of Claude Code by integrating it with external platforms through the Model Context Protocol (MCP) and specialized plugins. These integrations allow the assistant to interact directly with services like GitHub for managing pull requests, Slack for sending project updates, and Jira or Linear for tracking issues. Beyond official offerings, the community has developed numerous third-party extensions—such as Claude Trace for observability and Gemini CLI for cross-model reviews—which can be easily added via the `/plugin` command to tailor the assistant's skills to your specific team’s tech stack and workflow.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /compact
|
||||
|
||||
The `/compact` command is a context management tool designed to optimize your session's memory when the context window begins to fill up. Instead of completely wiping your history like `/clear`, `/compact` instructs Claude to generate a concise summary of the key decisions, code changes, and project state established so far. It then replaces the bulky, line-by-line conversation history with this summarized version, effectively "compressing" the tokens used while preserving the essential knowledge the AI needs to continue the task.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /config
|
||||
|
||||
The `/config` command is the central management tool for customizing your Claude Code experience and fine-tuning how the assistant interacts with your system. Running this command opens an interactive menu—or allows for direct terminal arguments—to modify global and project-specific settings such as default models, theme preferences, and permission levels.
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Connecting Tools with MCP
|
||||
|
||||
Model Context Protocol (MCP) transforms Claude Code from a local file editor into a connected agent capable of interacting with your entire tech stack, from Jira tickets to live databases. Acting like a "USB-C port for AI," MCP provides a standardized bridge that allows Claude to discover and execute external functions without requiring custom-coded integrations for every service. You can add these capabilities using the interactive `claude mcp add` command or by directly editing your configuration file. This modularity is key to managing your context window; rather than loading every possible tool at once, you can scope specific MCP servers to individual projects or call them on-demand, ensuring Claude has the exact "hands" it needs only when the task requires them.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /context
|
||||
|
||||
The `/context` command is a diagnostic tool that provides a technical breakdown of how the model's context window is currently allocated, using a colored grid. While commands like `/usage` show you the "how much," `/context` shows you the "what." It lists every file, conversation turn, and tool result currently being held in the AI's active memory, allowing you to see exactly which resources are consuming tokens.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Context
|
||||
|
||||
A context window is the total amount of information a model can hold in its active memory at one time, including your conversation history, the files it has read, and the results of any terminal commands it has executed. It functions like a temporary workspace where every word and symbol (counted as tokens) fills up a limited capacity. As this window fills, Claude Code may begin to "forget" earlier details or become less accurate, which is why managing context through commands like `/compact` is essential to keep responses sharp and costs under control.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /cost
|
||||
|
||||
The `/cost` command is a financial monitoring tool that provides a real-time snapshot of the monetary expenses and token usage for your active session. While the `/usage` command focuses on how much of your context window is occupied, /cost translates that activity into USD amounts, showing you exactly how much your current conversation has cost based on your API pricing tier.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Creating Custom Skills
|
||||
|
||||
To create a custom skill in Claude Code, you must establish a new folder within the `.claude/skills/` directory containing a `SKILL.md` file that defines the skill's identity and logic. This file begins with a YAML frontmatter block containing a unique `name` and a detailed `description`—which Claude uses as a trigger to "know" when to activate the skill—and can include an optional `disable-model-invocation: true` flag if you want the skill to run as a manual, deterministic workflow rather than an autonomous one. The body of the Markdown file acts as a specialized system prompt, where you provide step-by-step instructions, define argument placeholders like `$ARGUMENTS`, and list the specific tool sequences Claude should follow to complete the task. By organizing your skill this way, you allow Claude to maintain a lean context window, loading these expert instructions only when you explicitly call them via a slash command (e.g., `/my-skill-name`) or when Claude Code detects a task that matches the skill’s documented purpose.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Creating Subagents
|
||||
|
||||
To create a Subagent in Claude Code, you must define a specialized assistant within a Markdown file located in the `.claude/agents/` directory, using YAML frontmatter to specify its `name`, `description`, `model`, and a restricted set of `tools`. This isolated architecture is most effective when you need to delegate "high-context" tasks—like searching through dozens of files for architectural patterns or performing a security audit—because the subagent operates in its own context window, returning only a summarized result to your main session to save tokens and prevent "distraction." For best results, use a descriptive trigger in the YAML header so the main agent knows when to autonomously invoke it, and strictly limit the subagent's tools (e.g., providing only `Read` and `Grep` for a "Reviewer" agent) to create a safe, read-only layer of expertise. You can also optimize for cost by assigning Claude Haiku to simple subagent tasks like linting, while reserving sonnet for the main reasoning loop.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Ctrl+C
|
||||
|
||||
`Ctrl+C` is a keyboard shortcut that immediately sends an interrupt signal to the Claude Code terminal to stop its current activity. It is primarily used to halt a long-running process, such as an accidental infinite loop in your code, a search that is taking too long, or a lengthy model response that you realized was going in the wrong direction. This provides a manual "kill switch" that is essential for maintaining control over the agent's actions and preventing the unnecessary consumption of tokens and time.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Ctrl+R
|
||||
|
||||
`Ctrl+R` is a terminal shortcut that opens the command history search, allowing you to quickly find and reuse previous prompts or terminal commands you have typed during your session. Instead of manually retyping complex instructions or scrolling back through hundreds of lines of output, you can press `Ctrl+R` and start typing a few letters to filter your recent activity until the correct entry is highlighted. Once you find the desired command, you can press `Enter` to run it immediately or use the arrow keys to edit the text before execution.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Customize Status Line
|
||||
|
||||
Claude Code allows you to personalize your terminal environment by customizing the status line, which is the persistent information bar at the bottom of the interface. This feature functions as a dynamic dashboard that receives a real-time JSON payload containing metadata—such as your active Git branch, the model in use, and critical context window metrics—and processes it through a script to display custom text or emojis. You can quickly configure a preset using the `/statusline` command or achieve deep customization by pointing the statusLine configuration in your `settings.json` to a custom shell script that parses inputs. By tailoring this bar, you can keep essential data like real-time session costs or context usage percentages visible at all times, helping you manage your budget and "context rot" without manually running diagnostic commands.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Claude Code Desktop
|
||||
|
||||
Claude Code desktop is a software application that allows an AI assistant to interact directly with your local files and development tools through a graphical interface. It functions as an agentic coding partner that can read your codebase, edit files, and execute terminal commands to help build features or fix bugs in real time. The app organizes your work into a "Code" tab for direct project interaction and a "Cowork" tab for autonomous background tasks, while also offering a familiar chat interface for general questions.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /doctor
|
||||
|
||||
The `/doctor` command is a diagnostic utility used to troubleshoot and verify the health of your Claude Code installation and its environment. When executed, it runs a series of automated checks to ensure that your authentication tokens are valid, your network connection to the Anthropic servers is stable, and all required system dependencies—like Git and Node.js—are correctly configured. If the tool detects an issue, such as a missing binary or an expired session, it provides a detailed error report and suggested steps to resolve the problem immediately.
|
||||
@@ -0,0 +1,3 @@
|
||||
# CLaude Code in Code Editor
|
||||
|
||||
IDE extensions allow you to use Claude Code directly within popular development environments like Visual Studio Code and the JetBrains family (including IntelliJ IDEA, PyCharm, and WebStorm). These extensions provide a graphical sidebar and inline diff viewers, enabling you to review proposed code changes side-by-side with your existing files. By integrating with the IDE, Claude gains automatic awareness of your active workspace, current file selection, and even terminal error messages, which eliminates the need to manually copy and paste context.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Esc + Esc
|
||||
|
||||
Double-tapping the `Esc` key in Claude Code activates the Rewind feature, which serves as a temporal navigation system for both your conversation history and your code state. When triggered, it opens an interactive menu that allows you to jump back to any previous prompt in the session, effectively acting as a "undo" button for AI-driven development. You can choose to restore only the conversation (useful for refining instructions without losing current file edits), restore only the code (to revert specific file changes while keeping the chat context), or restore both to a verified checkpoint. This shortcut is particularly valuable for experimental coding because it automatically creates local checkpoints before every change, allowing you to quickly discard an entire branch of reasoning or a failed implementation without manually restoring individual files or managing Git commits.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Esc Command
|
||||
|
||||
The `Esc` key is a navigation shortcut used to exit current menus, cancel active inputs, or clear the command line. If you are in the middle of typing a long prompt and want to start over, pressing Esc will wipe the input field clean, and if you have a dropdown menu or a multi-select list open—such as when choosing files to add to context—it will close that menu without making a selection. This shortcut provides a quick way to reset your immediate interface state without interrupting the underlying AI process or closing the terminal session entirely
|
||||
@@ -0,0 +1,3 @@
|
||||
# /exit
|
||||
|
||||
The `/exit` command is a built-in utility used to safely terminate your current Claude Code session and return you to your standard terminal prompt. Unlike force-quitting the application, using this command ensures that the system performs a clean shutdown, which includes saving your conversation history and updating any local session metadata so that you can resume your work later using the `claude -c` flag.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /export
|
||||
|
||||
The `/export` command is a data utility that allows you to save your entire current conversation history into a single file on your local machine. This command generates a Markdown-formatted document containing all your prompts, the AI's responses, and the results of any code changes or terminal commands executed during the session. It is designed for documentation and knowledge sharing, enabling you to archive successful debugging sessions, create project reports, or share a complex implementation logic with teammates who do not have access to your local terminal history.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Git Worktrees
|
||||
|
||||
Using Git worktrees with Claude Code is a powerful scaling technique that allows you to run multiple independent AI sessions in parallel without the overhead of context switching or the risk of file-edit collisions. This workflow is highly efficient for "fanning out" tasks: you can supervise several separate worktrees simultaneously, leveraging prompt caching across them for shared codebase context, and simply delete the worktree folder once the branch is merged to keep your environment clean.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Haiku
|
||||
|
||||
Claude Haiku is the fastest and most cost-effective model in the Claude family, specifically engineered for high-speed, high-volume tasks that require near-instant responsiveness. It provides a compact but powerful solution for real-time applications like customer service chatbots, rapid data extraction, and moderating large content streams where low latency is critical. Despite its smaller size, it includes advanced features such as extended thinking, a large token context window, and sophisticated vision capabilities for analyzing charts and diagrams. In complex development environments, it is frequently used as a "sub-agent" to handle repetitive background operations—like scanning logs, generating documentation, or running quick tests—allowing larger models to focus on more difficult architectural problems without slowing down the overall workflow.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Headless mode
|
||||
|
||||
Headless mode in Claude Code, enabled by the `-p` (or `--print`) flag, transforms the interactive terminal assistant into a programmable Unix-style utility designed for automation and CI/CD pipelines. In this mode, Claude executes a single prompt non-interactively, printing its response directly to `stdout` before exiting, which allows you to pipe data into the agent (e.g., `cat logs.txt | claude -p "Find errors"`) or chain its output into other tools like `jq` or `grep`. While powerful for batch processing and automated code reviews, headless mode requires strict permission scoping—often using `--dangerously-skip-permissions` in isolated CI containers—to prevent the AI from performing unauthorized system actions without human oversight.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /help
|
||||
|
||||
The `/help` command is an interactive directory that provides a comprehensive list of all available slash commands, keyboard shortcuts, and system features. When you type it, Claude Code displays a searchable guide that explains how to use tools such as context management, file mentions, and permission modes. It is designed to be a quick-access manual that helps you discover advanced functionality or refresh your memory of syntax without leaving your terminal or consulting external documentation.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Hook Events & Matchers
|
||||
|
||||
In Claude Code, Hook Events represent the specific lifecycle moments when custom logic can be triggered, while Matchers act as the regex-based filters that determine which specific actions within those moments should fire the hook. Events cover every phase of the agentic loop, from session initialization (`SessionStart`) and user input (`UserPromptSubmit`) to the execution gates before and after a tool is used (`PreToolUse` and `PostToolUse`). Matchers are primarily used with tool-based events to target specific capabilities; for example, a matcher of `Bash` targets shell commands, while `Edit|Write` targets file modifications. If a matcher is omitted or set to `*`, the hook triggers for every occurrence of that event. By combining these, you can create precise guardrails—such as a `PreToolUse` hook with a `Bash` matcher to block `rm -rf` commands, or a `PostToolUse` hook with an `Edit` matcher to auto-format code only after a file has been modified—ensuring that your automation is both powerful and token-efficient.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Hook Inputs & Outputs
|
||||
|
||||
In Claude Code, hooks communicate through a standardized JSON interface where Inputs are passed to the hook via `stdin` and Outputs are returned via `stdout` to influence the agent's next move. The input payload typically includes a `context` object containing session metadata and event-specific data, such as the `tool` name and its arguments (e.g., the exact code being written or command being run). To respond, your hook must output a JSON object: for Command hooks, an exit code of `0` allows the action to proceed, while an exit code of `2` paired with a "reason" string in the output JSON will block the tool and report the failure back to Claude.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Hook Types
|
||||
|
||||
In Claude Code, you can configure three distinct handler types for your hooks—Command, Prompt, and Agent—depending on whether you need a script, an AI "judgement call," or a specialized researcher to validate actions. Command hooks (`type: "command"`) are deterministic shell scripts that execute standard commands (like `npm run lint`) and use exit codes to either approve the action or block it with an error message. Prompt hooks (`type: "prompt"`) use a lightweight Claude model for single-turn evaluation, where the model analyzes the context (e.g., "Is this commit message descriptive?") and returns a simple JSON yes/no decision. Finally, Agent hooks (`type: "agent"`) are the most sophisticated, spawning a multi-turn subagent with tool access (like `Read` or `Grep`) to conduct deep, autonomous verification before deciding if the main agent should proceed. By layering these—such as using a fast Command hook for syntax and a Prompt hook for style—you create a robust, automated guardrail system that balances speed with intelligent oversight.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Hooks
|
||||
|
||||
Hooks are automated triggers that execute specific scripts or commands at key points in the AI's workflow, such as before or after the assistant performs a task. These hooks allow developers to enforce project standards and ensure system reliability without manual intervention, much like Git hooks but designed for an AI-driven development cycle. For example, a "pre-edit" hook can automatically back up a file before the AI touches it, while a "post-task" hook can trigger a code formatter or run a specific test suite to verify that the AI's changes didn't break anything. By configuring these in your project's settings, you create a safety net that ensures the AI assistant remains compliant with your local environment's rules and development lifecycle every time it operates.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /hooks
|
||||
|
||||
The `/hooks` command opens an interactive management menu for configuring automated workflows that trigger at specific points in the Claude Code lifecycle. While features like `CLAUDE.md` provide "soft" instructions, hooks offer deterministic control, ensuring that specific shell commands or AI evaluations run every single time a certain event occurs—such as formatting code after an edit or sending a notification when Claude needs your attention.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Hooks
|
||||
|
||||
Hooks are automated triggers that execute specific scripts or commands at key points in the AI's workflow, such as before or after the assistant performs a task. These hooks allow developers to enforce project standards and ensure system reliability without manual intervention, much like Git hooks but designed for an AI-driven development cycle. For example, a "pre-edit" hook can automatically back up a file before the AI touches it, while a "post-task" hook can trigger a code formatter or run a specific test suite to verify that the AI's changes didn't break anything. By configuring these in your project's settings, you create a safety net that ensures the AI assistant remains compliant with your local environment's rules and development lifecycle every time it operates.
|
||||
@@ -0,0 +1,3 @@
|
||||
# How to Structure CLAUDE.md
|
||||
|
||||
To write an effective CLAUDE.md, you should treat it as a concise, persistent "source of truth" that provides Claude with the project-specific context it cannot infer from the code alone. According to the official best practices, the file should be kept short and human-readable, focusing on non-obvious information like unique bash commands for building and testing, repository-specific code styles (e.g., "Use ES modules, not CommonJS"), and architectural decisions. You should strictly exclude anything Claude can figure out by reading the code, standard language conventions, or self-evident advice like "write clean code," as a bloated file causes the model to ignore your actual instructions. Structure the document with clear headings and use the `@path/to/file` syntax to import external documentation (like `README.md` or `package.json`) to keep the core CLAUDE.md lean. Treat the file like code: refine it over time using the `/init` command to bootstrap a version, prune it regularly to ensure high adherence, and commit it to Git so your entire team benefits from the shared context.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /init
|
||||
|
||||
The `/init` command is the initialization utility used to set up Claude Code for a specific project directory. When you run this command, it creates a CLAUDE.md file in your current folder. This file serves as the "foundation" for the assistant, allowing you to define project-specific coding standards, build commands, and test suites that Claude will automatically reference in every future session within that repository.
|
||||
@@ -0,0 +1,3 @@
|
||||
# What is Claude Code?
|
||||
|
||||
Claude Code is an AI-powered coding tool developed by Anthropic that operates directly in the terminal. Unlike traditional autocomplete tools, Claude Code functions as an autonomous agent capable of understanding entire codebases, executing multi-step tasks, and maintaining context across complex projects. By understanding the entire codebase, Claude Code helps simplify workflows, making it a powerful tool for software development.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locations of CLAUDE.md
|
||||
|
||||
Claude Code manages instructions through a hierarchical memory system that layers context based on the directory structure of your project. At the start of every session, Claude recursively searches from your current working directory up to the root, automatically loading global preferences from `~/.claude/CLAUDE.md` and shared team standards from the project root's `CLAUDE.md`. While these high-level rules establish the "WHY" and "HOW" for the entire codebase, Claude also supports progressive disclosure via subdirectory CLAUDE.md files; these are loaded on demand only when Claude reads a file within that specific folder (e.g., `./src/api/CLAUDE.md`). This location-based behavior prevents "context bloat" by ensuring specialized rules—like specific API middleware requirements or frontend styling—only occupy the context window when they are relevant to the task at hand. By strategically placing instructions closer to the code they govern, you maintain a sharper, more token-efficient model that prioritizes local conventions over global defaults without losing sight of the project's overall architecture.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Manage Context
|
||||
|
||||
Active management of the context window is the single most effective way to ensure reliable model performance and predictable operational costs, as Claude Code is billed based on the total number of tokens processed in each turn. Because the tool re-reads the entire conversation history with every new message to maintain state, unmanaged sessions can quickly balloon in size, leading to "context rot" where the model loses track of early instructions or struggles with "lost-in-the-middle" accuracy degradation.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Manage Sessions
|
||||
|
||||
Claude Code manages sessions through a persistent, local architecture where every interaction is stored in a unique session file, allowing you to resume work using terminal flags like `claude --continue` (for the most recent thread) or `claude --resume` (to open an interactive picker of past conversations). While each new session initializes with a fresh context window to optimize token usage and avoid irrelevance, Claude automatically snapshots affected files before any modification, enabling you to use the `/rewind` command to revert both code and conversation history to a previous "checkpoint." If you want to explore a different implementation path without altering your original work, you can use `claude --continue --fork-session` to branch into a new session ID that inherits all current context.
|
||||
@@ -0,0 +1,3 @@
|
||||
# MCP
|
||||
|
||||
The Model Context Protocol (MCP) is an open-source standard that enables an Claude Code to connect securely to a vast ecosystem of external tools, databases, and third-party services. By acting like a "universal connector" for AI, MCP allows you to extend the Claude Code's core capabilities beyond simple file editing, giving it the power to interact with APIs like GitHub to manage pull requests, query live databases such as PostgreSQL or Snowflake, and much more.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /mcp
|
||||
|
||||
The `/mcp` command is the integration hub for the Model Context Protocol, an open standard that connects Claude Code to external data sources and third-party tools. While you use the terminal command `claude mcp add` to install a new server, the `/mcp` slash command is used inside the session to manage those connections, authorize permissions, and view the specific capabilities (tools) available to the AI.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /memory
|
||||
|
||||
The `/memory` command is a knowledge management tool used to create and manage persistent information that survives across different Claude Code sessions. Unlike the `/compact` command, which only optimizes the current conversation's temporary window, `/memory` interacts with permanent storage—primarily your project's CLAUDE.md file and a hidden auto-memory directory. When you run this command, it typically opens your system's default text editor, allowing you to manually refine the coding standards, architectural decisions, and project-specific patterns that Claude should "remember" every time you launch the tool in that directory.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Model Configuration
|
||||
|
||||
Claude Code offers a highly flexible model configuration hierarchy that allows you to balance speed, cost, and reasoning depth across different tasks. You can switch models instantly during an active session using the `/model` command, specify a model at startup with the `--model` flag, or set a permanent default in your `~/.claude/settings.json` file using the `model` key. The system supports semantic aliases like sonnet (default for daily coding), haiku (fast and efficient), and opus (high-reasoning for complex architecture), as well as a specialized `opusplan` mode that intelligently uses Opus for strategic planning before automatically switching to Sonnet for the actual code implementation. Furthermore, you can fine-tune performance on supported models by adjusting the `effortLevel` (low, medium, or high), which controls how much "thinking time" Claude allocates to solving difficult logic puzzles versus generating rapid responses.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /model
|
||||
|
||||
The `/model` command is a switcher utility that allows you to change which large language model (LLM) is powering your current session without restarting the application. This is particularly useful for cost-performance optimization; you can use a high-intelligence model like Claude Sonnet for complex architectural planning and then switch to a faster, cheaper model like Claude Haiku for repetitive tasks like writing boilerplate code or unit tests.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Claude Code Models
|
||||
|
||||
Claude Code is powered by three distinct models—Opus, Sonnet, and Haiku— each optimized for a specific role within the development lifecycle. **Claude Opus** is the "deep thinker" and primary architect, used for complex reasoning, high-level system design, and surgical bug fixes in large codebases. **Claude Sonnet** serves as the versatile "balanced builder," providing a high-speed middle ground for daily tasks like implementing feature logic, writing boilerplate, and managing state across multiple files. **Claude Haiku** is the "fast-response specialist," designed for near-instant execution of lightweight tasks, such as generating rapid UI prototypes, drafting commit messages, or acting as parallel sub-agents to scan logs and run quick checks.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Modes
|
||||
|
||||
Permission modes are settings that control the level of autonomy the AI has when interacting with your computer. By default, the system operates in Default Mode, where it must ask for your approval before it edits any files or executes shell commands. You can cycle through other levels of authority, such as Accept-Edits Mode, which allows the AI to modify files automatically while still prompting you for terminal commands, or Plan Mode, which restricts the AI to read-only tools so it can research and outline a strategy without making any actual changes. For advanced workflows, specialized states like Delegate Mode exist to limit a "lead" agent to coordinating other sub-agents, while the high-risk Bypass-Permissions Mode removes all approval prompts entirely for use in secure, isolated environments.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Opus
|
||||
|
||||
Claude Opus is the most advanced and capable large language model in the Claude family, designed specifically for high-level reasoning and complex problem-solving. It functions as a "deep thinking" engine that can handle vast amounts of information and follow intricate instructions with a high degree of accuracy and nuance. In technical environments, it is typically used for architectural design, surgical bug fixes in large codebases, and strategic planning where a mistake could lead to significant system failures. While it is slower and more resource-intensive than smaller models, its superior logic allows it to solve "hard" problems that require a holistic understanding of a project's context and long-term goals.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Opusplan
|
||||
|
||||
`opusplan` is a specialized command alias for Claude Code that combines the high-level reasoning of the most advanced model with the speed and efficiency of a faster one to optimize complex development tasks. When you initiate a session using `claude opusplan`, the tool uses Claude Opus to analyze your request, explore the codebase, and draft a comprehensive technical strategy, ensuring that the initial logic and architectural decisions are as accurate as possible. Once the plan is finalized, the system automatically hands off the execution phase to Claude Sonnet, who carries out the actual file edits, terminal commands, and test runs. This workflow is commonly used for large-scale refactors, implementing features across multiple files, or solving "hard" bugs where the risk of logic errors is high, as it provides the intelligence of a top-tier model while significantly reducing the time and cost compared to using Opus for the entire coding process.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Output Styles
|
||||
|
||||
Claude Code allows you to switch between different output styles to adapt the agent’s persona and verbosity to your specific needs, effectively modifying its core system prompt. Beyond the standard coding mode, you can use built-in styles like Explanatory, which provides educational insights into implementation choices, or Learning, a collaborative mode where Claude places `TODO(human)` markers to encourage hands-on contribution. You can toggle these via the `/output-style` command or create custom output styles by placing Markdown files with YAML frontmatter in your `.claude/output-styles` directory, allowing you to define entirely new behaviors or specialized non-engineering personas.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Permission Modes
|
||||
|
||||
Claude Code features several permission modes that define the balance between autonomy and safety during your session, ranging from Plan mode, which restricts Claude to a read-only state for exploration and strategy without any tool execution, to BypassPermissions mode (often called "YOLO mode"), which grants the AI full autonomy to run any command or edit any file without interruption. Between these extremes, Default mode maintains a "human-in-the-loop" approach by requiring manual approval for initial tool uses or sensitive bash commands, while AcceptEdits mode (displayed as Delegate mode in some CLI versions) streamlines development by auto-approving file modifications while still prompting you for potentially destructive terminal actions. You can cycle through these modes in real-time by pressing `Shift+Tab` or set a starting point using the `—permission-mode` flag, ensuring you can scale the AI's power to match your trust level in a specific project or environment.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /permissions
|
||||
|
||||
The `/permissions` command is a security management interface that allows you to view and adjust the rules governing what Claude can and cannot do on your machine. By default, Claude Code operates with a "human-in-the-loop" philosophy, meaning it asks for your approval before performing any action that could affect your system—such as modifying a file or running a terminal command. The `/permissions` command allows you to grant "permanent" trust to specific tools or commands, reducing the number of interruptions during your workflow.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Plan Mode
|
||||
|
||||
Plan Mode is a strictly read-only permission state that allows Claude to analyze your codebase, research dependencies, and draft a step-by-step implementation strategy without the risk of modifying any files or executing state-changing commands. It is essentially an "architectural phase" where Claude uses search and analysis tools to build a deep mental model of your project, culminating in a detailed plan for your review before a single line of code is written. You can access the plan by typing `Ctrl+G`. You should use Plan Mode when tackling complex refactors, exploring unfamiliar repositories, or designing new features with multiple moving parts, as it forces a "think-before-you-act" workflow that prevents costly mistakes and ensures the AI fully understands the project's constraints.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /plan
|
||||
|
||||
Plan Mode is a read-only environment that allows the AI to research, analyze, and outline a multi-step strategy for a task without making any actual changes to your files or executing state-altering commands. When you enter this mode—either by typing `/plan` or pressing `Shift+Tab`—the assistant focuses on gathering context and identifying dependencies to create a detailed implementation document. This serves as a safety gate where you can review and edit the proposed approach (using `Ctrl+G` to open the plan file) before giving the final approval to transition into an execution mode to apply the changes.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Plugins
|
||||
|
||||
Claude Code plugins are shareable packages that bundle multiple customizations—including slash commands, specialized agents, skills, hooks, and Model Context Protocol (MCP) servers—into a single installable unit. They serve as a standardized way to distribute complex AI workflows across different projects or within an engineering team, ensuring that every developer has access to the same tools and coding standards. Each plugin is organized around a `plugin.json` manifest file that defines its metadata and components, and its features are typically namespaced to avoid command conflicts. You can discover and install pre-built plugins from official or community marketplaces using the `/plugin` command, or create your own by packaging local `.claude/` configurations into a versioned directory structure.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Plugins
|
||||
|
||||
Claude Code plugins are shareable packages that bundle multiple customizations—including slash commands, specialized agents, skills, hooks, and Model Context Protocol (MCP) servers—into a single installable unit. They serve as a standardized way to distribute complex AI workflows across different projects or within an engineering team, ensuring that every developer has access to the same tools and coding standards. Each plugin is organized around a `plugin.json` manifest file that defines its metadata and components, and its features are typically namespaced to avoid command conflicts. You can discover and install pre-built plugins from official or community marketplaces using the `/plugin` command, or create your own by packaging local `.claude/` configurations into a versioned directory structure.
|
||||
@@ -0,0 +1,3 @@
|
||||
# PostToolUse
|
||||
|
||||
The `PostToolUse` hook is a reactive lifecycle event that triggers immediately after a tool (like Bash, Write, Edit, or a custom MCP tool) successfully completes its execution. While the `PreToolUse` hook acts as a guard to block actions, the `PostToolUse` hook is designed for automation, cleanup, and quality control—ensuring that every action Claude takes adheres to your project's standards.
|
||||
@@ -0,0 +1,3 @@
|
||||
# PreToolUse
|
||||
|
||||
The `PreToolUse` hook is a validation gate that executes immediately after Claude decides to use a tool (like writing a file or running a shell command) but before that tool actually runs. It is primarily used for security, policy enforcement, and input sanitization, acting as a final check to ensure the AI's proposed action is safe and correct.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Prompt Caching
|
||||
|
||||
Prompt caching in Claude Code is a performance-optimizing feature that stores the frequently used "prefixes" of your conversations—such as your entire codebase state, system instructions, and tool definitions—so they don't have to be reprocessed from scratch with every new message. In an agentic environment where Claude often re-reads your files multiple times to maintain context, caching acts as a "checkpoint" system: while the initial write to the cache carries a slight premium, every subsequent interaction that reuses that prefix receives a 90% discount on input tokens and up to an 85% reduction in latency. Claude Code handles this automatically by placing "cache breakpoints" at strategic points in the prompt (like after your CLAUDE.md and project structure), ensuring that even as your conversation grows, the "static" foundation of your project remains instantly accessible and cost-effective.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Resume Conversations
|
||||
|
||||
To resume a conversation in Claude Code, you can use the terminal command `claude --continue` (or `-c`) to instantly pick up the most recent session in your current directory, or `claude --resume` (or `-r`) to open an interactive session picker. This picker allows you to browse past conversations—complete with metadata like the Git branch, message count, and a preview of the task—and select one using your arrow keys and the Enter key. If you know a specific session ID, you can bypass the menu by running `claude --resume <session_id>`. Once inside a session, you can also use the `/resume` slash command to switch between conversations without exiting the tool. These features restore the full context of your work, including message history, tool results, and the exact state of your code, ensuring you never have to re-explain your project structure after an interruption.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /rewind
|
||||
|
||||
The `/rewind` command is a history management tool that allows you to undo recent turns in your conversation. When executed, it removes the most recent prompt and response from the active context, effectively "winding back" the session to a previous state. This is particularly useful if the AI misunderstood a complex instruction or if a code generation task went in the wrong direction, as it allows you to re-issue the command with better clarity without the baggage of the failed attempt cluttering the model's memory or inflating your token usage.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Rewind Conversations
|
||||
|
||||
To rewind a conversation in Claude Code, you can use the `/rewind` slash command or the `Esc + Esc` keyboard shortcut to open the interactive checkpoint menu. This feature leverages the tool's automatic snapshotting, which creates a restore point for every user prompt and file modification throughout your session. Once the menu is open, you can scroll through your previous inputs and select a specific point to restore code and conversation, which reverts both your files and the chat history; restore conversation only, which keeps your current code changes but wipes later chat turns; or summarize from here, which distills all subsequent interactions into a compact summary to reclaim context window space. Because rewinding can fork your conversation into parallel timelines, it is most effective for "undoing" AI mistakes or exploring alternative implementation paths without manually reverting file edits.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Scaling Claude Code
|
||||
|
||||
To scale Claude Code for complex projects and distributed teams, you must move beyond simple chat interactions and embrace a multi-layered architectural approach that prioritizes context isolation and automated governance
|
||||
@@ -0,0 +1,3 @@
|
||||
# Security Best Practices
|
||||
|
||||
Security is the most critical pillar of using Claude Code because giving an AI agent the ability to execute terminal commands and modify files creates a powerful "intern with root access" who is susceptible to prompt injection and data exfiltration. Since Claude can unknowingly ingest malicious instructions from untrusted files, READMEs, or even web content—potentially leading to accidental database resets or the leaking of `.env` secrets—you must implement a zero-trust defense-in-depth strategy. This involves layering OS-level sandboxing to isolate the AI's filesystem reach, enforcing strict permission tiers (Deny for sensitive keys, Ask for destructive commands like rm or git push, and Allow only for read-only tools), and using audit logs to monitor for unusual behavior.
|
||||
@@ -0,0 +1,3 @@
|
||||
# SessionEnd
|
||||
|
||||
The `SessionEnd` hook is a teardown lifecycle event that triggers when you exit Claude Code or terminate a session. While `SessionStart` is for preparation, `SessionEnd` is your dedicated window for cleanup, archiving, and final reporting. It ensures that your environment is left in a clean state and that any important session metrics are captured before the process fully closes.
|
||||
@@ -0,0 +1,3 @@
|
||||
# SessionStart
|
||||
|
||||
The `SessionStart` hook is a initialization lifecycle event that triggers at the very beginning of a Claude Code interaction. Unlike other hooks that react to specific user prompts or file edits, `SessionStart` is designed to bootstrap your environment and inject high-priority context before the first prompt is even processed.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Setting up Claude Code
|
||||
|
||||
To set up Claude Code, you first install the CLI tool through your terminal using a single command tailored to your operating system. For macOS, Linux, or WSL, you run `curl -fsSL https://claude.ai/install.sh | bash`, while Windows users can use PowerShell to run `irm https://claude.ai/install.ps1 | iex`. Once the installation is complete, you navigate to any code project directory and type `claude`, which will trigger a one-time login process where you authenticate using your Claude.ai account or an Anthropic Console API key. After logging in, the tool is ready to use immediately; it will automatically index your project files and await your natural language instructions to start coding, debugging, or running terminal commands.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Shift+Tab
|
||||
|
||||
`Shift+Tab` is a navigation shortcut that allows you to cycle through different permission modes to control how much autonomy the AI assistant has over your computer. These modes act as a security dial, ranging from Default Mode, where the assistant must ask for your approval before making any file edits or running terminal commands, to Auto-Accept Mode, which grants it the power to modify files automatically while still prompting for shell commands. Additionally, the cycle includes Plan Mode, a specialized read-only state that restricts the assistant to searching and analyzing your codebase without the ability to change any files or execute code. By toggling these modes on the fly, you can switch from a highly controlled "safety-first" workflow for critical system files to a high-speed, autonomous mode for repetitive tasks like styling or unit testing.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Skill Best Practices
|
||||
|
||||
When configuring Claude Code skills, the primary best practice is to optimize for discoverability and context efficiency by using precise YAML frontmatter and "lazy loading." Your skill's `description` should act as a clear semantic trigger, using specific keywords that help Claude identify exactly when to activate the expert instructions without bloating the context window of every conversation. Structure the `SKILL.md` with a narrow, modular focus rather than creating a "Swiss Army Knife" skill; if a workflow has non-negotiable side effects, use `disable-model-invocation: true` to ensure it only runs when manually triggered via a slash command. Additionally, leverage argument placeholders (like `$ARGUMENTS`) to make your skills reusable across different files, and store them in the project’s `.claude/skills/` directory so they are version-controlled and shared with your team. Finally, keep skill instructions deterministic by providing step-by-step tool sequences, which ensures Claude follows your project’s "golden path" for complex tasks like deployments or security audits.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Skills
|
||||
|
||||
In Claude Code, Skills are self-contained folders of "expert knowledge" and repeatable workflows that Claude loads dynamically into its context only when the task requires it. Each skill is anchored by a `SKILL.md` file containing YAML frontmatter—which helps Claude identify the skill's purpose without bloating the context window—and a body of specific instructions, often accompanied by supporting scripts, assets, or reference documents. While `CLAUDE.md` provides permanent project context, skills are designed for progressive disclosure, acting as on-demand "expert modes" for specialized actions like auditing security, formatting complex documentation, or orchestrating multi-step deployment pipelines. You can trigger them manually using a slash command (e.g., `/deploy`) or let Claude autonomously invoke them when it detects a match with a skill's description, ensuring the AI maintains high precision and follows "non-negotiable" procedures without the overhead of keeping every rule in its immediate memory at once.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Skills
|
||||
|
||||
Claude Code skills are modular packages of instructions, scripts, and assets that teach the AI assistant how to perform specific, repeatable workflows. Each skill is stored in a dedicated folder containing a mandatory SKILL.md file, which uses YAML frontmatter to define its name and a description that the AI uses to automatically discover and load the skill when relevant. By bundling domain-specific knowledge—such as corporate brand guidelines, database schemas, or complex deployment sequences—skills prevent "context bloat" because the full instructions only load into the conversation when the task at hand requires them. They can be invoked manually using slash commands like /review or /deploy, and they often include executable bash scripts or templates that ensure the AI follows a disciplined, verified process rather than guessing how to complete a task.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Slash Commands (/)
|
||||
|
||||
Slash commands are the steering wheel of Claude Code. They allow you to execute meta-actions, manage your session, and configure the environment without needing to write a natural language request. By typing a forward slash / at the start of your prompt, you gain access to a suite of utility tools that help you control costs, manage context, and extend functionality. These commands are processed locally and do not involve the AI's reasoning engine until necessary, making them instant and efficient.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Sonnet
|
||||
|
||||
Claude Sonnet is a high-performance large language model that strikes an ideal balance between advanced reasoning intelligence and rapid processing speed. It serves as the versatile "workhorse" of the Claude family, capable of handling complex programming tasks, such as multi-file refactoring and autonomous debugging, while operating significantly faster and more cost-effectively than the top-tier Opus model. With a large token context window and sophisticated vision capabilities, it excels at interpreting technical documentation, analyzing dense data charts, and translating legacy codebases into modern frameworks. Because it offers near-frontier intelligence with the efficiency required for real-time applications, it is the default choice for most professional development workflows and agentic tasks that require consistent, high-quality results without the latency of larger models.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /status
|
||||
|
||||
The `/status` command is an interactive dashboard that provides a comprehensive overview of your current session's health and system configuration. Unlike the `/statusline` command, which places a permanent information bar at the bottom of your terminal, `/status` opens a temporary, tabbed interface that displays detailed metrics such as your Claude Code version, the specific AI model in use, active account details, and real-time usage limits. It is designed for one-off checks to verify connection stability or to monitor your daily and weekly token quotas before starting a large coding task.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Stop
|
||||
|
||||
The `Stop` hook is a final-stage lifecycle event that triggers when Claude Code believes it has finished its entire response and is about to return control to the user. Unlike `PostToolUse`, which fires after every single file edit or command, the `Stop` hook only runs once at the very end of the interaction "turn."
|
||||
@@ -0,0 +1,3 @@
|
||||
# Subagents
|
||||
|
||||
Subagents are specialized AI assistants that function as independent "team members" to handle focused tasks on behalf of the main agent. Each subagent operates within its own isolated context window, meaning it starts with a clean slate and does not clutter your primary conversation with large amounts of intermediate research or technical logs. They are typically defined by a markdown file in the .claude/agents/ directory, where you specify their unique system prompt, expertise, and restricted tool access—for example, a "researcher" might have access to web search and file reading but be barred from editing code. You can manage them using the /agents command to create, edit, or manually invoke a specialist like a "debugger" or "reviewer," though the main agent can also automatically delegate tasks to them if their description matches a complex sub-goal.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Subagents
|
||||
|
||||
Subagents are specialized AI assistants that function as independent "team members" to handle focused tasks on behalf of the main agent. Each subagent operates within its own isolated context window, meaning it starts with a clean slate and does not clutter your primary conversation with large amounts of intermediate research or technical logs. They are typically defined by a markdown file in the .claude/agents/ directory, where you specify their unique system prompt, expertise, and restricted tool access—for example, a "researcher" might have access to web search and file reading but be barred from editing code. You can manage them using the /agents command to create, edit, or manually invoke a specialist like a "debugger" or "reviewer," though the main agent can also automatically delegate tasks to them if their description matches a complex sub-goal.
|
||||
@@ -0,0 +1,7 @@
|
||||
# Subscription options
|
||||
|
||||
Subscription-based authentication for Claude Code lets you use your existing Claude.ai plan to power your development tasks with a unified login. If you have a Claude Pro or Claude Max account, you can simply run the `claude` command and follow the browser prompt to link your personal subscription, which includes Claude Code usage at no extra cost.
|
||||
|
||||
For companies, the Claude Code on Team plans is designed for smaller, collaborative groups, offering higher usage limits than Pro, while Enterprise provides advanced security (SSO, Audit Logs), deeper integration, and higher capacity for large-scale operations.
|
||||
|
||||
Once logged in, your credentials are stored, and you won’t need to log in again. To switch accounts later, use the `/login` command.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Thinking modes & Effort
|
||||
|
||||
Using thinking modes and adjusting effort levels in Claude Code is essential for balancing deep reasoning with operational efficiency. By defaulting to Plan Mode for complex tasks, you force Claude to perform "reconnaissance before the raid," allowing it to research your architecture and draft a structured strategy before touching any source code. This approach significantly reduces "vibe-coding" errors and hallucinations, as the model can analyze dependencies without the risk of accidental modifications. Furthermore, you can fine-tune Claude's cognitive energy using the effort parameter (available through the /model command); higher effort levels trigger "extended thinking" or "ultrathink," which use more test-time compute to solve multifaceted logic or debugging puzzles, while lower effort levels optimize for speed and cost on simpler tasks. This "measure twice, cut once" philosophy ensures that Claude remains a precise architectural partner rather than just a code generator, ultimately saving you time and money by getting complex implementations right on the first attempt.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Tools
|
||||
|
||||
Tools in Claude Code are specialized functions that allow the AI assistant to perform actions on your computer rather than just generating text. These functions are categorized into client-side tools that interact with your local environment—such as `Bash` for running terminal commands, `Read` and `Edit` for file manipulation, and `Glob` or `Grep` for searching codebases—and server-side tools like `WebSearch` for fetching real-time information from the internet. When you give Claude a task, it uses these tools in an "agentic loop" to gather context, propose changes, and verify results, often requiring your permission before executing high-impact actions.
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Understand Claude Pricing
|
||||
|
||||
Claude Code offers a flexible, dual-path pricing model designed to accommodate both individual power users and high-scale enterprise teams. You can access the tool through a fixed-rate subscription (such as the Pro or Max plans), which provides a generous recurring allocation of messages shared across the web interface and the terminal, making costs predictable for daily development. Alternatively, you can use a pay-as-you-go API model, where you are billed based on the total number of "tokens" (small units of text) processed in each interaction. In this model, costs are split into input charges for the code and instructions you send, and output charges for the code Claude generates.
|
||||
@@ -0,0 +1,9 @@
|
||||
# Usage Best Practices
|
||||
|
||||
If you're just starting in Claude Code, the most impactful habit is adopting a "Plan First, Implement Second" workflow by using Plan Mode for any task more complex than a one-line fix. This forces Claude to research your architecture and draft a plan for your approval before it touches your source code, preventing expensive hallucinations and "vibe-coding" errors.
|
||||
|
||||
To sustain this efficiency long-term, you must maintain a `CLAUDE.md` file in your project root; treat it as your project’s "brain" where you store non-obvious context like build commands (`npm run dev`), testing patterns, and specific style guides (e.g., "Always use functional components").
|
||||
|
||||
Since Claude’s performance degrades as the context window fills, practice context hygiene by using the /compact command during long sessions or starting fresh conversations for unrelated tasks.
|
||||
|
||||
Finally, lean into the tool's agentic nature by letting it handle the "boring" parts of the lifecycle—like writing descriptive Git commits with `claude commit` or running hooks to ensure that specific shell commands or Claude Code evaluations run every single time a certain event occurs.
|
||||
@@ -0,0 +1,3 @@
|
||||
# /usage
|
||||
|
||||
The `/usage` command is a specialized diagnostic tool designed specifically for users on Claude Pro or Claude Max subscription plans. Since these plans have unified limits, the command provides a real-time status report of your remaining capacity instead of monetary costs.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Use /compact and /clear
|
||||
|
||||
Regularly using `/compact` and `/clear` is the most effective way to prevent "context rot" and manage spiraling API costs while working with Claude Code. Because Claude re-processes your entire conversation history with every new message, a session that has accumulated thousands of lines of terminal output and file diffs will eventually become expensive, slow, and prone to "forgetting" early instructions. Using `/compact` allows you to summarize long research or debugging threads into a lean set of key findings, effectively "zipping" the conversation so you can continue without losing essential progress. In contrast, `/clear` is vital when switching to an unrelated task; it wipes the current history to provide a clean slate.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Use subagents and hooks
|
||||
|
||||
In Claude Code, Subagents and Hooks are powerful architectural tools that manage the context window by practicing "selective attention," ensuring the main conversation stays lean while specialized tasks remain high-precision. Subagents act as isolated "expert bubbles" that run in their own independent context windows with restricted toolsets; they can ingest thousands of tokens of raw logs or documentation, returning only a concise final summary to your main session. This prevents your primary conversation from becoming "bloated" with noisy intermediate data, which maintains Claude's reasoning quality and reduces per-turn costs. Hooks, on the other hand, provide a deterministic way to inject or prune context at key lifecycle moments.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user