Skip to content
Productivity
Skill

/confluence-to-markdown

Internal fetcher module for Confluence pages. Fetches content via Atlassian MCP (preferred), REST API with Basic Auth (fallback), or browser DOM extraction via Claude in Chrome (last resort) and returns Markdown. Used by /bedrock:learn and /bedrock:sync — not intended for direct

From plugin
bedrock
10910 skills1 hook

Claude Code

$ npx -y skills add iurykrieger/claude-bedrock --skill confluence-to-markdown --agent claude-code

SKILL.md

confluence-to-markdown.SKILL.md
name: confluence-to-markdown
description: >
  Internal fetcher module for Confluence pages. Fetches content via Atlassian MCP (preferred),
  REST API with Basic Auth (fallback), or browser DOM extraction via Claude in Chrome (last resort)
  and returns Markdown. Used by /bedrock:learn and /bedrock:sync — not intended for direct user invocation.
user_invocable: false
allowed-tools: Bash, Read, Write, WebFetch, ToolSearch, mcp__plugin_atlassian_atlassian__*, mcp__claude-in-chrome__*

Confluence Fetcher

Internal module — invoked by `/bedrock:learn` Phase 1 and `/bedrock:sync` Phase 2, not user-invocable.

Fetches a Confluence page and returns its content as Markdown. Three layers in fallback order: **MCP (preferred) → REST API → Browser DOM extraction.**

**Dependency:** Browser fallback (Layer 3) requires `scripts/extract.js` (relative to this skill directory).

---

Step 1 — Parse URL

Parse the Confluence URL. Accept these formats:

  • `https://<domain>.atlassian.net/wiki/spaces/<spaceKey>/pages/<pageId>/<title>`
  • `https://<domain>.atlassian.net/wiki/spaces/<spaceKey>/pages/<pageId>`
  • `https://<domain>.atlassian.net/wiki/x/<shortlink>`
  • `https://<domain>.atlassian.net/wiki/pages/viewpage.action?pageId=<pageId>`

Extract:

  • **Base URL**: `https://<domain>.atlassian.net` (everything before `/wiki/...`)
  • **Page ID**: the numeric ID from the URL path (segment after `/pages/`) or `pageId` query parameter
  • **Full URL**: the original URL as provided (needed for browser fallback)

---

Step 2 — Layer 1: MCP (Atlassian)

The preferred layer. Uses the `plugin:atlassian:atlassian` MCP server if installed and authenticated.

2.1 Check MCP availability

Use ToolSearch to check if Atlassian MCP tools are available:

ToolSearch(query: "atlassian confluence page", max_results: 5)

Evaluate the result:

  • **MCP tools found and functional** (tools other than `authenticate` and `complete_authentication` are available) → proceed to **2.2 Fetch via MCP**
  • **Only `authenticate` / `complete_authentication` tools found** (MCP installed but not authenticated) → proceed to **2.3 Guide authentication**
  • **No Atlassian MCP tools found** → log and fall through:

> **MCP not available:** No Atlassian MCP server installed. > Install the Atlassian MCP plugin for Claude Code to enable direct Confluence access. > Falling back to API (Layer 2).

2.2 Fetch via MCP

Use the Atlassian MCP tools to fetch the page content. The specific tool depends on what the MCP exposes after authentication (typically a page read or content retrieval tool).

Call the MCP tool passing the page ID or URL. The MCP returns the page content directly.

  • **Success** → convert content to Markdown if not already, proceed to **Output Contract**
  • **Error** → log the error and fall through to Layer 2:

> **MCP fetch failed:** {error message}. > Falling back to API (Layer 2).

2.3 Guide authentication

If the MCP is installed but not authenticated, guide the user:

> **MCP not authenticated:** The Atlassian MCP server is installed but requires authentication. > Run `mcp__plugin_atlassian_atlassian__authenticate` to start the OAuth flow, then complete it in your browser. > After authentication, Confluence pages can be fetched directly via MCP.

Ask the user: "Would you like to authenticate the Atlassian MCP now, or skip to API fallback (Layer 2)?"

  • **User wants to authenticate** → invoke `mcp__plugin_atlassian_atlassian__authenticate`, wait for the user to complete the OAuth flow, then retry **2.2 Fetch via MCP**
  • **User declines** → log "User declined MCP authentication, falling to Layer 2" → continue to Step 3

---

Step 3 — Layer 2: API (REST)

Uses the Confluence REST API with Basic Auth (API token + email).

