/aiops-skill:context-fetcher
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
- 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__github__* tools appear in your available tools list before invoking this skill.
6-Step Workflow
-
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.
-
Search GitHub
[MCP]Searches repositories for configuration files, source code, CI/CD definitions, and infrastructure-as-code. Uses
``` # Example search strategies path:config/*.yaml "job-name" extension:yaml "catalog-item-name" repo:org/agnosticv "workload-name" ```mcp__github__search_codeandmcp__github__get_file_contents. -
Search Confluence
[MCP]Finds runbooks, architecture docs, configuration guides, and incident reports using
``` # Example CQL queries space = "Operations" AND text ~ "job-name" label:runbook AND title ~ "namespace-provisioning" ```mcp__atlassian__confluence_search. Supports CQL queries for advanced filtering. -
Search Slack
[MCP]Retrieves channel history and replies using
mcp__slack__slack_get_channel_historyto find team discussions, incident updates, and documentation links relevant to the investigation. -
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.
-
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:
- Configuration files โ YAML, JSON, TOML (e.g.,
config.yaml,values.yaml,deployment.yaml) - Source code โ Role tasks, playbooks, Helm templates referenced by the job
- Documentation โ README files, docs directories, markdown files
- CI/CD definitions โ GitHub Actions workflows, Jenkinsfiles
- Infrastructure as Code โ Terraform, Ansible, Helm charts
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:
- Runbooks โ Operational procedures and troubleshooting guides
- Architecture documentation โ System designs and component interactions
- Configuration guides โ Setup and configuration instructions
- Incident reports โ Historical incidents and resolutions
- Knowledge base articles โ Best practices and common issues
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.