🗺 Claude Code
Claude Code is Anthropic's agentic coding tool for the terminal and CI. It reads a `CLAUDE.md` file for project memory — conventions, commands, and context it should always know. It can run non‑interactively (headless) for automation and CI/CD (e.g. GitHub Actions). Hooks run *your* commands at lifecycle points (before/after a tool runs) to enforce policy or capture logs. It connects to external systems via MCP, and permissions control what it may do without asking. Use it for code review, refactors, test generation, and pipeline automation — with scoped permissions and human approval for risky operations.
In CI, Claude Code runs non‑interactively: a prompt in, structured output out, wired into pipelines like GitHub Actions. The discipline that makes it safe: scoped permissions (allowlist exactly what it may run), no broad shell or filesystem access, secrets kept out of context, and hooks or exit codes to enforce policy (fail the build on violations). High‑value jobs: automated review comments, test generation, refactor/migration checks, changelog updates — always landing behind human review.
“MHPC” — the four levers of Claude Code: Memory (CLAUDE.md), Hooks (lifecycle commands), Permissions (what it may do), Connectors (MCP). Automate confidently when all four are set — automate blindly when none are.
Before you automate with Claude Code, check “SCAR” — Scope permissions, CLAUDE.md current, Approve destructive actions, Review outputs. Automation without SCAR leaves one.
Practise this domain with original, exam-style questions.
Start practising free