Printable single-page A4 JPEG reference for developers

Last updated: 12/05/2026

Concise reference for the Claude Code CLI only: terminal sessions, claude -p, CLI flags, settings, permissions, MCP, skills, subagents, hooks, and automation.

I regularly write about agentic coding tools and workflows. If you want updates like these in your inbox, subscribe below. Thanks!

🚀 Start Here

Command

Use

claude

Start an interactive Claude Code session in the current directory

claude "task"

Start an interactive session with an initial prompt

claude -p "query"

Print mode: run a one-off query, output the answer, then exit

claude -c

Continue the most recent conversation in the current directory

claude -r <id-or-name>

Resume a previous session by ID or name

claude --continue

Continue most recent session; long form of -c

claude --resume

Pick a previous conversation to resume

claude update

Update Claude Code when supported by your install method

claude --version / claude -v

Print installed version

claude doctor

Diagnose installation, configuration, and runtime issues

claude auth login

Sign in from the shell

claude auth logout

Sign out from the shell

claude mcp

Configure MCP servers

claude plugin

Manage plugins

claude project purge

Clear local project state

/help

Show available in-session commands

/login / /logout

Sign in or out from inside Claude Code

🖥️ Interactive Terminal

Input

Action

/

Open command, skill, plugin, and MCP prompt menu

@

Mention files/directories with path autocomplete

!cmd

Run a shell command directly and add output to context

Ctrl+C / Esc

Cancel input, response, or tool work

Ctrl+D / /exit

Exit the session

Ctrl+L

Redraw the terminal; in fullscreen, double-press can clear

Ctrl+O

Toggle transcript viewer with detailed tool usage

Ctrl+R

Reverse-search prompt history

Ctrl+G or Ctrl+X Ctrl+E

Edit prompt in $VISUAL or $EDITOR

Ctrl+B

Background a running bash command or agent task

Ctrl+T

Toggle task list

Shift+Tab

Cycle permission modes

Alt/Option+P

Switch model

Alt/Option+O

Toggle fast mode

Alt/Option+T

Toggle extended thinking

Esc Esc

Rewind or summarize from a previous point

Ctrl+V / Cmd+V / Alt+V

Paste image from clipboard, terminal-dependent

\ + Enter, Ctrl+J, or Shift+Enter

Insert newline in multiline prompt

⚡ Slash Commands

Type / in the TUI for the exact commands available in your version, plan, platform, plugins, and MCP servers.

Command

Use

/status

Show version, model, account, and connectivity state

/config

Open settings UI

/permissions

Manage tool approval rules

/plan [desc]

Enter plan mode before architectural or risky work

/model [model]

Switch model, such as Sonnet or Opus

