Synchronisation Confluence-Markdown

VérifiéSûr

Synchronisez les pages wiki Confluence avec des fichiers Markdown locaux. Téléchargez des pages pour les modifier ou envoyez des modifications Markdown locales vers une page wiki existante.

Spar Skills Guide Bot
DocumentationIntermédiaire
23/07/2026
Claude CodeCursorWindsurfCopilotCodex
#confluence#markdown#wiki-sync#mcp#attachments

Recommandé pour

Synthèse automatique

Synchronise des pages Confluence avec des fichiers Markdown locaux via un serveur MCP, pour la lecture, l'édition puis la republication des modifications.

Points forts

  • Synchronisation bidirectionnelle avec gestion automatique des pièces jointes (images téléchargées au pull, uploadées au push)
  • Le front matter écrit par pull_page (page_id, title, space_key, version) permet de pousser les changements sans re-fournir l'identifiant de page
  • read_page offre un aperçu du contenu sans rien écrire sur le disque
  • Encodage URL des cibles de pièces jointes pour que les liens survivent à un aller-retour dans un parseur Markdown

Limites

  • La création de nouvelles pages est explicitement hors périmètre de cette version
  • Suppose un serveur MCP confluence-markdown-mcp déjà configuré avec les variables d'identifiants Atlassian (e-mail + API token ou PAT)
  • Les liens vers des fichiers non-image ne sont envoyés que si le marqueur <!--cm-attachment--> suit immédiatement le lien, une règle facile à oublier
  • Aucune gestion de conflit ou de fusion n'est décrite en cas d'édition concurrente de la page
Quand l'utiliser

À utiliser quand il faut récupérer une page Confluence en Markdown local, la retravailler, puis republier le résultat sur la page existante.

Quand l'éviter

À éviter pour créer une nouvelle page Confluence, pour une synchronisation en masse de plusieurs pages ou pour un travail hors connexion sans identifiants Atlassian.

Analyse de sécurité

Sûr
Score qualité80/100

The skill is pure documentation for driving an MCP wiki-sync server. It handles API tokens but only via environment variables, contains no destructive, obfuscated, or exfiltrating instructions, and the only outbound data flow (page/attachment upload) is the tool's stated legitimate purpose.

Points d'attention
  • •Reads Confluence credentials (CONFLUENCE_EMAIL/CONFLUENCE_API_TOKEN or CONFLUENCE_PAT) from environment variables; it never instructs the model to echo, log, or transmit them elsewhere.
  • •push_page uploads local Markdown files plus referenced images and marker-tagged attachments to the user's Confluence instance — expected for a sync tool, but it does move local file content off the machine.
  • •Relies on an external MCP server (confluence-markdown-mcp) for all network operations; no shell commands, curl|sh, rm -rf, base64 payloads, or safety-disabling instructions appear in the skill.
  • •Iframe embeds are restricted to http/https and dangerous attributes (onload, srcdoc, sandbox) are stripped, which is a sane safety posture.
Comment cette analyse est faite

Exemples

Pull a page for editing
Pull Confluence page 123456 into ./docs so I can edit it locally, then show me the file path you got.
Push local edits back
Push my changes in docs/Release-Notes.md back to Confluence page 123456 and confirm the attachments uploaded correctly.
Read without writing
Use read_page to summarise Confluence page 987654 for me — don't write any files to disk.

name: confluence-markdown description: Sync Confluence wiki pages with local Markdown files through an MCP server. Use it to pull a page down for editing, or push local Markdown edits back to an existing wiki page. version: 0.2.0

confluence-markdown skill

This skill teaches an MCP-capable assistant how to work with the confluence-markdown-mcp server.

🇨🇳 中文版本见 skill.zh-CN.md。

When to use

Invoke this skill whenever the user wants to:

  • Read / fetch a Confluence wiki page for editing, summarisation or quotation (use pull_page with output_dir, or read_page if you only need the content).
  • Edit and publish local Markdown changes back to Confluence (use push_page with the exact path and page_id).
  • Preview a page inline – access the confluence://page/{page_id} resource.

Do not use it for creating brand-new pages; that is out of scope in the current version. Attachments referenced by the page (images and file links) are synchronised automatically in both directions — downloaded alongside the Markdown file on pull_page, and created / updated on push_page.

Prerequisites

The server reads credentials from environment variables. Confirm with the user that the following are set before the first call:

  • CONFLUENCE_BASE_URL – e.g. https://<tenant>.atlassian.net
  • CONFLUENCE_EMAIL + CONFLUENCE_API_TOKEN – Atlassian account email and API token for Basic auth
  • CONFLUENCE_PAT – Personal Access Token for Bearer auth

Optional:

  • CONFLUENCE_TIMEOUT – HTTP timeout in seconds (default 30)
  • CONFLUENCE_MARKDOWN_DIR – default root for relative output_dirs

Authentication is either/or: use email + API token for Basic auth, or set CONFLUENCE_PAT for Bearer auth. If both are present, the PAT is used.

Tools provided

pull_page(page_id: string, output_dir?: string)

