Claude Certified Architect – Foundations Practice Question 84: GitHub Actions Claude Mentions

Claude Certified Architect, Foundations · Test 9 · question 4 of 10

Claude Code Configuration & Workflowshard

A team wants developers to comment @claude on issues and pull requests so Claude Code implements changes and pushes commits. Requirements: the API credential must never appear in the repository, the team's coding conventions must be followed, the workflow must wait for a mention instead of running on every event, and the team's existing CI must run on the commits Claude pushes. Which setup meets all of these?

Select one answer
Show answer and explanation

Answer:

  • B. Install the Claude GitHub App, store ANTHROPIC_API_KEY as a repository secret, keep conventions in CLAUDE.md, and leave out github_token and prompt

B is correct. The Claude Code GitHub Action (anthropics/claude-code-action) relies on the Claude GitHub App, with the API key stored as a GitHub secret (ANTHROPIC_API_KEY) and referenced as ${{ secrets.ANTHROPIC_API_KEY }}. With no prompt input the action runs in interactive mode and waits for the trigger phrase (@claude by default). Claude follows the conventions in the repository's CLAUDE.md. When github_token is omitted the action authenticates as the Claude GitHub App, so pushes can trigger other workflows.

A is wrong because a key written into a workflow file is committed to the repository; secrets must be stored as GitHub Secrets. C is wrong because providing a prompt input switches the action to automation mode, where Claude runs without waiting for a mention. D is wrong because GitHub does not trigger workflows on commits made with the default GITHUB_TOKEN, so the team's CI would not run on Claude's commits.

Reference: Claude Code GitHub Actions

Practice Test 9 ›

Study guides for Claude Certified Architect, Foundations