`/effort [low

med

`/fast [on

off]`

/clear [name]

Start a fresh conversation while keeping memory

/compact [instructions]

Summarize conversation history to free context

/context [all]

Inspect context-window usage

/btw <question>

Ask an ephemeral side question without tools

/diff

Open interactive diff viewer

/review [PR]

Review local changes or a PR

/security-review

Review branch diff for security issues

/simplify [focus]

Review recent files and apply quality fixes

/rewind

Restore code and/or conversation to a checkpoint

/memory

Manage CLAUDE.md and auto memory

/init

Create a starter CLAUDE.md

/mcp

Manage and inspect MCP servers

/agents

Manage custom subagent configurations

/subagents

Manage active subagents

/tasks

List background tasks

/bg [prompt]

Detach session as a background agent

/batch <instructions>

Orchestrate large work across worktrees

/loop [time] [prompt]

Run a repeated prompt

/goal <condition>

Keep Claude working until a condition is met

/usage / /stats / /cost

Show usage, cost, and activity stats

/doctor

Diagnose and fix install/runtime issues

/keybindings

Open keyboard shortcut config

/theme

Change terminal theme

`/tui [default

fullscreen]`

/export [file]

Export conversation as text

/copy [N]

Copy recent response(s)

MCP servers can add commands as /mcp__<server>__<prompt>.

⚙️ CLI Flags

Flag

Use

-p "query"

Print mode: run, print, and exit

-c

Continue most recent session in current directory

-r <id-or-name>

Resume a named/specific session

--add-dir <path>

Add another working directory for file access

--bare

Faster startup; skips hooks and plugins

--effort <level>

Set effort: low, med, high, or xhigh

--model <model>

Pick model, e.g. sonnet, opus, or an alias

--permission-mode <mode>

Start in default, acceptEdits, plan, auto, dontAsk, or bypassPermissions

--tools "Read,Edit,Bash"

Restrict tools available for the session

--allowedTools "Read,Edit,Bash"

Allow only specified tools/rules; also appears as --allowed-tools in some integrations

--disallowedTools "WebSearch"

Deny specific tools/rules

--max-turns <n>

Cap agentic turns for automation

--output-format json / stream-json

Structured non-interactive output

--json-schema <file>

Constrain structured output where supported

--mcp-config <file>

Load MCP config for automation/CI

--settings <file-or-json>

Per-run settings override

--agent <name>

Run main thread as a named subagent

--agents '{...}'

Define session-only subagents

--bg "prompt"

Start directly as a background agent

--worktree [name] / -w [name]

Start in isolated git worktree under .claude/worktrees/

--worktree #123

Fetch PR #123 from origin and branch a worktree from it

--from-pr <number>

Resume the session linked to a PR

--system-prompt "..."

Replace default system prompt

--system-prompt-file <file>

Replace default prompt with file contents

--append-system-prompt "..."

Append instructions to the default system prompt

--append-system-prompt-file <file>

Append file contents to the default system prompt

--debug [filter]

Enable debug logging

--debug-file <path>

Write debug log to a known file

--verbose

Show full turn-by-turn output; overrides viewMode

--version, -v

Print version

--dangerously-skip-permissions

Alias for bypassing permission prompts; isolated envs only

--allow-dangerously-skip-permissions

Make bypass mode available in the mode cycle without starting in it

Prefer append system-prompt flags for normal customization; full replacement removes Claude Code's built-in operating instructions.

Pattern

Use

claude -p "explain this function"

One-off answer for scripts or quick questions

claude -p "List endpoints" --output-format json

Machine-readable one-shot output

claude -p "Analyze logs" --output-format stream-json

Stream structured events for real-time processing

claude --permission-mode auto -p "fix all lint errors"

Non-interactive autonomous run with classifier checks

ANTHROPIC_API_KEY=... claude -p "query"

API-key auth takes precedence in non-interactive mode

claude setup-token

Generate one-year OAuth token for CI/scripts; set as CLAUDE_CODE_OAUTH_TOKEN

--bare skips hooks/plugins for faster script startup, but does not read CLAUDE_CODE_OAUTH_TOKEN; use ANTHROPIC_API_KEY or apiKeyHelper for bare scripts.

🔐 Auth & Credentials

Item

Use

/login or claude auth login

Browser login for Claude.ai, Teams, Enterprise, or Console

/logout or claude auth logout

Remove current login

ANTHROPIC_AUTH_TOKEN

Bearer-token auth for gateways/proxies

ANTHROPIC_API_KEY

Console API key auth

apiKeyHelper

Dynamic/rotating API key script

CLAUDE_CODE_OAUTH_TOKEN

Long-lived OAuth token from claude setup-token

CLAUDE_CODE_USE_BEDROCK / CLAUDE_CODE_USE_VERTEX / CLAUDE_CODE_USE_FOUNDRY

Prefer cloud-provider credentials

Credential precedence: cloud provider env > ANTHROPIC_AUTH_TOKEN > ANTHROPIC_API_KEY > apiKeyHelper > CLAUDE_CODE_OAUTH_TOKEN > /login OAuth.

🌱 Environment Variables

Variable

Use

ANTHROPIC_BASE_URL

Route API traffic through proxy/gateway

ANTHROPIC_MODEL

One-session model override

ANTHROPIC_DEFAULT_OPUS_MODEL / SONNET / HAIKU

Pin model aliases

CLAUDE_CODE_EFFORT_LEVEL

Override effort level

CLAUDE_CODE_SUBAGENT_MODEL

Default model for subagents

CLAUDE_CODE_DISABLE_1M_CONTEXT=1

Hide/disable 1M context variants

CLAUDE_CODE_DISABLE_FAST_MODE=1

Disable fast mode

CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1

Disable background Bash/subagent tasks

CLAUDE_CODE_DISABLE_AGENT_VIEW=1

Disable agent view/background agents

CLAUDE_CODE_DISABLE_CRON=1

Disable scheduled tasks

CLAUDE_CODE_USE_POWERSHELL_TOOL=1

Enable PowerShell tool

CLAUDE_CODE_GIT_BASH_PATH

Set Git Bash path on Windows

USE_BUILTIN_RIPGREP=0

Use system rg instead of bundled ripgrep

BASH_DEFAULT_TIMEOUT_MS / BASH_MAX_TIMEOUT_MS

Tune Bash command timeouts

BASH_MAX_OUTPUT_LENGTH

Raise Bash output preview limit

MAX_MCP_OUTPUT_TOKENS

Raise MCP output warning/limit

MCP_TIMEOUT / MCP_TOOL_TIMEOUT

Tune MCP startup/tool timeouts

DISABLE_AUTOUPDATER / DISABLE_UPDATES

Disable update checks or all update paths

DISABLE_PROMPT_CACHING

Disable prompt caching globally

Any env var can be placed under env in settings.json to apply it consistently.

🧩 Config Files

Path / Key

Use

~/.claude/settings.json

User settings for every project

.claude/settings.json

Shared project settings; commit when appropriate

.claude/settings.local.json

Personal project overrides; normally gitignored

~/.claude.json

App state, UI preferences, and personal MCP state; not for permissions/hooks/env

CLAUDE_CONFIG_DIR

Override config/state directory for clean or isolated runs

~/.claude/keybindings.json

Custom keyboard shortcuts from /keybindings

~/.claude/themes/

Custom terminal themes

--settings <file-or-json>

Per-invocation settings override

/status

Show active settings sources and managed-policy state

/doctor

Validate config files and show schema issues

Precedence: managed settings > CLI arguments/--settings > .claude/settings.local.json > .claude/settings.json > ~/.claude/settings.json.

Common Setting

Use

model

Initial model selection

availableModels

Restrict selectable models, strongest from managed settings

effortLevel

Default effort: low, medium, high, xhigh, or max where supported

alwaysThinkingEnabled

Enable extended thinking by default

autoMemoryEnabled

Toggle auto memory

editorMode

normal or vim input editing

permissions.defaultMode

Default permission mode

permissions.allow / ask / deny

Tool permission rules

additionalDirectories

Persistent equivalent of --add-dir

env

Environment variables for Claude Code sessions

hooks

Lifecycle hook definitions

enabledPlugins

Enable/disable installed plugins

extraKnownMarketplaces

Pre-register plugin marketplaces

🔐 Permissions

Mode

What Runs Without Asking

Best For

default

Reads only

Normal work and sensitive repos

acceptEdits

Reads, edits, and common in-scope filesystem commands

Fast code iteration with later review

plan

Reads only; proposes a plan before editing

Large or risky changes

auto

Most actions, checked by a safety classifier

Long tasks with fewer prompts

dontAsk

Only pre-approved tools and read-only commands

CI or locked-down automation

bypassPermissions

Everything except root/home deletion circuit breakers

Isolated containers/VMs only ⚠️

Control

How

Switch in session

Shift+Tab or mode indicator

Start in mode

claude --permission-mode plan

Persist mode

"permissions": {"defaultMode": "acceptEdits"}

Manage rules

/permissions

Block optional modes

permissions.disableAutoMode / permissions.disableBypassPermissionsMode

Inspect auto defaults

claude auto-mode defaults

Inspect effective auto config

claude auto-mode config

Critique custom auto rules

claude auto-mode critique

Protected paths are never auto-approved except in bypassPermissions: .git, .vscode, .idea, .husky, most .claude files, .mcp.json, shell startup files, .gitconfig, .gitmodules, and .ripgreprc.

Auto mode trusts the working directory and current repo remotes by default. Add trusted orgs, buckets, domains, and services in autoMode.environment; include "$defaults" when extending built-in environment, allow, soft_deny, or hard_deny lists.

🧱 Permission Rules

Rule

Meaning

Bash or Bash(*)

Match all Bash commands

Bash(npm run build)

Match exact command

Bash(npm run *)

Match command prefix with wildcard

PowerShell(Get-ChildItem *)

Match PowerShell commands; aliases canonicalized

Read(./.env)

Match file relative to current directory

Read(/src/**/*.ts)

Match from project root

Read(~/Documents/*.pdf)

Match from home directory

Read(//etc/secrets/**)

Match absolute filesystem path

Edit(/docs/**)

Match edits in project docs/

WebFetch(domain:example.com)

Match web fetches to a domain

mcp__github__*

Match all tools from an MCP server

mcp__github__get_issue

Match one MCP tool

Agent(code-reviewer)

Match a named subagent

Evaluation order is denyaskallow; first match wins. Read/Edit patterns use gitignore-style matching, where * is one directory level and ** is recursive.

🧰 Built-In Tools

Tool

What It Does

Prompts?

Agent

Spawn a subagent

No

Bash

Run shell commands

Yes, except read-only commands/rules

PowerShell

Run native PowerShell commands when enabled

Yes

Read

Read files, images, PDFs, notebooks

No

Edit

Exact string replacement in files

Yes

Write

Create or overwrite full files

Yes

Glob

Find files by pattern

No

Grep

Search file contents with ripgrep regex

No

LSP

Definitions, references, diagnostics via code intelligence plugins

No

NotebookEdit

Edit Jupyter notebook cells

Yes

Skill

Run a skill

Yes

Monitor

Watch background process/output and react

Uses Bash rules

WebFetch

Fetch URL and extract markdown-summary content

Yes by domain

WebSearch

Return web result titles/URLs

Yes

Important behavior:

Behavior

Note

Read-before-edit

Claude must read an existing file before Edit or overwrite Write

Bash timeout

2 min default; Claude can request up to 10 min; env vars can change limits

Bash output

30k chars default; long output saved to session file

Bash cwd

Main-session cd persists inside project/additional dirs; subagent cd does not

Env vars

export in one Bash command does not persist to the next

Grep

Uses ripgrep syntax and respects .gitignore

Glob

Finds gitignored files by default unless configured otherwise

WebFetch

Caches for 15 min, upgrades HTTP to HTTPS, and is lossy by extraction prompt

WebSearch

Returns URLs/titles only; Claude follows with WebFetch to read pages

🧠 Models, Effort, Context

Control

Use

/model

Open model picker or switch model

claude --model opus

Start with a model/alias

ANTHROPIC_MODEL=sonnet claude

One-session model override

model in settings

Persistent model preference

default

Clear override and use recommended model for account/provider

sonnet

Latest Sonnet for daily coding

opus

Latest Opus for complex reasoning

haiku

Fast, efficient model for simple tasks

best

Most capable available model; currently Opus

opusplan

Opus in plan mode, Sonnet for execution

sonnet[1m] / opus[1m]

Use 1M context when available

Effort / Thinking

Use

/effort [level]

Set low, medium, high, xhigh, max, or auto

claude --effort high

One-session effort override

CLAUDE_CODE_EFFORT_LEVEL

Env override; takes precedence

ultrathink in prompt

One-turn request for deeper reasoning

Alt/Option+T

Toggle extended thinking

MAX_THINKING_TOKENS=0

Disable thinking output regardless of effort

⚡ Fast Mode

Control

Use

/fast

Toggle or inspect fast mode

Alt/Option+O

Keyboard toggle

"fastMode": true

Persist in user settings

fastModePerSessionOptIn

Managed setting requiring opt-in each session

CLAUDE_CODE_DISABLE_FAST_MODE=1

Disable fast mode

Fast mode is a higher-cost, lower-latency configuration for Opus 4.6 only. It is not a separate model; enabling it switches to Opus 4.6 and disabling it leaves you on Opus 4.6.

📝 Memory & Context

File / Command

Use

CLAUDE.md or .claude/CLAUDE.md

Project/team instructions loaded every session

~/.claude/CLAUDE.md

Personal global instructions

CLAUDE.local.md

Personal per-project instructions; gitignore it

.claude/rules/*.md

Topic/path-scoped rules loaded on demand

@path/to/file inside CLAUDE.md

Import more instruction files

/init

Generate starter project CLAUDE.md

/memory

Inspect and manage loaded memory and auto memory

/context

Show actual context-window usage

/compact [instructions]

Summarize current history and preserve essentials

/clear

Start fresh while retaining memory files

Auto memory stores project notes under ~/.claude/projects/<project>/memory/MEMORY.md. Keep root CLAUDE.md concise; move specialized workflows into skills so they load only when needed.

🔌 MCP

Command / Config

Use

/mcp

Inspect, approve, authenticate, reconnect, or disable servers

claude mcp add --transport http <name> <url>

Add recommended remote HTTP server

claude mcp add --transport sse <name> <url>

Add legacy SSE server

claude mcp add --transport stdio <name> -- <cmd> [args...]

Add local process server

claude mcp add --env KEY=value <name> -- <cmd>

Pass env to stdio server

claude mcp add --header "Authorization: Bearer ..."

Add HTTP/SSE auth header

claude mcp list

List configured servers

claude mcp get <name>

Show one server

claude mcp remove <name>

Remove a server

claude mcp reset-project-choices

Reset approvals for project .mcp.json servers

.mcp.json

Project-scoped MCP config committed at repo root

~/.claude.json

User/local MCP config

Scope

Loads In

Shared

Stored In

local

Current project

No

~/.claude.json

project

Current project

Yes

.mcp.json

user

All projects

No

~/.claude.json

Option ordering matters: claude mcp add [options] <name> -- <server-command>. Server name workspace is reserved.

🛠️ Skills

Surface

Use

/skills

Browse available skills

/skill-name [args]

Invoke a skill manually

.claude/skills/<name>/SKILL.md

Project skill; share with team

~/.claude/skills/<name>/SKILL.md

Personal skill across projects

.claude/commands/<name>.md

Legacy custom command; behaves like a skill

description

Helps Claude decide when to auto-invoke

disable-model-invocation: true

Manual-only skill

allowed-tools

Pre-approve tools for the skill

context: fork

Run skill in a subagent context

command

Inject dynamic shell output into skill context

$0, $1, $ARGUMENTS

Read skill arguments

Built-in skill-style commands include /simplify, /batch, /debug, /loop, /review, /security-review, /test, /terminal, and /search.

🔧 Plugins

Command / Setting

Use

/plugin

Browse, install, uninstall, enable, or disable plugins

enabledPlugins

Enable/disable plugins by "plugin@marketplace": true/false

extraKnownMarketplaces

Make project/team marketplaces available

strictKnownMarketplaces

Managed allowlist for marketplace sources

blockedMarketplaces

Managed blocklist for marketplace sources

Plugins can bundle skills, subagents, hooks, and MCP servers. Project settings can recommend marketplaces, but users still consent when trusting the folder.

👥 Subagents

Item

Use

/agents

Manage subagent library and running subagents

/subagents

Manage active subagents

`claude agents

