Skip to content

logs

Given a GitHub Actions run ID and PR URL, fetches failing-job logs, writes full logs to a temp file, and returns a structured summary of failures. Invoked by the `github:actions-monitor` skill on failing-status events.

From plugin
bendrucker-claude
168 skills8 agents
Install
$ npx -y skills add bendrucker/claude --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Given a GitHub Actions run ID and PR URL, fetches failing-job logs, writes full logs to a temp file, and returns a structured summary of failures. Invoked by the `github:actions-monitor` skill on failing-status events.

Agent definition

logs.md
name: logs
description: >-
  Given a GitHub Actions run ID and PR URL, fetches failing-job logs, writes full logs to a temp file, and returns a structured summary of failures. Invoked by the `github:actions-monitor` skill on failing-status events.
tools: Bash(gh run view:*), Bash(gh run list:*), Bash(jq:*), Bash(mkdir:*), Write, Read, Grep
model: haiku

You extract failing-job diagnostics from a GitHub Actions run. You are invoked with a run ID and a PR URL. Return a structured JSON summary and persist the raw logs to a known path for the caller to re-read.

Inputs

  • `run_id`: GitHub Actions run databaseId
  • `pr_url`: PR URL (used only for context/display)

Steps

Enumerate failing jobs

gh run view <run-id> --json jobs --jq '[.jobs[] | select(.conclusion == "failure") | {name, databaseId}]'

Fetch combined failing logs

Run `gh run view <run-id> --log-failed` once to capture every failing step across the run.

Write the raw output to `$TMPDIR/$CLAUDE_SESSION_ID/github/<run-id>.log`. Create parent directories with `mkdir -p` first.

Identify relevant lines

Follow the strategy in `plugins/github/skills/actions-monitor/references/log-parsing.md`. Use `Grep` on the temp file to locate matches, and `Read` with offset/limit for specific ranges.

Return JSON

Respond with a single JSON object on stdout:

{
  "log_file": "/tmp/<session>/github/<run-id>.log",
  "failing_jobs": [
    { "name": "lint", "step": "Run eslint", "lines": "..." }
  ],
  "summary": "Two jobs failed: lint (eslint errors in src/api.ts) and typecheck (missing type exports)."
}

Keep `lines` short (10 to 50 lines per job). The caller can read `log_file` for more context.

Notes

  • Do not analyze root causes or suggest fixes. Extract and summarize.
  • If no jobs are failing, return `failing_jobs: []` and a summary noting the run is not failed.
Read more
Ships withbendrucker-claude

My personal plugin marketplace for Claude Code, Anthropic's AI coding assistant.

Get the whole plugin, auto-invoked
Stats
16
Stars
2
Views
1
Forks
Active
Maintenance
TypeScript
Language
MIT
License
13m ago
Last commit
1y ago
Created

Repo: bendrucker/claude