Claude Code Configuration & Workflows20% of the exam

Claude Code in CI/CD pipelines

Running Claude Code unattended in CI: -p print mode, --output-format json with --json-schema and reading structured_output, failing on exit codes and missing output, CLAUDE.md as CI project context versus --bare, prior findings and existing tests in context, and the GitHub Actions and GitLab CI/CD integrations.

Official exam objective
Integrate Claude Code into CI/CD pipelines

~8 min read · 10 practice questions ·

What the exam expects

  • Run Claude Code in a pipeline with -p so the job does not hang waiting for interactive input.
  • Produce machine-parseable findings with --output-format json plus --json-schema, read them from structured_output, and fail the job on a non-zero exit or a missing field.
  • Give CI-invoked Claude Code project context (review criteria, testing standards, fixtures) through a committed CLAUDE.md, and know that --bare skips it.
  • Avoid duplicate output on reruns by passing prior findings and asking only for new or unaddressed issues, and avoid duplicate test suggestions by passing the existing tests.
  • Wire Claude Code into GitHub Actions or GitLab CI/CD, with the review run independent of the session that wrote the code.

Key terms: print mode (-p/--print: one non-interactive run that prints a response and exits); structured_output (the JSON field holding schema-validated output); bare mode (--bare: skips auto-discovery of CLAUDE.md, hooks, skills, MCP servers and more); claude_args (the GitHub Action input that passes CLI flags); automation mode (the Action running from a prompt input without an @claude mention).

Key facts

Non-interactive flag
Detail
-p / --print
Output formats
Detail
text (default), json, stream-json
--json-schema
Detail
Validated JSON after the workflow; print mode only
Where validated data lands
Detail
structured_output; result holds the text
No valid structured output
Detail
Field is absent; check before use
Exit codes
Detail
0 on success, non-zero when the run fails
--bare skips
Detail
Hooks, skills, commands, subagents, plugins, MCP, auto memory, CLAUDE.md
--bare future
Detail
Recommended for scripts; future default for -p
--max-turns
Detail
Print mode only; no limit by default; errors at the limit
CI project standards
Detail
CLAUDE.md in the repository root
SDK retry failure
Detail
error_max_structured_output_retries
Sources for this section (4)
  • Why does a CI step that calls claude "..." without -p time out?
  • When is structured_output missing from a --json-schema run?
  • Where should review criteria live so both the GitHub Action and local sessions use them?
  • What does --bare skip, and how do you restore project conventions?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the Claude Certified Architect - Foundations pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 30 lessons of the Claude Certified Architect - Foundations guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Inline practice questions and one-click topic practice (10 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the Claude Certified Architect - Foundations exam

Certifyforce is an independent study resource and is not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic.