Where Claude Joins a Developer Workflow: Interactive, GitHub Action or claude -p, Then Measure the Outcome
Four developer jobs land on three Claude surfaces: interactive Claude Code for a refactor, the GitHub Action for pull requests and @claude comments, and a bare claude -p command for a nightly report. Then three teams are judged on reach, depth and outcome, and only one actually moved delivery.
What you will learn
- Match each developer job to a surface by asking who is present when the work runs
- Set guardrails for an unattended run: --bare, dontAsk permission mode, an allowed tools list and a turn cap
- Choose between the GitHub Action's interactive mode (@claude) and automation mode (a prompt input)
- Judge adoption in three rungs: reach, depth and outcome against a baseline
Before you start
- Claude Code basics
- GitHub Actions basics
Picture a platform team that wants Claude to help its developers. Before anyone installs anything, there is one question to settle: who is present when the work runs? The answer decides the tool, the permissions and the guardrails. And afterwards, the team has to prove that it helped.
Four jobs, three surfaces
The team has four jobs:
- A developer refactors a module, and sits at the keyboard.
- Every pull request needs a review, and nobody is there.
- A teammate mentions
@claudein an issue comment. - A schedule triggers a nightly dependency report.
Each job lands on a different surface: interactive Claude Code for the refactor, the GitHub Action for the pull requests and the comments, and a scripted claude -p command for the nightly report. The architect's job is to match them.
Think of a workshop. At the bench, a craftsperson asks before each cut: that is interactive Claude Code, and you answer the prompts. On the night shift, a machine works alone with only the tools on its tray: that is claude -p and the Action, and you choose the tray in advance. And there's the clipboard: you count what changed, not who walked in. That is measuring adoption.
Who answers the prompt?
When someone is there, Claude wants to run a command, a permission prompt appears, and the developer says yes or no. When nobody is there, no one can answer. So in a script you choose the answer before the run starts. The dontAsk permission mode denies every call that would prompt. A tool on the allow list still runs; everything else that would prompt is denied.
The --allowedTools flag approves what you list. It isn't a fence on its own, so pair it with the mode.
Guardrails before the first run
For an unattended run, four flags:
--bareskips local hooks, plugins and the CLAUDE.md file, so the run behaves the same on every machine.--permission-mode dontAskdenies what would prompt.--allowedToolslists what may run.--max-turnscaps the run.
The GitHub Action has two modes. In interactive mode there is no prompt input, and Claude waits for @claude. In automation mode you give it a prompt, and it runs on any event, such as a pull request or a schedule. Either way, keys live in GitHub Secrets, never in the repository. For a deeper look at a review bot in CI, see a Claude Code review bot in CI.
The choice as a small function
This project makes no model call; it prints the command that would run each job. The flags and action inputs follow the Claude Code docs. From workflow_plan.py:
UNATTENDED = '--permission-mode dontAsk --max-turns {turns}'
def plan(task):
if task["someone_present"]:
return "Claude Code, interactive", "claude", "the developer answers each permission prompt"
if task["trigger"] == "pull request":
cmd = 'uses: anthropics/claude-code-action@v1 prompt: "Review this pull request"'
return "GitHub Action, automation mode", cmd, "a prompt input runs on every pull request"
if task["trigger"] == "comment":
return "GitHub Action, interactive mode", "@claude in an issue or PR comment", "write access is checked first"
cmd = f'claude --bare -p "{task["prompt"]}" --allowedTools "Read" ' + UNATTENDED.format(turns=task["turns"])
return "claude -p, scripted", cmd, "nobody to ask, so the allow list and turn cap are explicit"
Someone present means interactive Claude Code. A pull request trigger means the Action in automation mode. A comment means the Action in interactive mode. Anything else is a scripted command, bare, with the allow list, and the same UNATTENDED constant adds dontAsk and a turn cap every time.
workflow plan
Refactor a module -> Claude Code, interactive
claude
Review every PR -> GitHub Action, automation mode
uses: anthropics/claude-code-action@v1 prompt: "Review this pull request"
Fix from an issue -> GitHub Action, interactive mode
@claude in an issue or PR comment
Nightly dep report -> claude -p, scripted
claude --bare -p "Report stale deps" --allowedTools "Read" --permission-mode dontAsk --max-turns 5
Reach, depth, then outcome
Now, how do you know it worked? Three rungs:
- Reach: how many of the seats are active.
- Depth: how many sessions each active user has.
- Outcome: what changed in delivery, such as pull requests per user and review wait, against a baseline.
The numbers come from the analytics dashboard (users, sessions, pull requests per user) or from OpenTelemetry (session count and pull request count). Usage alone is not impact; compare with a baseline, next to your delivery metrics. Contribution metrics need the GitHub app and aren't available with zero data retention.
From adoption.py, with the project's own sample data, not a benchmark:
# team: seats, then (active users, sessions, PRs merged per active user, review wait in days) before and after
SAMPLE = {
"Payments": (12, (3, 9, 2.0, 3.0), (10, 62, 2.8, 1.5)),
"Platform": (10, (2, 5, 2.1, 2.8), (8, 55, 2.1, 2.7)),
"Mobile": (8, (1, 3, 2.0, 3.1), (2, 6, 2.0, 3.0)),
}
def judge(seats, before, after):
reach = round(100 * after[0] / seats)
depth = round(after[1] / after[0], 1)
better = after[2] >= before[2] * 1.1 or after[3] <= before[3] * 0.9
if reach < 50:
return reach, depth, "low reach: find the friction before judging impact"
if better:
return reach, depth, "usage and outcome both moved"
return reach, depth, "usage without outcome: look at workflow fit"
adoption (sample data)
Payments reach 83% depth 6.2 -> usage and outcome both moved
Platform reach 80% depth 6.9 -> usage without outcome: look at workflow fit
Mobile reach 25% depth 3.0 -> low reach: find the friction before judging impact
Payments moved on both: pull requests per user went from 2.0 to 2.8 and review wait from 3.0 to 1.5 days. Platform has slightly more depth than Payments (6.9 sessions per user), but its delivery numbers barely moved (2.1 to 2.1, 2.8 to 2.7): usage without outcome. Mobile has 2 active users out of 8 seats, so fix the friction first. For rolling this out across a team, see rolling out Claude Code to a team, and for measuring it in general, measuring if Claude is working.
The traps
- Give the CI job every tool so it never stalls. An unattended run needs a short allow list.
- Judge success by seats or lines accepted. That has no baseline. Platform would look like a success.
- Use one surface for every job. Interactive and unattended work need different rules.
The answer starts with who is present, then sets the guardrails, then measures the outcome.
Recap
| Job | Surface | Guardrail |
|---|---|---|
| Refactor, developer present | Claude Code, interactive | Developer answers each prompt |
| Review every PR | GitHub Action, automation mode | Prompt input, key in GitHub Secrets |
| @claude in a comment | GitHub Action, interactive mode | Write access is checked first |
| Nightly report | claude -p, scripted | --bare, allow list, dontAsk, --max-turns |
Put Claude where the work repeats, then measure the outcome. The project files for this lesson are in the community, free to join.
StudyEasy AI Community
Learn AI engineering, share what you build, and connect with other learners.
Free resources: lesson files, notebooks and code
Ask questions and join engineering discussions
Meet real people learning and building with AI
Related course on Udemy
Claude Certified Architect - Professional (CCAR-P) Exam Prep
Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)Related posts
CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages
Three needs in one repo: a test command, a rule that Claude must never read .env, and a shared deploy skill. See which file each belongs in, how the settings layers merge, and what a plugin manifest carries.
Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It
Pack a support team's ticket-triage routine into one skill folder, then watch three requests load one, two or all three levels: the catalog, the SKILL.md body, and a script whose code never enters the context.
One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI
Change one line in a repo and ask where it lands. A small resolver for bookshop-bot shows that a new model id in settings.json reaches only CI, a prompt bump reaches dev and CI, and a prod block edit reaches only prod.
Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges
Follow one prompt edit from a branch to a merge: version prompts and the model pin like code, keep the API key in GitHub Secrets, gate changes by path, let Claude review the diff, and leave the merge to a person.