cat`

@agent-name or @"name (agent)"

Explicitly ask Claude to use a subagent

claude --agent code-reviewer

Run the main session as a subagent

agent in settings

Persist main-thread subagent for a project

--agents '{...json...}'

Define session-only subagents at startup

Ctrl+X Ctrl+K

Kill all running background subagents in session

Subagent Location

Priority / Scope

Managed settings

Highest; organization-wide

--agents CLI flag

Current session only

.claude/agents/

Project/team

~/.claude/agents/

Personal

Plugin agents/

Where plugin is enabled

Core frontmatter:

Field

Use

name

Required unique identifier

description

Required delegation trigger

tools / disallowedTools

Restrict tool access

model

inherit, sonnet, opus, haiku, or full model ID

effort

Override reasoning effort while agent runs

permissionMode

Agent-specific mode; ignored for plugin agents

mcpServers

Limit or inline MCP servers for this agent

skills

Preload skills into agent context

hooks

Agent-scoped hooks

memory

user, project, or local persistent agent memory

background: true

Prefer background execution

isolation: worktree

Give agent its own git worktree

maxTurns

Stop after a fixed number of turns

Built-ins: Explore is fast/read-only for code search, Plan researches during plan mode, and general-purpose handles broader multi-step work.

🧵 Background Agents & Worktrees

Command

Use

claude agents

Open agent view for background sessions

claude --bg "prompt"

Start a background session from shell

/bg [prompt]

Background current session, optionally with one more instruction

on empty prompt

Detach current background session to agent view

claude attach <id>

Attach to background session

claude logs <id>

Print recent output

claude stop <id> / claude kill <id>

Stop a session

claude respawn <id> / --all

Restart stopped session(s)

claude rm <id>

Remove session from list

CLAUDE_CODE_DISABLE_AGENT_VIEW=1

Disable agent view/background agents

Agent view sessions that need to edit files move into isolated worktrees automatically.

Worktree Control

Use

claude --worktree <name> / -w <name>

Start in .claude/worktrees/<name> on worktree-<name> branch

claude --worktree

Auto-generate worktree name

claude --worktree "#123"

Start from GitHub PR #123 fetched from origin

worktree.baseRef: "fresh"

Branch from origin/HEAD; default

worktree.baseRef: "head"

Branch from local HEAD

.worktreeinclude

Copy gitignored files, such as .env, into new worktrees

isolation: worktree

Give a subagent its own temporary worktree

git worktree list / remove

Manual cleanup

Add .claude/worktrees/ to .gitignore.

🪝 Hooks

Hook Surface

Use

/hooks

Browse active hooks; read-only UI

hooks in settings

Define user/project/local hooks

disableAllHooks: true

Disable hooks from settings

claude --debug hooks

Trace hook matching and execution

claude --debug-file /tmp/claude.log

Write debug log to known path

CLAUDE_PROJECT_DIR

Stable project root passed to hook commands

CLAUDE_ENV_FILE

Write shell preamble for future Bash commands

Event

Typical Use

SessionStart / SessionEnd

Inject setup context or clean up

Setup

One-time CI/script preparation for init/maintenance

UserPromptSubmit

Add context or block prompts before Claude sees them

UserPromptExpansion

Intercept slash command or skill expansion

PreToolUse

Validate, rewrite, or block tool calls

PermissionRequest

Auto-answer specific approval dialogs

PermissionDenied

React to auto-mode classifier denials

PostToolUse / PostToolUseFailure

Format, lint, log, or inspect tool results

PostToolBatch

Add context after parallel tool batches

Notification

Desktop/chat alerts when Claude needs input

Stop / StopFailure

Continue until criteria pass, or log API failures

SubagentStart / SubagentStop

Inject or validate subagent work

TaskCreated / TaskCompleted

Enforce task naming or completion gates

PreCompact / PostCompact

React around context compaction

ConfigChange

Audit settings/skills changes

InstructionsLoaded

Debug CLAUDE.md and rules loading

CwdChanged / FileChanged

Refresh env when directories/files change

WorktreeCreate / WorktreeRemove

Override worktree creation/cleanup

Elicitation / ElicitationResult

Observe MCP user-input flows

Hook Type

Use

command

Run shell command; JSON arrives on stdin

http

POST event JSON to a service

prompt

Ask a model for an ok/reason decision

agent

Spawn a subagent to verify code or run tools

matcher is exact for simple names like Bash or Edit|Write, regex when it contains regex characters, and */empty/omitted for all. Use if: "Bash(git *)" to filter tool hooks with permission-rule syntax before spawning a handler.

🎯 Goals, Loops, Scheduling

Command / Feature

Use

/goal <condition>

Keep working turn-after-turn until a model verifies condition is met

/goal

Show active or last achieved goal status

/goal clear

Stop active goal; aliases include stop, off, reset, none, cancel

claude -p "/goal ..."

Run a goal non-interactively until met or interrupted

/loop 5m check deploy

Re-run a prompt on fixed interval

/loop check deploy

Let Claude choose the next interval dynamically

/loop

Run built-in maintenance prompt, or .claude/loop.md / ~/.claude/loop.md

/goal is for a verifiable end state; /loop is for polling on time intervals; Stop hooks are for custom persistent completion checks.

⏪ Checkpoints & Sessions

Command / Action

Use

Esc Esc or /rewind

Open checkpoint menu

Restore code and conversation

Revert both files and history to a prompt

Restore conversation

Rewind chat only, keep current files

Restore code

Revert Claude file edits only, keep chat

Summarize from here

Compress selected point forward without changing files

/rename [name]

Name a session for easier resume

/resume [id]

Switch to previous session in TUI

/branch [name]

Branch current conversation

--fork-session

Fork a resumed/continued session from shell where supported

Checkpoints track Claude's file-editing tools, not files changed by Bash commands, external tools, or other sessions. Keep using git for permanent history.

🖱️ Computer Use

Item

Use

/mcp → enable computer-use

Turn on built-in screen-control MCP server

macOS Accessibility

Allows click/type/scroll

macOS Screen Recording

Allows Claude to see approved app windows

Per-app approval

Required each session before controlling an app

Esc anywhere

Abort current computer-use action and release lock

CLI computer use is macOS-only, interactive-only, research preview, and requires eligible Pro/Max claude.ai auth. It is not available with -p, Team/Enterprise, Bedrock, Vertex, or Foundry.

🔄 CI & Automation

Surface

Use

GitHub Action

anthropics/claude-code-action@v1 runs Claude Code in workflows

GitHub setup

Run /install-github-app for quick setup where supported

GitHub trigger

@claude in issues, PR comments, or review comments

GitHub prompt

Run automation immediately for any workflow event

GitHub claude_args

Pass CLI flags like --model, --max-turns, --allowedTools

GitHub secret

Store direct API key as ANTHROPIC_API_KEY

GitLab CI/CD

Run claude -p ... inside CI jobs; integration is beta

GitLab variables

Store ANTHROPIC_API_KEY or provider OIDC/WIF variables

Bedrock/Vertex CI

Prefer OIDC/WIF instead of long-lived cloud keys

Keep CI prompts specific, cap turns with --max-turns, set job timeouts, and route every code change through normal PR/MR review.

Workflow Patterns

Goal

Prompt / Command Pattern

Understand a repo

give me an overview of this codebase then ask architecture/data-flow questions

Find feature code

find the files that handle user authentication

Debug

Provide command, error, repro steps, and "fixed when" check

Refactor

Ask to preserve behavior, make small changes, and run tests

Add tests

Name file/function, behavior, edge cases, and test runner

Create PR

summarize my changes, then create a pr

Review

/review, /security-review, or a fresh session reviewing the diff

Visual/UI work

Paste image/screenshot and ask Claude to compare result after changes

Large research

use subagents to investigate <areas> in parallel

Parallel edits

Use --worktree, agent view, or /batch

Clean context

/clear between unrelated tasks; /compact for long related tasks

Course-correct

Press Esc, explain correction, or /rewind if needed

Prompt template: Goal + context + constraints + verification. Put durable project facts in CLAUDE.md, reusable procedures in skills, external live systems in MCP, hard guarantees in permissions/hooks, and noisy research in subagents.

Reply

Avatar

or to participate

Keep Reading