/aiops-skill:context-fetcher

๐Ÿ—‚๏ธ Context Retrieval

Retrieve configuration files, runbooks, and relevant messages from GitHub, Confluence, and Slack to support job investigation and incident analysis โ€” using MCP server integrations.


When to Use

๐Ÿ’ก
Invoke this skill when you want to:
  • Find the configuration files for a job or service before or during investigation
  • Retrieve runbooks or troubleshooting guides from Confluence
  • Review recent code changes related to a failure
  • Search Slack for team discussions about a specific job or incident
  • Gather documentation context before running root cause analysis

Example invocations:

"Get context for job OCP-Workload-1234567"
"Find the configuration files for the ocp-workload-example catalog item"
"Search for runbooks related to namespace provisioning failures"
"Look up Slack messages about the recent OCP deployment issues"

Prerequisites

๐Ÿ™

GitHub MCP Server Required for GitHub

Configure the github MCP server in your Claude Code settings. Enables mcp__github__search_code and mcp__github__get_file_contents.

๐Ÿ“„

Confluence MCP Server

Configure the confluence MCP server for access to runbooks, architecture docs, and incident reports. Enables mcp__atlassian__confluence_search and mcp__atlassian__confluence_get_page.

๐Ÿ’ฌ

Slack MCP Server

Configure the Slack MCP server to search channel history for messages and replies related to the investigation topic.

โ„น๏ธ
MCP server setup: Add server entries to your Claude Code settings file. After adding new MCP servers, restart Claude Code for them to become available. Check that mcp__github__* tools appear in your available tools list before invoking this skill.

6-Step Workflow

  1. Identify Search Terms [Claude]

    Extracts relevant keywords from the job name, service name, error messages, or incident details to use as search queries across all sources.

  2. Search GitHub [MCP]

    Searches repositories for configuration files, source code, CI/CD definitions, and infrastructure-as-code. Uses mcp__github__search_code and mcp__github__get_file_contents.

    ``` # Example search strategies path:config/*.yaml "job-name" extension:yaml "catalog-item-name" repo:org/agnosticv "workload-name" ```
  3. Search Confluence [MCP]

    Finds runbooks, architecture docs, configuration guides, and incident reports using mcp__atlassian__confluence_search. Supports CQL queries for advanced filtering.

    ``` # Example CQL queries space = "Operations" AND text ~ "job-name" label:runbook AND title ~ "namespace-provisioning" ```
  4. Search Slack [MCP]

    Retrieves channel history and replies using mcp__slack__slack_get_channel_history to find team discussions, incident updates, and documentation links relevant to the investigation.

  5. Synthesize Findings [Claude]

    Organizes all results by source (GitHub, Confluence, Slack) with relevance ratings, file paths, page links, and key excerpts to give a structured investigation brief.

  6. Capture Feedback [Claude]

    Calls the feedback-capture skill to record the user's experience with the investigation. This happens automatically at the end of every context-fetcher invocation.


GitHub Search Capabilities

The skill searches GitHub for:

Search strategies:

Strategy Example
By file path pattern path:config/*.yaml "catalog-item"
By content keywords "job-name" AND "config"
By file extension extension:yaml "workload"
In specific repository repo:org/agnosticv "search-term"

Confluence Search Capabilities

The skill retrieves from Confluence:

Search strategies:

Strategy Example
By space filter space = "Operations"
By label label:runbook, label:troubleshooting
By content text ~ "namespace-provisioning"
CQL advanced space = "Eng" AND text ~ "job-name"

Configuration

MCP servers are configured in .claude/settings.json or the global Claude Code settings:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>" }
    },
    "confluence": { },
    "Slack": { }
  }
}

After adding MCP servers, restart Claude Code to activate them.