# Confluence Docs

> Search and read Confluence documentation. Use when looking for internal docs, knowledge base articles, runbooks, or team documentation stored in Confluence.

- Skill: `incidentfox/confluence-docs` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add incidentfox/confluence-docs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/incidentfox/confluence-docs/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: incidentfox (https://skillmd.com/u/incidentfox)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/incidentfox/confluence-docs

---


# Confluence Documentation

## Authentication

Set these environment variables:
- `CONFLUENCE_URL` — Your Confluence instance URL (e.g., `https://yourcompany.atlassian.net`)
- `CONFLUENCE_EMAIL` — Your Atlassian account email
- `CONFLUENCE_API_TOKEN` — API token from https://id.atlassian.com/manage-profile/security/api-tokens

---

## Available Scripts

All scripts are in `.claude/skills/confluence-docs/scripts/`

### search_pages.py - Search Pages
```bash
python .claude/skills/confluence-docs/scripts/search_pages.py --query SEARCH_QUERY [--space SPACE_KEY] [--limit N]

# Examples:
python .claude/skills/confluence-docs/scripts/search_pages.py --query "refund policy"
python .claude/skills/confluence-docs/scripts/search_pages.py --query "onboarding" --space HR
python .claude/skills/confluence-docs/scripts/search_pages.py --query "deployment process" --limit 20
```

---

## Client Library Functions

The `confluence_client.py` module provides:

| Function | Purpose |
|----------|---------|
| `search_content(cql, limit)` | Search pages using CQL |
| `get_page_by_id(page_id)` | Get page content by ID |
| `get_page_by_title(space, title)` | Get page by title + space |

---

## Common CQL Patterns

| Pattern | Example | Purpose |
|---------|---------|---------|
| Text search | `text ~ "deployment"` | Full text search |
| Space filter | `space = "ENG" AND type = page` | Pages in a space |
| Recent docs | `lastModified >= now("-30d")` | Recently updated |
| By label | `type = page AND label = "runbook"` | Pages with label |
| Combined | `space = "HR" AND text ~ "onboarding"` | Complex queries |

---

## Common Workflows

### 1. Find Documentation on a Topic

```bash
# Step 1: Search broadly
python search_pages.py --query "authentication"

# Step 2: Narrow to a space
python search_pages.py --query "authentication" --space ENG
```

### 2. Find Internal Processes

```bash
python search_pages.py --query "how to request access"
```

### 3. Research Before Answering

```bash
# Search for existing documentation
python search_pages.py --query "refund process"

# Get full page content using the client library
# (from Python code, not CLI — use get_page_by_id)
```

---

## Quick Reference

| Goal | Command |
|------|---------|
| Search pages | `search_pages.py --query "topic"` |
| Filter by space | `search_pages.py --query "topic" --space ENG` |

---

## Best Practices

- **Start broad** — Search without space filter first
- **Use spaces** — Narrow with `--space` when you know the team
- **Check recency** — Recent pages are more likely current
- **Read full page** — Use `get_page_by_id()` from the client library when search snippets aren't enough