Downloads a Confluence page. When output_dir is provided it must be a directory – the Markdown file name is generated automatically by the server from the page title (unsafe characters are stripped), so the caller should never pass a full file path. The resulting file contains YAML-style front matter (page_id, title, space_key, version) and the response includes markdown_preview plus the resolved path. Without output_dir, the full Markdown body is returned in markdown.

push_page(file_path: string, page_id?: string, title?: string)

Uploads a local Markdown file back to Confluence. The target page_id may be omitted if the file carries it in its front matter (which pull_page writes automatically). title defaults to the front-matter title or the page's current title.

Attachment upload rules on push:

  • Image references are uploaded automatically, for example ![image](attachments/example.png).
  • Ordinary file links are uploaded only when the link is immediately followed by <!--cm-attachment-->, for example [file](attachments/example.eml) <!--cm-attachment-->.
  • The marker must come after the link. <!--cm-attachment-->[file](...) is not recognised.
  • pull_page / read_page URL-encode Markdown attachment targets when the filename contains spaces, parentheses, or non-ASCII characters so the link survives a round trip through Markdown parsers.
  • URL-encoded local paths are decoded before matching and naming the attachment, so an encoded path and the decoded local filename stay in sync on upload and in the page body.

read_page(page_id: string)

Convenience wrapper around pull_page that never writes to disk – returns the Markdown body plus basic metadata.

Recommended workflow

  1. Ask the user for the Confluence page ID (and optional local path).
  2. Call pull_page with an output_dir; confirm the new file location (the filename is produced from the page title by the server).
  3. Propose Markdown edits; have the user review before uploading.
  4. Call push_page with the same file_path; display the returned new version.

Formatting guarantees

The server handles the following Confluence storage-format constructs when converting to Markdown, and reverses the process on upload:

| Storage format | Markdown | | --- | --- | | code macro (with language + CDATA) | Fenced code block ```lang | | info / note / warning / tip | > [!INFO] blockquote admonition | | <table> with <th>/<td> | Pipe table (first row as header) | | <ul>/<ol>/<li> (nested) | - / 1. list (2-space indent) | | <ac:task-list> with <ac:task> | - [ ] / - [x] task items | | <a> / <img> | [text](url) / ![alt](src) | | <span style="color: …; background-color: …"> | Same <span> verbatim | | <p style="text-align: left/right/center/justify"> | Same <p> verbatim | | Inline <u>, <s>/<del>, <ins>, <sub>, <sup>, <br> | Same tag verbatim | | html / html-bobswift macro (embedded <iframe>, e.g. drawio / diagrams.net) | Raw HTML body is unwrapped into a Markdown <iframe …></iframe> line; push re-wraps it in html-bobswift automatically | | Any other <ac:structured-macro> | HTML comment token that round-trips |

Because unknown macros are preserved as comments, do not delete them in an edit unless the user explicitly asks to remove that block.

drawio / iframe embeds

Confluence renders drawio / diagrams.net diagrams through an <iframe> inside an html-bobswift (or html) user macro. On pull the iframe is unwrapped onto a single Markdown line; on push the server re-wraps it in the same macro so Confluence can render it. Iframe src attributes are restricted to http / https URLs and non-allow-listed attributes (onload, srcdoc, sandbox, …) are dropped so unsafe embeds cannot leak through a round-trip.

Error handling

  • RuntimeError: Missing Confluence credentials... → remind the user to export the required environment variables.
  • ConfluenceError: (401 Unauthorized) → the API token or PAT is invalid, expired, or lacks permission.
  • ConfluenceError: (404 Not Found) → double-check the page_id.
  • FileNotFoundError on push_page → verify the absolute file path.

Always surface the returned version number after a push_page call so the user can confirm the update.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/confluence-markdown-sync-mrx3y0iz' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/confluence-markdown-sync-mrx3y0iz/download' --output '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md.part' && mv '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md.part' '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Extrait original : Prerequisites

The server reads credentials from environment variables. Confirm with the user that the following are set before the first call:

  • CONFLUENCE_BASE_URL – e.g. https://<tenant>.atlassian.net
  • CONFLUENCE_EMAIL + CONFLUENCE_API_TOKEN – Atlassian account email and API token for Basic auth
  • CONFLUENCE_PAT – Personal Access Token for Bearer auth

Optional:

  • CONFLUENCE_TIMEOUT – HTTP timeout in seconds (default 30)
  • CONFLUENCE_MARKDOWN_DIR – default root for relative output_dirs

Authentication is either/or: use email + API token for Basic auth, or set CONFLUENCE_PAT for Bearer auth. If both are present, the PAT is used.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md' && test -s '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/confluence-markdown' && cp -R '.skill-downloads/confluence-markdown-sync-mrx3y0iz' '.claude/skills/confluence-markdown'

Cursor
test -f '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md' && test -s '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/confluence-markdown' && cp -R '.skill-downloads/confluence-markdown-sync-mrx3y0iz' '.cursor/skills/confluence-markdown'

Codex
test -f '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md' && test -s '.skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/confluence-markdown' && cp -R '.skill-downloads/confluence-markdown-sync-mrx3y0iz' '.agents/skills/confluence-markdown'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/confluence-markdown-sync-mrx3y0iz'

openskills read 'confluence-markdown-sync-mrx3y0iz'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/confluence-markdown-sync-mrx3y0iz/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires