confluence-to-md

Fetch Confluence pages and convert them to clean local Markdown files.

11|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/qa-aman/next-leap-claude-code --skill confluence-to-md-qa-aman
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: confluence-to-md
Source: https://github.com/qa-aman/next-leap-claude-code/tree/main/.claude/skills/confluence-to-md
Command: npx skills add https://github.com/qa-aman/next-leap-claude-code --skill confluence-to-md-qa-aman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, beautifulsoup4, markdownify, python-dotenv, and includes scripts (resource) and references (resource) components.

What problem does it solve? Confluence pages are locked behind a web UI with HTML storage format, macros, and metadata noise, making it hard to use that content locally for documentation, analysis, or AI workflows. This Skill pulls pages via the Confluence REST API or MCP and saves them as readable Markdown files on disk. ## Core Features & Use Cases - Three fetch modes: download a single page by URL or page ID, export an entire space in batches of 5, or run a keyword search and pick which results to save. - Clean conversion: strips Confluence macros, breadcrumbs, author footers, and HTML attributes while keeping headings, tables, code blocks, and task lists intact. - Scriptable automation: a Python CLI script handles bulk exports with credentials from environment variables or a .env file. - Use Case: You need your team's product specs from a Confluence space available as local Markdown for an AI assistant to reference. Run the space mode to export all pages into a folder, batched and confirmed as it goes. ## Quick Start Ask the assistant to fetch a Confluence page from a pasted URL and save it as a Markdown file in the current directory.

Frequently Asked Questions about confluence-to-md

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a Confluence page to Markdown?▼

Provide the page URL or page ID and the skill fetches it via the Confluence API, strips macros and metadata, then saves a clean .md file. You can also run the included Python script with --mode single --page-id for direct conversion.

How do I export an entire Confluence space to Markdown files?▼

Use space mode with the space key, which searches all pages via CQL and downloads them into a folder named after the space. Pages are processed in batches of 5 with confirmation between batches to manage large exports.

What credentials are needed for the Confluence API script?▼

The script needs CONFLUENCE_URL, CONFLUENCE_USERNAME, and CONFLUENCE_API_TOKEN, read from environment variables, a .env file, or CLI flags. It uses basic auth with the requests library against the Confluence REST API.

Does Confluence macro content survive the Markdown conversion?▼

Code macros become fenced code blocks with language tags, info and note macros become blockquotes, and status macros become bracketed labels. Navigation macros like table of contents, page trees, and recently-updated lists are removed entirely.

Why does the Confluence export fail on some pages?▼

Failures typically come from invalid credentials, restricted page permissions, or network errors returned by the REST API. The script reports each failed page with its title and error reason while continuing with the remaining pages.