local-mirror-format

local-mirror-format is a cursor rule for coding agents from YuriyEnshin/ConfluenceImportExport. It costs 1,248 tokens per session, scanned A, original, MIT.

A format guide for a local mirror of Confluence pages, where each page is saved as a folder containing its content, identity marker, and attachments. The folders reproduce the parent-and-child page hierarchy.

In plain words
What is it for?
Use it when working with page folders, index.html files, hidden identity markers, images, PDFs, and nested Confluence pages.
Why use it?
It explains how exported pages are represented on disk so an assistant can safely find, read, edit, or create them.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/yuriyenshin/confluenceimportexport/local-mirror-format
Clone the repo
git clone --depth 1 https://github.com/YuriyEnshin/ConfluenceImportExport

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for local-mirror-format

README.md
[![agentmods](https://agentmods.dev/badge/rules/yuriyenshin/confluenceimportexport/local-mirror-format.svg)](https://agentmods.dev/rules/yuriyenshin/confluenceimportexport/local-mirror-format)
Your own site
<a href="https://agentmods.dev/rules/yuriyenshin/confluenceimportexport/local-mirror-format"><img src="https://agentmods.dev/badge/rules/yuriyenshin/confluenceimportexport/local-mirror-format.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,248 This file is loaded in full into every session.
When invoked 1,248 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01248 $0.01248
Opus 5 $0.00624 $0.00624
Sonnet 5 $0.00250 $0.00250
Haiku 4.5 $0.00125 $0.00125

Measured 4d ago against content hash eef9f01ba90c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

local-mirror-format scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/ai-rules/local-mirror-format.mdc · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Local Confluence Mirror — Storage Structure and Format

This rule describes the local storage format for Confluence pages exported by the ConfluencePageExporter tool. Use it to correctly read, edit, and create pages in the local mirror.

Directory Hierarchy

Pages are stored as a folder tree that mirrors the Confluence page hierarchy:

<output-dir>/
  Root Page/
    index.html
    .id12345_7
    image.png
    spec.pdf
    Child Page A/
      index.html
      .id23456_3
    Child Page B/
      index.html
      .id34567_1
      Nested Page/
        index.html
        .id45678_2
  • Folder name = Confluence page title (filesystem-unsafe characters are replaced)
  • Folder nesting = parent-child relationships between pages
  • One folder = one Confluence page

Page Folder Contents

Each page folder contains three types of files:

index.html — Page Content

The index.html file contains the page body in Confluence Storage Format — the body.storage.value field from the Confluence REST API.

This is not regular HTML. Storage format is an XHTML subset with Confluence-specific namespaces and macros.

.id_ — Identity Marker

A file named like .id12345_7, where:

  • 12345 — the page identifier (pageId) in Confluence
  • 7 — the page version number on the server at the time of last sync

The marker is used for:

  • Stable mapping of a local folder to a Confluence page (even after renames)
  • Detecting whether the page was updated on the server (version comparison)
  • Conflict tracking (LastWriteTimeUtc of the marker = timestamp of the last sync)

Marker body. The file content is a small JSON object captured at sync time:

{"title":"Original Page Title","space":"SPACEKEY"}
  • title — the page's original (unsanitised) title, so special characters lost in the folder name can be restored on upload.
  • space — the key of the space the page belongs to. A Confluence page tree always lives in a single space; this records which one, so trees from different spaces can sit side by side and be synced without specifying the space each time.

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 153 lines · 1,248 tokens per session scan A eef9f01ba90c

Subscribe to this mod's changes

local-mirror-format is a cursor rule published in the GitHub repository YuriyEnshin/ConfluenceImportExport (5 stars, last pushed 23d ago), licensed MIT. It adds 1,248 tokens to every session, about $0.0062 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.