agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/brainstorm-agent-runs/SKILL.md

brainstorm-agent-runs

Skill4 starsChanged 6 months agoMITView on GitHub

Activate agent-run brainstorming protocol to identify and analyze Agent CI/CD runs via GitHub API for a given Pull Request. You MUST activate this skill when analyzing or brainstorming agent runs.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When analyzing a Pull Request and you need to understand the outcome of associated agentic workflow runs.

    line 17
  2. Distinctive:

    If an agent task was triggered on a PR but the results are unclear or hidden within CI check details.

    line 18
  3. Very specific:

    When generating diagrams for codebase architecture or generic GitHub PR history (use brainstorm-github-pr instead).

    line 24
  4. Very specific:

    If the repository does not employ GitHub Agentic Workflows (gh-aw).

    line 25
  5. Very specific:

    Identify Runs: Use the GitHub API to query all runs matching either the PR branch OR title, bypassing gh pr checks limitations.

    line 36
  6. Distinctive:

    When an active Pull Request is associated with the runtime context or the user requests PR analysis, you MUST identify agentic runs in the …

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: brainstorm-agent-runs

<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->

Analyze execution logs of agentic runs in CI/CD pipelines to extract insights about implementation status, challenges, and next steps for a Pull Request.

When to Use

  • When analyzing a Pull Request and you need to understand the outcome of associated agentic workflow runs.
  • If an agent task was triggered on a PR but the results are unclear or hidden within CI check details.
  • To map out the execution history and failures of agents interacting with a specific Pull Request.

When Not to Use

  • For analyzing non-agent CI pipelines (e.g., standard unit tests or linters), where github-actions or gh-run skills are more direct.
  • When generating diagrams for codebase architecture or generic GitHub PR history (use brainstorm-github-pr instead).
  • If the repository does not employ GitHub Agentic Workflows (gh-aw).

Common Pitfalls

  • Using gh pr checks Exclusively: Relying solely on gh pr checks and missing workflow_dispatch or issue_comment triggers that aren't natively attached to the HEAD commit.
  • Fetching Full Logs Too Early: Trying to download the complete execution logs for every run before creating the high-level Ishikawa diagram, wasting token budget.
  • Ignoring Branch Context: Querying the /actions/runs API without filtering by the PR's headRefName or title, returning unrelated runs from main or other branches.

Core Process

  1. Trigger Recognition: Activate when an active Pull Request is associated with the runtime context or the user requests PR analysis.
  2. Identify Runs: Use the GitHub API to query all runs matching either the PR branch OR title, bypassing gh pr checks limitations.
  3. Extract Insights: Analyze the identified runs (successes, failures, missing facts) without checking detailed logs prematurely.
  4. Visualize: Generate an ishikawa-beta diagram representing the findings.

Commands / Usage Patterns

List all agent runs for a PR by matching either branch name or PR title:

branch_name=$(gh pr view <pr_number> --repo <owner>/<repo> --json headRefName -q .headRefName)
pr_title=$(gh pr view <pr_number> --repo <owner>/<repo> --json title -q .title)

gh api repos/<owner>/<repo>/actions/runs --paginate \
  -q ".workflow_runs[] | select((.head_branch == \"$branch_name\" or .display_title == \"$pr_title\") and .name == \"Cogni AI Agent\") | {id: .id, status: .status, conclusion: .conclusion, event: .event}"

Brainstorming - Agent runs

When an active Pull Request is associated with the runtime context or the user requests PR analysis, you MUST identify agentic runs in the CI/CD pipeline and analyze their execution logs to extract insights about the implementation status, challenges, and next steps.

Step 1: Agent PR runs

First, identify any agentic runs in the CI/CD pipeline associated with the Pull Request. Because gh pr checks only shows the HEAD commit's latest runs and routinely misses manual workflow calls (workflow_dispatch) or keyword triggers (issue_comment), you MUST use the GitHub API to query all runs matching either the PR branch OR title.

Command to list all agent runs for a PR:

branch_name=$(gh pr view <pr_number> --repo <owner>/<repo> --json headRefName -q .headRefName)
pr_title=$(gh pr view <pr_number> --repo <owner>/<repo> --json title -q .title)

gh api repos/<owner>/<repo>/actions/runs --paginate \
  -q ".workflow_runs[] \
  | select((.head_branch == \"$branch_name\" or .display_title == \"$pr_title\") and .name == \"Cogni AI Agent\") \
  | {id: .id, status: .status, conclusion: .conclusion, event: .event}"

Example ishikawa-beta Diagram:

%% This diagram visualizes the identification of agentic runs in the CI/CD pipeline for a PR.
ishikawa-beta
    Cogni AI Agent Runs
    issue_comment
        Agent Run (#<run_id>)
            success
    workflow_dispatch
        Agent Run (#<run_id>)
            failure
            Missing facts

At this step, don't check for more detailed logs yet.

Related Skills

  • brainstorm: You MUST load this skill when asked to brainstorm, explore options, or break down complex problems.
  • brainstorm-github-pr: You MUST load this skill when asked to analyze or brainstorm a Pull Request.
  • gh-api: You MUST load this skill when executing advanced GitHub CLI API queries.
  • mermaid: You MUST load this skill when creating or maintaining stable Mermaid.js diagrams.
  • mermaid-beta: You MUST load this skill when creating or maintaining experimental Mermaid.js beta diagrams like ishikawa-beta.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.