---
tags:
- devops
- l1
- flashcard-deck
- claude-code
---
<!-- wiki:breadcrumb:start -->
[Portal](../../../../library/portal/index.md) | **Level:** [L1: Foundations](../../../../library/portal/levels.md) | **Topics:** [Claude Code](../../../../library/portal/topics.md) | **Domain:** DevOps & Tooling
<!-- wiki:breadcrumb:end -->

id	category	difficulty	tags	question	answer	source_path
claude-code/001	claude-code	easy	claude-code,setup	What is Claude Code and how does it differ from browser-based AI tools?	Claude Code is Anthropic's terminal-native AI agent that runs in your shell with direct access to your filesystem, git history, and CLI tools. Unlike browser-based AI, it can read and edit your files, run commands, and interact with your infrastructure directly — no copy-pasting required.\n\nRemember: Claude Code = Anthropic's AI coding assistant CLI. Works in your terminal, understands your codebase, and helps write, debug, and refactor code.	training/library/topics/claude-code/primer.md
claude-code/002	claude-code	easy	claude-code,claude-md	What is CLAUDE.md and what is it used for?	CLAUDE.md is a project context file that Claude Code reads automatically on startup. It contains project conventions, stack details, validation commands, and behavioral rules (like files not to modify). It supports a hierarchy: global (~/) > project root (./) > subdirectory, with more specific files overriding general ones.\n\nRemember: Claude Code = Anthropic's AI coding assistant CLI. Works in your terminal, understands your codebase, and helps write, debug, and refactor code.	training/library/topics/claude-code/primer.md
claude-code/003	claude-code	medium	claude-code,permissions	What are the three permission modes in Claude Code and when should you use each?	Default mode asks before file edits and commands. Auto-accept edits mode allows file reads/writes but still asks for commands. YOLO mode auto-approves everything and should only be used for safe, isolated work — never on production infrastructure or shared systems.\n\nRemember: Claude Code asks permission before modifying files or running commands. Review changes before approving. Trust but verify.	training/library/topics/claude-code/primer.md
claude-code/004	claude-code	easy	claude-code,slash-commands	How do you create a custom slash command in Claude Code?	Create a markdown file in .claude/commands/ directory. The filename (minus .md) becomes the command name. Use $ARGUMENTS as a placeholder for user input. Example: .claude/commands/deploy-check.md becomes /deploy-check. Team-shared commands go in the repo's .claude/commands/; personal commands go in ~/.claude/commands/.\n\nRemember: slash commands (/commit, /review-pr) invoke built-in skills. They're shortcuts for common workflows that Claude Code handles end-to-end.	training/library/topics/claude-code/primer.md
claude-code/005	claude-code	medium	claude-code,mcp	What are MCP servers in Claude Code and how are they configured?	MCP (Model Context Protocol) servers extend Claude Code with external integrations like databases, APIs, and internal tools. They are configured in .claude/settings.json under the mcpServers key, specifying a command, args, and environment variables. Use ${VAR} syntax for secrets — never hardcode credentials.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/primer.md
claude-code/006	claude-code	medium	claude-code,hooks	What are Claude Code hooks and what events can they respond to?	Hooks are shell commands that run automatically in response to Claude Code events. Events include: pre-tool-use (runs before and can block a tool), post-tool-use (runs after a tool), notification (for alerts), and on-session-start. Use cases include auto-linting after edits, blocking destructive commands, and sending Slack notifications.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/primer.md
claude-code/007	claude-code	easy	claude-code,context	What does the /compact command do and when should you use it?	/compact compresses the conversation to save context window space. Use it at milestones during long debugging sessions — when the context fills up, Claude Code starts forgetting earlier conversation including your constraints and instructions. It keeps key context while dropping noise.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/primer.md
claude-code/008	claude-code	easy	claude-code,models	What are the available models in Claude Code and when should you use each?	Opus: complex multi-file refactors, architecture decisions, deep debugging. Sonnet: day-to-day coding, quick fixes, file exploration. Haiku: fast lookups, simple questions, bulk operations. Switch with /model or --model flag.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/primer.md
claude-code/009	claude-code	medium	claude-code,cli	How can you use Claude Code in a CI pipeline or non-interactive mode?	"Use the -p flag for non-interactive (pipe-friendly) mode: claude -p ""review this diff"" < diff.txt. Combine with --output-format json for machine-readable output. Useful for automated code review, changelog generation, and migration scripts in CI/CD pipelines like GitHub Actions.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance."	training/library/topics/claude-code/primer.md
claude-code/010	claude-code	hard	claude-code,permissions,security	How do you configure targeted tool permissions instead of using YOLO mode?	"Use claude config set allowedTools with an array of tool patterns. Examples: '[""Bash(kubectl get *)"", ""Bash(kubectl describe *)""]' for read-only kubectl, '[""Bash(make *)"", ""Edit"", ""Write""]' for build and edit permissions. This is safer than YOLO mode because it limits blast radius to approved operations.\n\nRemember: Claude Code asks permission before modifying files or running commands. Review changes before approving. Trust but verify."	training/library/topics/claude-code/primer.md
claude-code/011	claude-code	medium	claude-code,workflow	How does Claude Code help with exploring an unfamiliar codebase?	"Claude Code reads your files directly, so you can ask questions like ""How does the deploy pipeline work?"" and it will read CI workflows, Helm charts, deploy scripts, and Dockerfiles to give you a narrative walkthrough with specific file references. Follow up with targeted questions about specific components.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance."	training/library/topics/claude-code/street_ops.md
claude-code/012	claude-code	medium	claude-code,workflow,kubernetes	How can Claude Code assist with debugging Kubernetes OOMKilled pods?	Claude Code runs kubectl commands in your context: gets pod status, describes the OOMKilled pod, runs kubectl top for resource usage, checks resource limits in the pod spec, reads your Helm values for resource configuration, suggests the fix (e.g., bump memory limits), and validates with helm lint — all without copy-pasting.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/street_ops.md
claude-code/013	claude-code	hard	claude-code,sub-agents	What are Claude Code sub-agents and when should you use them?	Sub-agents (Agent tool) are spawned to handle parallel tasks autonomously. Use them for bulk operations like checking multiple services for vulnerabilities, processing endpoint files in parallel, or research that produces large output. The sub-agent's full output stays in its own context — only the summary returns to the main session, preserving your context window.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/primer.md
claude-code/014	claude-code	easy	claude-code,memory	How does the Claude Code memory system work?	Claude Code can persist information across sessions using memory files stored in ~/.claude/projects/<project>/memory/. Ask it to remember things like team conventions, environment details, or debugging patterns. Memories are loaded automatically in future sessions. View them with /memory.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/primer.md
claude-code/015	claude-code	hard	claude-code,footguns,security	Why is YOLO mode dangerous for infrastructure work and what should you use instead?	"YOLO mode auto-approves all commands including terraform apply, kubectl delete, and rm -rf. One bad inference can destroy resources. Instead, use targeted permissions with allowedTools patterns that grant read-only access to production tools. Example: allow ""kubectl get *"" and ""kubectl describe *"" but not ""kubectl delete *"".\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance."	training/library/topics/claude-code/footguns.md
claude-code/016	claude-code	medium	claude-code,footguns,git	"What is the ""overconfident commit"" footgun and how do you prevent it?"	Claude Code can commit and push directly, including adding all files with git add -A (catching debug files, temp fixtures, IDE config). Prevent it by specifying target branches, requiring tests before commits, and adding git rules to CLAUDE.md: never push to main, always run make test, use feature branches.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/footguns.md
claude-code/017	claude-code	medium	claude-code,footguns,context	What happens when Claude Code's context window fills up during long sessions?	Claude Code starts forgetting earlier conversation including your constraints and CLAUDE.md instructions. Signs: repeating failed approaches, losing track of modified files, ignoring instructions it followed earlier. Fix: use /compact at milestones, break long tasks into separate sessions, and watch the context usage indicator.\n\nGotcha: Claude Code has a context window limit. Keep prompts focused and provide relevant code snippets rather than entire files when possible.	training/library/topics/claude-code/footguns.md
claude-code/018	claude-code	easy	claude-code,slash-commands	What built-in slash commands are available in Claude Code?	Key built-in commands: /help (usage), /clear (reset context), /compact (compress conversation), /model (switch model), /cost (token usage), /permissions (manage tool access), /memory (view memories), /config (edit settings), /review (review changes), /fast (toggle fast mode), /vim (vim keybindings).\n\nRemember: slash commands (/commit, /review-pr) invoke built-in skills. They're shortcuts for common workflows that Claude Code handles end-to-end.	training/library/topics/claude-code/primer.md
claude-code/019	claude-code	hard	claude-code,workflow,ci	How would you set up Claude Code for automated PR review in a CI pipeline?	"Use claude -p in a GitHub Actions step: pipe the PR diff into Claude Code with a review prompt. Example: claude -p ""review this PR for security issues, missing error handling, and test coverage gaps"" < <(git diff main). Use --output-format json for structured results that can be posted as PR comments via gh api.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance."	training/library/topics/claude-code/street_ops.md
claude-code/020	claude-code	medium	claude-code,claude-md,tips	What makes an effective CLAUDE.md file?	"Include: stack and framework versions, validation/test commands (make test, ruff check), files that should not be modified (protected paths), naming conventions, commit message style, and a ""Do NOT"" section. Keep it concise — it's loaded every session and uses context window. Treat it like production config and keep it current.\n\nRemember: CLAUDE.md files provide repo-specific instructions. Precedence: direct user instruction > subtree CLAUDE.md > repo CLAUDE.md > workspace CLAUDE.md."	training/library/topics/claude-code/primer.md
claude-code/021	claude-code	medium	claude-code,footguns,mcp	How can MCP server configurations lead to credential leaks?	MCP configs in .claude/settings.json may contain database passwords or API tokens. If hardcoded and committed to git, secrets end up in repo history. Fix: use environment variable references (${DATABASE_URL}) instead of literal values, and add .claude/settings.local.json to .gitignore for per-developer secrets.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/footguns.md
claude-code/022	claude-code	easy	claude-code,tools	What are the main built-in tools Claude Code uses to interact with your system?	Read (read files), Edit (targeted edits), Write (create/rewrite files), Bash (run commands), Glob (find files by pattern), Grep (search file contents), Agent (spawn sub-agents), TodoWrite (track task progress), WebFetch (fetch URLs), and WebSearch (search the web).\n\nRemember: Claude Code asks permission before modifying files or running commands. Review changes before approving. Trust but verify.	training/library/topics/claude-code/primer.md
claude-code/023	claude-code	medium	claude-code,workflow,terraform	How can Claude Code help with Terraform state splitting?	Claude Code reads your main.tf, identifies networking resources (VPC, subnets, NAT gateways, route tables), creates a new module directory, generates terraform state mv commands, creates a migration script with rollback steps, and runs terraform fmt and terraform validate to verify. It handles the mechanical parts while you review the plan.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance.	training/library/topics/claude-code/street_ops.md
claude-code/024	claude-code	hard	claude-code,footguns,blast-radius	"What is the ""multi-surface blast radius"" footgun and how do you mitigate it?"	"Claude Code can edit files across your entire repo in one pass. A broad request like ""update the API version everywhere"" might touch app code, Terraform, Helm charts, CI pipelines, and docs simultaneously. One wrong pattern match breaks multiple systems. Fix: scope requests to specific surfaces (""update the API version in Helm values only"") and ask for the plan before executing.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance."	training/library/topics/claude-code/footguns.md
claude-code/025	claude-code	easy	claude-code,tips	What is the best way to get high-quality suggestions from Claude Code?	"Let it read first. ""Read the Helm chart and then suggest improvements"" produces better results than ""improve the Helm chart."" Also: start with context about what you're doing (debugging vs learning), be specific in requests, and use /compact aggressively during long sessions to keep the context window fresh.\n\nRemember: Claude Code understands your project through CLAUDE.md files, directory structure, and code context. Well-documented repos get better assistance."	training/library/topics/claude-code/street_ops.md

<!-- wiki:related:start -->
---

## Wiki Navigation

### Related Content

- [Claude Code](../../../../library/topics/claude-code/index.md) (Topic Pack, L1) — Claude Code

<!-- wiki:related:end -->
