Stackmark › Prompts

Run Claude Code headless in CI for triage

`claude -p` is non-interactive — wire it into CI to auto-label issues, draft PR descriptions, or first-pass review failing tests.

  • Type: Prompt
  • Tags: Coding Agent Hacks, Intermediate, Claude Code
  • Updated: 2026-10-01

Prompt

`claude -p` is non-interactive — wire it into CI to auto-label issues, draft PR descriptions, or first-pass review failing tests. The `-p` flag takes a prompt and exits when done. With `--output-format json` you get structured results. Use it as a GitHub Action that runs on `issues.opened` to add labels, summarize the repro, and link related code. It's not a replacement for human review — it's the intern that does triage at 3am. Implementation example: # .github/workflows/triage.yml - run: | claude -p "Read issue #${{ github.event.issue.number }}. Look at related code. Output JSON: { labels: string[], summary: string, suspect_files: string[] }" \ --output-format json > triage.json gh issue edit ${{ github.event.issue.number }} \ --add-label "$(jq -r '.labels | join(",")' triage.json)"

More prompts

Privacy · Terms · llms.txt