3.1 Check credentials

echo "CONFLUENCE_API_TOKEN: ${CONFLUENCE_API_TOKEN:+set}" && echo "CONFLUENCE_USER_EMAIL: ${CONFLUENCE_USER_EMAIL:+set}"
  • **Both set** → proceed to **3.2 Compute auth header**
  • **Either missing** → guide and fall through:

> **API not available:** `CONFLUENCE_API_TOKEN` or `CONFLUENCE_USER_EMAIL` environment variable is not set. > Generate an API token at https://id.atlassian.com/manage-profile/security/api-tokens and export both variables: > `export CONFLUENCE_API_TOKEN="your-token"` and `export CONFLUENCE_USER_EMAIL="your-email"`. > Falling back to Browser extraction (Layer 3).

3.2 Compute Basic Auth header

echo -n "${CONFLUENCE_USER_EMAIL}:${CONFLUENCE_API_TOKEN}" | base64

3.3 Fetch the page

Use `WebFetch`:

WebFetch(
  url: "{baseUrl}/wiki/api/v2/pages/{pageId}?body-format=storage",
  headers: {
    "Authorization": "Basic {base64_value}",
    "Accept": "application/json"
  }
)

If WebFetch cannot send the Authorization header, fall back to `curl` via Bash:

curl -sL -H "Authorization: Basic {base64_value}" -H "Accept: application/json" \
  "{baseUrl}/wiki/api/v2/pages/{pageId}?body-format=storage"

3.4 Extract content from response

The API returns JSON with:

  • `title` — page title
  • `body.storage.value` — XHTML content (Confluence storage format)

3.5 Convert XHTML to Markdown

Convert the storage format XHTML to Markdown using these rules:

| XHTML element | Markdown output | |---|---| | `<h1>` through `<h6>` | `#` through `######` | | `<p>` | Paragraph with blank line separation | | `<strong>`, `<b>` | `**text**` | | `<em>`, `<i>` | `*text*` | | `<s>`, `<del>` | `~~text~~` | | `<a href="...">` | `[text](url)` | | `<ul>` / `<ol>` / `<li>` | Markdown lists (respect nesting) | | `<table>` | Markdown table with `\|` separators and header row | | `<ac:structured-macro ac:name="code">` | Fenced code block with language from `<ac:parameter ac:name="language">` | | `<pre>` | Fenced code block | | `<code>` (inline) | `` `code` `` | | `<blockquote>` | `> text` | | `<hr>` | `---` | | Confluence macros (`<ac:*>`) with text | Extract text content | | Confluence macros with no text (images, drawio, attachments) |

Read more
@iurykrieger
Ships withbedrock

Second Brain automation for Obsidian vaults — entity management, ingestion, compression, and sync via Claude Code skills

Stars on GitHub

Momentum

stars in total
109
Star history of iurykrieger/claude-bedrock on GitHub, a chart by star-history.com

Other skills on bedrock.

ask

ask

Adaptive vault reader skill. Receives a natural language question, uses graph.json as the primary index (Phase 2.0) before any…

@iurykrieger@iurykriegerInstall Skill
compress

compress

Vault alignment engine. Detects and fixes 5 types of structural misalignments: broken backlinks, concept fragmentation, entity…

@iurykrieger@iurykriegerInstall Skill
gdoc-to-markdown

gdoc-to-markdown

Internal fetcher module for Google Docs and Sheets. Fetches content via MCP (preferred, when available), Google API with bearer…

@iurykrieger@iurykriegerInstall Skill
healthcheck

healthcheck

Read-only vault health diagnostic. Generates a report without modifying any files. Checks: graphify-out integrity, setup…

@iurykrieger@iurykriegerInstall Skill
learn

learn

Ingests an external data source into the Second Brain. Fetches content from Confluence, Google Docs, GitHub repositories, remote…

@iurykrieger@iurykriegerInstall Skill
preserve

preserve

Single write point for the vault. Centralizes entity detection, textual matching, entity creation/update, and bidirectional…

@iurykrieger@iurykriegerInstall Skill

More skills from other plugins.

i-have-adhd

i-have-adhd

Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress…

@ayghri@ayghriInstall Skill
ab-test-analysis

ab-test-analysis

Analyze A/B test results with statistical significance, sample size validation, confidence intervals, and ship/extend/stop…

@phuryn@phurynInstall Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

Questions about confluence-to-markdown.

Which coding agents can use confluence-to-markdown?
confluence-to-markdown installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.