knowledge-base
Retrieves internal documentation and incident response runbooks from Confluence.
Install
mkdir -p .claude/skills/knowledge-base && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5780" && unzip -o skill.zip -d .claude/skills/knowledge-base && rm skill.zipInstalls to .claude/skills/knowledge-base
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Search runbooks, documentation, and knowledge base articles from Confluence. Use when looking for incident response procedures, service documentation, post-mortems, or troubleshooting guides.Key capabilities
- →Search Confluence pages
- →Find runbooks by service or alert
- →Retrieve incident post-mortems
- →Read full page content
- →Execute advanced CQL queries
How it works
It provides scripts to interface with the Confluence API, allowing users to search and retrieve documentation based on labels, spaces, or text content.
Inputs & outputs
When to use knowledge-base
- →Find incident response procedures
- →Search service documentation
- →Look up technical runbooks
- →Find past post-mortems
About this skill
Knowledge Base - Confluence Integration
Authentication
IMPORTANT: Credentials are injected automatically by a proxy layer. Do NOT check for CONFLUENCE_API_TOKEN in environment variables - it won't be visible to you. Just run the scripts directly; authentication is handled transparently.
Why Confluence Matters During Incidents
Before diving deep into technical investigation:
- Is there a runbook? Find documented procedures for this service/alert
- Has this happened before? Search for related post-mortems
- What's the architecture? Find service documentation
- What's the mitigation? Look for incident response guides
Available Scripts
All scripts are in .claude/skills/knowledge-base/scripts/
search_pages.py - General Search
Search across all Confluence pages for any topic.
python .claude/skills/knowledge-base/scripts/search_pages.py --query SEARCH_QUERY [--space SPACE_KEY] [--limit N]
# Examples:
python .claude/skills/knowledge-base/scripts/search_pages.py --query "payment service timeout"
python .claude/skills/knowledge-base/scripts/search_pages.py --query "database connection" --space SRE
python .claude/skills/knowledge-base/scripts/search_pages.py --query "api error" --limit 20
find_runbooks.py - Find Runbooks
Find runbooks for a specific service or alert. Searches for pages labeled as runbooks, playbooks, or SOPs.
python .claude/skills/knowledge-base/scripts/find_runbooks.py [--service SERVICE] [--alert ALERT_NAME] [--space SPACE_KEY] [--limit N]
# Examples:
python .claude/skills/knowledge-base/scripts/find_runbooks.py --service payment
python .claude/skills/knowledge-base/scripts/find_runbooks.py --alert "HighErrorRate"
python .claude/skills/knowledge-base/scripts/find_runbooks.py --service checkout --space OPS
find_postmortems.py - Find Post-mortems
Find incident post-mortems to understand historical patterns.
python .claude/skills/knowledge-base/scripts/find_postmortems.py [--service SERVICE] [--days N] [--space SPACE_KEY] [--limit N]
# Examples:
python .claude/skills/knowledge-base/scripts/find_postmortems.py --service payment
python .claude/skills/knowledge-base/scripts/find_postmortems.py --service payment --days 180
python .claude/skills/knowledge-base/scripts/find_postmortems.py --space SRE
get_page.py - Read Full Page Content
Get the full content of a specific Confluence page.
python .claude/skills/knowledge-base/scripts/get_page.py --page-id PAGE_ID
python .claude/skills/knowledge-base/scripts/get_page.py --title "Page Title" --space SPACE_KEY
# Examples:
python .claude/skills/knowledge-base/scripts/get_page.py --page-id 123456789
python .claude/skills/knowledge-base/scripts/get_page.py --title "Payment Service Runbook" --space SRE
search_cql.py - Advanced CQL Search
Use Confluence Query Language for advanced searches with filters.
python .claude/skills/knowledge-base/scripts/search_cql.py --cql "CQL_QUERY" [--limit N]
# Examples:
python .claude/skills/knowledge-base/scripts/search_cql.py --cql 'type = page AND label = "runbook"'
python .claude/skills/knowledge-base/scripts/search_cql.py --cql 'space = "SRE" AND lastModified >= now("-30d")'
python .claude/skills/knowledge-base/scripts/search_cql.py --cql 'text ~ "payment" AND label = "postmortem"'
Common CQL Patterns
| Pattern | Example | Purpose |
|---|---|---|
| Find by label | type = page AND label = "runbook" | Pages with specific labels |
| Space filter | space = "SRE" AND type = page | Pages in a specific space |
| Recent docs | lastModified >= now("-30d") | Recently updated pages |
| Combined | space = "OPS" AND label = "incident" AND text ~ "payment" | Complex queries |
| Post-mortems | label = "postmortem" OR title ~ "Post-mortem" | Incident reviews |
Common Workflows
1. Find Runbook for Alert
# Step 1: Search for runbook by alert name
python find_runbooks.py --alert "HighErrorRate"
# Step 2: If found, read the full runbook
python get_page.py --page-id 123456789
2. Investigate Service Issues
# Step 1: Find service documentation
python search_pages.py --query "payment service architecture"
# Step 2: Check for runbooks
python find_runbooks.py --service payment
# Step 3: Look for historical incidents
python find_postmortems.py --service payment --days 90
3. Learn from Past Incidents
# Step 1: Find similar post-mortems
python find_postmortems.py --service checkout --days 180
# Step 2: Read specific post-mortem
python get_page.py --page-id 987654321
# Step 3: Search for related issues
python search_cql.py --cql 'space = "SRE" AND text ~ "checkout timeout" AND lastModified >= now("-180d")'
4. Check for Known Issues
# Search for known issues documentation
python search_pages.py --query "known issues" --space SRE
# Look for troubleshooting guides
python search_cql.py --cql 'title ~ "troubleshooting" OR label = "troubleshooting"'
Quick Commands Reference
| Goal | Command |
|---|---|
| Find runbook | find_runbooks.py --service SERVICE |
| Find post-mortems | find_postmortems.py --service SERVICE |
| General search | search_pages.py --query "QUERY" |
| Read full page | get_page.py --page-id ID |
| Advanced search | search_cql.py --cql "CQL" |
Best Practices
When to Use Knowledge Base
- Start of investigation - Check for existing runbooks before deep diving
- Unknown service - Find architecture docs to understand the system
- Recurring alerts - Look for post-mortems about similar incidents
- Before remediation - Verify documented procedures exist
Search Strategy
- Start broad - Use general search first (
search_pages.py) - Narrow down - Use specific tools (
find_runbooks.py,find_postmortems.py) - Read details - Get full page content only when needed
- Check recency - Look for recent post-mortems to find patterns
Labels to Look For
Common Confluence labels in SRE/Ops teams:
runbook,playbook,sop- Operational procedurespostmortem,post-mortem,incident-review- Incident analysisarchitecture,design-doc- System designtroubleshooting,debugging- Diagnostic guides
Anti-Patterns to Avoid
- ❌ Reading full pages first - Start with search/find, then read details
- ❌ Ignoring runbooks - Check knowledge base before manual investigation
- ❌ Not learning from history - Post-mortems prevent repeated mistakes
- ❌ Searching without space filters - Narrow results with
--spacewhen possible
Integration with Other Skills
Combine knowledge base with other investigation tools:
# 1. Find runbook
python find_runbooks.py --alert "HighMemoryUsage"
# 2. Follow runbook instructions, e.g., check pod resources
python .claude/skills/infrastructure/kubernetes/scripts/describe_pod.py payment-xxx -n otel-demo
# 3. Document findings for future post-mortem
# (Manual step - create post-mortem page after incident resolution)
Tips for Effective Searches
- Use service names - Include the service name in queries
- Check multiple spaces - Try SRE, OPS, Engineering spaces
- Look for patterns - Post-mortems reveal recurring issues
- Verify freshness - Recent docs are more accurate
- Follow links - Runbooks often link to related documentation
When not to use it
- →When the information is not documented in Confluence
- →When searching for real-time system state
Prerequisites
Limitations
- →Limited to indexed Confluence content
- →Requires accurate labeling for best results
How it compares
It enables programmatic access to organizational knowledge, allowing for automated retrieval of runbooks during incidents.
Compared to similar skills
knowledge-base side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| knowledge-base (this skill) | 1 | 6mo | Review | Beginner |
| search-company-knowledge | 2 | 5mo | No flags | Beginner |
| confluence-deep-reader | 1 | 5mo | No flags | Beginner |
| wiki | 0 | 3mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by incidentfox
View all by incidentfox →You might also like
search-company-knowledge
atlassian
Search across company knowledge bases (Confluence, Jira, internal docs) to find and explain internal concepts, processes, and technical details. When Claude needs to: (1) Find or search for information about systems, terminology, processes, deployment, authentication, infrastructure, architecture, or technical concepts, (2) Search internal documentation, knowledge base, company docs, or our docs, (3) Explain what something is, how it works, or look up information, or (4) Synthesize information from multiple sources. Searches in parallel and provides cited answers.
confluence-deep-reader
krafton-ai
Read a Confluence page and recursively explore its child pages up to 3 levels deep. Use when users want to comprehensively read a Confluence page tree, understand hierarchical documentation, or analyze content across parent and child pages.
wiki
jmstar85
>
business-knowledge-workflow
TencentBlueKing
业务知识获取与 Skill 文档编写工作流。当用户需要熟悉新业务模块、从 iWiki 获取文档、结合代码分析生成架构文档、或将业务知识沉淀为 Skill 时使用。
Outline Open Source Team Knowledge Base and Wiki Platform
agentskillexchange
Outline is a fast, collaborative knowledge base for teams built with React and Node.js. It provides real-time editing, Markdown support, and a rich API for integration with Slack, authentication providers, and custom workflows.
project-wiki
StanfordSpezi
Set up and maintain a persistent, LLM-managed knowledge base for a digital health project — turning clinical observations, papers, interviews, and planning docs into a compounding, interlinked wiki.