claude-print

$npx mdskill add tobihagemann/turbo/claude-print

Reviews codebase claims by reading files before reporting findings

  • Identifies discrepancies in codebase claims through independent review.
  • Deploys Claude for read-only Git operations such as diff and log commands.
  • Decides based on the provided context and user-defined requirements.
  • Delivers a report of findings to the user without modifying the codebase.

SKILL.md

.github/skills/claude-printView on GitHub ↗
---
name: claude-print
description: "Run a non-interactive Claude Code print-mode call from Codex. Use when the user asks to \"claude print\", \"ask claude\", \"run claude\", \"consult claude\", or when a Codex Turbo skill needs Claude as an independent peer reviewer."
---

# Claude Print

Run a non-interactive Claude Code CLI print-mode call from Codex. This is the Codex edition's low-level Claude bridge for one-shot review and consultation prompts.

## Step 1: Choose Permission Scope

Default to read-only review:

```bash
claude -p --permission-mode dontAsk --allowedTools="Read,Grep,Glob,Bash(git diff:*),Bash(git log:*),Bash(git show:*),Bash(git status:*),Bash(git rev-parse:*),Bash(git ls-files:*)" "<prompt>" < /dev/null
```

The Bash allow-list is restricted to read-only git subcommands so peer review cannot mutate the working tree, branches, or remotes. Use broader permissions only when the user explicitly asks Claude to perform write-capable work.

## Step 2: Shape the Prompt

Keep the prompt compact and explicit:

- State that Claude is an independent reviewer.
- Include the exact scope: diff command, files, plan/spec path, or inline artifact text.
- Include the required output contract.
- Tell Claude to verify codebase claims by reading files before reporting findings.
- Tell Claude not to modify files unless the current task explicitly requests write-capable work.

For large context, write the context to `.turbo/claude/<tag>-ctx.txt` and pipe it:

```bash
mkdir -p .turbo/claude
cat .turbo/claude/<tag>-ctx.txt | claude -p --permission-mode dontAsk --allowedTools="Read,Grep,Glob,Bash(git diff:*),Bash(git log:*),Bash(git show:*),Bash(git status:*),Bash(git rev-parse:*),Bash(git ls-files:*)" "<prompt>"
```

## Step 3: Run Synchronously

Run Claude as a foreground command and wait for the result. Treat a returned `session_id` from the Codex shell harness as the still-running foreground command; keep polling that session until Claude exits, reaches a clear error, or has had roughly an hour for normal review work.

Do not background Claude print-mode calls, give up during quiet periods, or classify the run as empty while the shell session is still active. The parent workflow needs the complete output before evaluation.

## Step 4: Retry Credential Failures From a Fresh Context

When Claude reports an authentication, keychain, or session failure (for example, a `Not logged in` message) from a restricted execution context, do not conclude the user is logged out yet.

When the active harness exposes host execution, retry the same read-only command once from a fresh host-capable context. Use a fresh context rather than reusing one whose environment may stay restricted after its context changed. Retry only within the harness's existing permissions; do not bypass permission policy to reach the host.

If host execution is unavailable, or the fresh retry still fails, report the failure unchanged and let the active workflow decide the next step.

## Step 5: Interpret Results

Treat Claude's output as a review signal, not as an authority. Cross-check actionable findings against the codebase before applying fixes.

Then call `update_plan` to mark this step completed and continue with the next step of the active workflow.

## Rules

- Read-only operation is the default.
- Do not enable `--dangerously-skip-permissions` for peer review.
- Use `.turbo/claude/` for temporary prompt/context files.
- Redirect stdin with `< /dev/null` for non-piped invocations.

More from tobihagemann/turbo

SkillDescription
answer-reviewer-questionsFor each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to \"answer reviewer questions\", \"draft answers to PR questions\", or \"explain reviewer questions\".
apply-findingsApply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to \"apply findings\", \"apply fixes\", \"apply suggestions\", \"apply accepted findings\", \"fix the findings\", or \"apply the review results\".
assess-technical-debtAssess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, and architecture rot. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to \"assess technical debt\", \"find technical debt\", \"review technical debt\", \"what should we refactor\", \"find refactoring candidates\", \"where is the code rot\", or \"what's our worst code\". Analysis-only — does not modify code.
changelog-rulesShared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.
code-styleEnforce mirror, reuse, and symmetry principles to keep new code consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.
codex-execRun autonomous task execution using the codex CLI. Use when the user asks to \"codex exec\", \"run codex exec\", \"execute a task with codex\", or \"delegate to codex\".
commit-rulesShared commit message rules and technical constraints referenced by /stage-commit and /commit-staged. Not typically invoked directly.
commit-staged-pushCommit already-staged changes and push in one step. Use when the user asks to \"commit and push staged changes\", \"commit and push what's staged\", or \"commit staged and push\".
consult-claudeConsult Claude Code for second opinions, brainstorming, or difficult debugging from Codex. Use when the user asks to \"consult claude\", \"ask claude\", \"get claude's opinion\", \"brainstorm with claude\", or \"discuss with claude\".
consult-codexMulti-turn consultation with Codex CLI for second opinions, brainstorming, or collaborative problem-solving. Use when the user asks to \"consult codex\", \"ask codex\", \"get codex's opinion\", \"brainstorm with codex\", \"discuss with codex\", or \"chat with codex\".