Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

confluenceConfluence 文档协作

Agent Skill

confluence 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

343

周安装

14

GitHub Stars

155

下载量

110
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:confluence(Confluence 文档协作)
来源仓库:https://github.com/pchuri/confluence-cli
仓库路径:skills/confluence
安装命令:
npx skills add https://github.com/pchuri/confluence-cli --skill confluence
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pchuri/confluence-cli --skill confluence

简介

confluence 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于研究检索类任务,可结合来源仓库和原始 README 核验具体用法。
  • 通过 npx skills add 命令从 GitHub 安装,需确认权限范围和是否触发联网或文件操作。
  • 建议在安装前检查维护状态和实际功能,避免依赖未经验证的自动化行为。
  • confluence 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

confluence-cli Skill

A CLI tool for Atlassian Confluence. Lets you read, search, create, update, move, delete, and convert pages and attachments from the terminal or from an agent.

Installation

npm install -g confluence-cli
confluence --version   # verify install

Configuration

Preferred for agents — environment variables (no interactive prompt):

VariableDescriptionExample
CONFLUENCE_DOMAINYour Confluence hostnamecompany.atlassian.net
CONFLUENCE_API_PATHREST API base path/wiki/rest/api (Cloud) or /rest/api (Server/DC)
CONFLUENCE_AUTH_TYPEbasic or bearerbasic
CONFLUENCE_EMAILEmail address (basic auth only)user@company.com
CONFLUENCE_API_TOKENAPI token or personal access tokenATATT3x...
CONFLUENCE_PROFILENamed profile to use (optional)staging
CONFLUENCE_READ_ONLYBlock all write operations when truetrue
CONFLUENCE_FORCE_CLOUDForce Cloud link format for custom domainstrue
CONFLUENCE_LINK_STYLEOverride link rendering: smart, plain, or wikiplain

Global --profile flag (use a named profile for any command):

confluence --profile <name> <command>

Config resolution works in two stages:

  • Direct env config: If both CONFLUENCE_DOMAIN and CONFLUENCE_API_TOKEN are set, they are used directly and the config file / profiles are not consulted.
  • Profile-based config: Otherwise, a profile is selected in this order: --profile flag > CONFLUENCE_PROFILE env > activeProfile in config > default.

Non-interactive init (good for CI/CD scripts):

confluence init \
  --domain "company.atlassian.net" \
  --api-path "/wiki/rest/api" \
  --auth-type basic \
  --email "user@company.com" \
  --token "ATATT3x..."

Cloud vs Server/DC:

  • Atlassian Cloud (*.atlassian.net): use --api-path "/wiki/rest/api", auth type basic with email + API token
  • Atlassian Cloud (custom domain): if your Cloud instance uses a custom domain (e.g., wiki.example.org), set CONFLUENCE_FORCE_CLOUD=true or add "forceCloud": true to your profile in ~/.confluence-cli/config.json. Without this, links will render incorrectly.
  • Atlassian Cloud (scoped token): use --domain "api.atlassian.com", --api-path "/ex/confluence/<your-cloud-id>/wiki/rest/api", auth type basic with email + scoped token. Get your Cloud ID from https://<your-site>.atlassian.net/_edge/tenant_info. Recommended for agents (least privilege).
  • Self-hosted / Data Center: use --api-path "/rest/api", auth type bearer with a personal access token (no email needed)

Scoped API token for agents (recommended):

export CONFLUENCE_DOMAIN="api.atlassian.com"
export CONFLUENCE_API_PATH="/ex/confluence/<your-cloud-id>/wiki/rest/api"
export CONFLUENCE_AUTH_TYPE="basic"
export CONFLUENCE_EMAIL="user@company.com"
export CONFLUENCE_API_TOKEN="your-scoped-token"

Required classic scopes for scoped tokens:

  • Read-only: read:confluence-content.all, read:confluence-content.summary, read:confluence-space.summary, search:confluence
  • Write: add write:confluence-content, write:confluence-file, write:confluence-space
  • Attachments: readonly:content.attachment:confluence (download), write:confluence-file (upload)

Read-only mode (recommended for AI agents):

Prevents all write operations (create, update, delete, move, etc.) at the profile level. Useful when giving an AI agent access to Confluence for reading only.

# Via profile flag
confluence profile add agent --domain "company.atlassian.net" --token "xxx" --read-only

# Via environment variable (overrides config file)
export CONFLUENCE_READ_ONLY=true

When read-only mode is active, any write command exits with an error:

Error: This profile is in read-only mode. Write operations are not allowed.

profile list shows read-only profiles with a [read-only] badge.


Page ID Resolution

Most commands accept <pageId> — a numeric ID or any of the supported URL formats below.

Supported formats:

FormatExample
Numeric ID123456789
?pageId= URLhttps://company.atlassian.net/wiki/viewpage.action?pageId=123456789
Pretty /pages/<id> URLhttps://company.atlassian.net/wiki/spaces/SPACE/pages/123456789/Page+Title
Display /display/<space>/<title> URLhttps://company.atlassian.net/wiki/display/SPACE/Page+Title
confluence read 123456789
confluence read "https://company.atlassian.net/wiki/viewpage.action?pageId=123456789"
confluence read "https://company.atlassian.net/wiki/spaces/MYSPACE/pages/123456789/My+Page"
Note: Display-style URLs (/display/<space>/<title>) perform a title-based lookup, so the page title in the URL must match exactly. When possible, prefer numeric IDs or /pages/<id> URLs for reliability.

Content Formats

FormatNotes
markdownRecommended for agent-generated content. Automatically converted by the API.
storageConfluence XML storage format (default for create/update). Use for programmatic round-trips.
htmlRaw HTML.
textPlain text — for read/export output only, not for creation.

Commands Reference

init

Initialize configuration. Saves credentials to ~/.confluence-cli/config.json.

confluence init [--domain <domain>] [--api-path <path>] [--auth-type basic|bearer] [--email <email>] [--token <token>] [--read-only]

All flags are optional; omitting any flag triggers an interactive prompt for that field. Provide all flags to run fully non-interactive. Use the global --profile flag to save to a named profile:

confluence --profile staging init --domain "staging.example.com" --auth-type bearer --token "your-token"

read <pageId>

Read page content. Outputs to stdout.

confluence read <pageId> [--format html|text|storage|markdown]
OptionDefaultDescription
--formattextOutput format: html, text, storage, or markdown
confluence read 123456789
confluence read 123456789 --format storage
confluence read 123456789 --format markdown

info <pageId>

Get page metadata. Use --format json for machine-readable output.

confluence info <pageId> [--format text|json]
confluence info 123456789
confluence info 123456789 --format json

find <title>

Find a page by exact or partial title. Returns the first match.

confluence find <title> [--space <spaceKey>]
OptionDescription
--spaceRestrict search to a specific space key
confluence find "Architecture Overview"
confluence find "API Reference" --space MYSPACE

search <query>

Search pages using a keyword or CQL expression.

confluence search <query> [--limit <number>] [--cql]
OptionDefaultDescription
--limit10Maximum number of results
--cqlfalsePass query as raw CQL instead of text search
confluence search "deployment pipeline"
confluence search --cql 'siteSearch ~ "deployment pipeline" and space = "MYSPACE"' --limit 50

spaces

List all accessible Confluence spaces (key and name).

confluence spaces

children <pageId>

List child pages of a page.

confluence children <pageId> [--recursive] [--max-depth <number>] [--format list|tree|json] [--show-id] [--show-url]
OptionDefaultDescription
--recursivefalseList all descendants recursively
--max-depth10Maximum depth for recursive listing
--formatlistOutput format: list, tree, or json
--show-idfalseShow page IDs
--show-urlfalseShow page URLs
confluence children 123456789
confluence children 123456789 --recursive --format json
confluence children 123456789 --recursive --format tree --show-id

create <title> <spaceKey>

Create a new top-level page in a space.

confluence create <title> <spaceKey> [--content <string>] [--file <path>] [--format storage|html|markdown]
OptionDefaultDescription
--contentInline content string
--filePath to content file
--formatstorageContent format

Either --content or --file is required.

confluence create "Project Overview" MYSPACE --content "# Hello" --format markdown
confluence create "Release Notes" MYSPACE --file ./notes.md --format markdown

Outputs the new page ID and URL on success.


create-child <title> <parentId>

Create a child page under an existing page. Inherits the parent's space automatically.

confluence create-child <title> <parentId> [--content <string>] [--file <path>] [--format storage|html|markdown]

Options are identical to create. Either --content or --file is required.

confluence create-child "Chapter 1" 123456789 --content "Content here" --format markdown
confluence create-child "API Guide" 123456789 --file ./api.md --format markdown

update <pageId>

Update an existing page's title and/or content. At least one of --title, --content, or --file is required.

confluence update <pageId> [--title <title>] [--content <string>] [--file <path>] [--format storage|html|markdown]
OptionDefaultDescription
--titleNew title
--contentInline content string
--filePath to content file
--formatstorageContent format
confluence update 123456789 --title "New Title"
confluence update 123456789 --file ./updated.md --format markdown
confluence update 123456789 --title "New Title" --file ./updated.xml --format storage

move <pageId_or_url> <newParentId_or_url>

Move a page to a new parent. Both pages must be in the same space.

confluence move <pageId_or_url> <newParentId_or_url> [--title <newTitle>]
OptionDescription
--titleRename the page during the move
confluence move 123456789 987654321
confluence move 123456789 987654321 --title "Renamed After Move"

delete <pageIdOrUrl>

Delete (trash) a page by ID or URL.

confluence delete <pageIdOrUrl> [--yes]
OptionDescription
--yesSkip confirmation prompt (required for non-interactive/agent use)
confluence delete 123456789 --yes

edit <pageId>

Fetch a page's raw storage-format content for editing locally.

confluence edit <pageId> [--output <file>]
OptionDescription
--outputSave content to a file (instead of printing to stdout)
confluence edit 123456789 --output ./page.xml
# Edit page.xml, then:
confluence update 123456789 --file ./page.xml --format storage

export <pageId>

Export a page and its attachments to a local directory.

confluence export <pageId> [--format html|text|markdown] [--dest <directory>] [--file <filename>] [--attachments-dir <name>] [--pattern <glob>] [--referenced-only] [--skip-attachments]
OptionDefaultDescription
--formatmarkdownContent format for the exported file
--dest.Base directory to export into
--filepage.<ext>Filename for the content file
--attachments-dirattachmentsSubdirectory name for attachments
--patternGlob filter for attachments (e.g. *.png)
--referenced-onlyfalseOnly download attachments referenced in the page content
--skip-attachmentsfalseDo not download attachments
confluence export 123456789 --format markdown --dest ./docs
confluence export 123456789 --format markdown --dest ./docs --skip-attachments
confluence export 123456789 --pattern "*.png" --dest ./output

Creates a subdirectory named after the page title under --dest.


attachments <pageId>

List or download attachments for a page.

confluence attachments <pageId> [--limit <n>] [--pattern <glob>] [--download] [--dest <directory>]
OptionDefaultDescription
--limitallMaximum number of attachments to fetch
--patternFilter by filename glob (e.g. *.pdf)
--downloadfalseDownload matching attachments
--dest.Directory to save downloads
confluence attachments 123456789
confluence attachments 123456789 --pattern "*.pdf" --download --dest ./downloads

attachment-upload <pageId>

Upload one or more files to a page. --file can be repeated for multiple files.

confluence attachment-upload <pageId> --file <path> [--file <path> ...] [--comment <text>] [--replace] [--minor-edit]
OptionDescription
--fileFile to upload (required, repeatable)
--commentComment for the attachment(s)
--replaceReplace an existing attachment with the same filename
--minor-editMark the upload as a minor edit
confluence attachment-upload 123456789 --file ./report.pdf
confluence attachment-upload 123456789 --file ./a.png --file ./b.png --replace

attachment-delete <pageId> <attachmentId>

Delete an attachment from a page.

confluence attachment-delete <pageId> <attachmentId> [--yes]
OptionDescription
--yesSkip confirmation prompt
confluence attachment-delete 123456789 att-987 --yes

comments <pageId>

List comments for a page.

confluence comments <pageId> [--format text|markdown|json] [--limit <n>] [--start <n>] [--location inline,footer,resolved] [--depth all] [--all]
OptionDefaultDescription
--formattextOutput format: text, markdown, or json
--limit25Maximum comments per page
--start0Start index for pagination
--locationFilter by location: inline, footer, resolved (comma-separated)
--depthLeave empty for root-only; all for all nested replies
--allfalseFetch all comments (ignores pagination)
confluence comments 123456789
confluence comments 123456789 --format json --all
confluence comments 123456789 --location footer --depth all

comment <pageId>

Create a comment on a page (footer or inline).

confluence comment <pageId> [--content <string>] [--file <path>] [--format storage|html|markdown] [--parent <commentId>] [--location footer|inline] [--inline-selection <text>] [--inline-original-selection <text>] [--inline-marker-ref <ref>] [--inline-properties <json>]
OptionDefaultDescription
--contentInline content string
--filePath to content file
--formatstorageContent format
--parentReply to a comment by ID
--locationfooterfooter or inline
--inline-selectionHighlighted selection text (inline only)
--inline-original-selectionOriginal selection text (inline only)
--inline-marker-refMarker reference (inline only)
--inline-propertiesFull inline properties as JSON (advanced)

Either --content or --file is required.

confluence comment 123456789 --content "Looks good!" --location footer
confluence comment 123456789 --content "See note" --parent 456 --location footer
Note on inline comments: Creating a brand-new inline comment requires editor highlight metadata (matchIndex, lastFetchTime, serializedHighlights) that is only available in the Confluence editor. This metadata is not accessible via the REST API, so inline comment creation will typically fail with a 400 error. Use --location footer or reply to an existing inline comment with --parent <commentId> instead.

comment-delete <commentId>

Delete a comment by its ID.

confluence comment-delete <commentId> [--yes]
OptionDescription
--yesSkip confirmation prompt
confluence comment-delete 456789 --yes

copy-tree <sourcePageId> <targetParentId> [newTitle]

Copy a page and all its children to a new location.

confluence copy-tree <sourcePageId> <targetParentId> [newTitle] [--max-depth <depth>] [--exclude <patterns>] [--delay-ms <ms>] [--copy-suffix <suffix>] [--dry-run] [--fail-on-error] [--quiet]
OptionDefaultDescription
--max-depth10Maximum depth to copy
--excludeComma-separated title patterns to exclude (supports wildcards)
--delay-ms100Delay between sibling creations in ms
--copy-suffix" (Copy)"Suffix appended to the root page title
--dry-runfalsePreview operations without creating pages
--fail-on-errorfalseExit with non-zero code if any page fails
--quietfalseSuppress progress output
# Preview first
confluence copy-tree 123456789 987654321 --dry-run

# Copy with a custom title
confluence copy-tree 123456789 987654321 "Backup Copy"

# Copy excluding certain pages
confluence copy-tree 123456789 987654321 --exclude "Draft*,Archive*"

profile list

List all configuration profiles with the active profile marked.

confluence profile list

profile use <name>

Switch the active configuration profile.

confluence profile use <name>
confluence profile use staging

profile add <name>

Add a new configuration profile. Supports the same options as init (interactive, non-interactive, or hybrid).

confluence profile add <name> [--domain <domain>] [--api-path <path>] [--auth-type basic|bearer] [--email <email>] [--token <token>] [--protocol http|https] [--read-only]

Profile names may contain letters, numbers, hyphens, and underscores only.

confluence profile add staging --domain "staging.example.com" --auth-type bearer --token "xyz"

profile remove <name>

Remove a configuration profile (prompts for confirmation). Cannot remove the only remaining profile.

confluence profile remove <name>
confluence profile remove staging

stats

Show local usage statistics.

confluence stats

convert

Convert between content formats locally without a Confluence server connection.

confluence convert [--input-file <path>] [--output-file <path>] --input-format <format> --output-format <format>
OptionDefaultDescription
--input-file, -istdinInput file path
--output-file, -ostdoutOutput file path
--input-formatInput format: markdown, storage, html (required)
--output-formatOutput format: markdown, storage, html, text (required)

Supported conversions: markdown→storage, markdown→html, markdown→text, html→storage, html→text, html→markdown, storage→markdown, storage→html, storage→text.

# Markdown to Confluence storage format
confluence convert -i doc.md -o doc.xml --input-format markdown --output-format storage

# Pipe via stdin/stdout
echo "# Hello" | confluence convert --input-format markdown --output-format storage

# Storage format back to markdown
confluence convert -i page.xml --input-format storage --output-format markdown

install-skill

Copy the Claude Code skill documentation into your project's .claude/skills/ directory so Claude Code can learn confluence-cli automatically.

confluence install-skill [--dest <directory>] [--yes]
OptionDefaultDescription
--dest./.claude/skills/confluenceTarget directory
--yesfalseSkip overwrite confirmation
confluence install-skill

Common Agent Workflows

Read → Edit → Update (round-trip)

# 1. Fetch raw storage XML
confluence edit 123456789 --output ./page.xml

# 2. Modify page.xml with your tool of choice

# 3. Push the updated content
confluence update 123456789 --file ./page.xml --format storage

Build a documentation hierarchy

# Create root page, note the returned ID (e.g. 111222333)
confluence create "Project Overview" MYSPACE --content "# Overview" --format markdown

# Add children under it
confluence create-child "Architecture" 111222333 --content "# Architecture" --format markdown
confluence create-child "API Reference" 111222333 --file ./api.md --format markdown
confluence create-child "Runbooks" 111222333 --content "# Runbooks" --format markdown

Copy a full page tree

# Preview first
confluence copy-tree 123456789 987654321 --dry-run

# Execute the copy
confluence copy-tree 123456789 987654321 "Backup Copy"

Offline format conversion

# Convert markdown to Confluence storage format (no server needed)
confluence convert -i doc.md -o doc.xml --input-format markdown --output-format storage

# Convert storage format to markdown for editing
confluence convert -i page.xml -o page.md --input-format storage --output-format markdown

Export a page for local editing

confluence export 123456789 --format markdown --dest ./local-docs
# => ./local-docs/<page-title>/page.md + ./local-docs/<page-title>/attachments/

Process children as JSON

confluence children 123456789 --recursive --format json | jq '.[].id'

Search and process results

confluence search --cql 'siteSearch ~ "release notes" and space = "MYSPACE"' --limit 20

Agent Tips

  • Always use --yes on destructive commands (delete, comment-delete, attachment-delete) to avoid interactive prompts blocking the agent.
  • Prefer --format markdown when creating or updating content from agent-generated text — it's the most natural format and the API converts it automatically.
  • Use --format json on children and comments for machine-parseable output.
  • ANSI color codes: stdout may contain ANSI escape sequences. Pipe through | cat or use NO_COLOR=1 if your downstream tool doesn't handle them.
  • Page ID vs URL: when you have a Confluence URL, extract ?pageId=<number> and pass the number. Do not pass pretty/display URLs — they are not supported.
  • Cross-space moves: confluence move only works within the same space. Moving across spaces is not supported.
  • Multiple instances: Use --profile <name> or CONFLUENCE_PROFILE env var to target different Confluence instances without reconfiguring.
  • Read-only mode: Set CONFLUENCE_READ_ONLY=true or use --read-only when creating profiles to prevent accidental writes. This is enforced at the CLI level — all write commands will be blocked.

Error Patterns

ErrorCauseFix
No configuration foundNo config file and no env vars setSet env vars or run confluence init
Cross-space moves are not supportedmove used across spacesCopy with copy-tree instead
400 on inline comment creationEditor metadata requiredUse --location footer or reply to existing inline comment with --parent
File not found: <path>--file path doesn't existCheck the path before calling the command
At least one of --title, --file, or --content must be providedupdate called with no content optionsProvide at least one of the required options
Profile "<name>" not found!Specified profile doesn't existRun confluence profile list to see available profiles
Cannot delete the only remaining profile.Tried to remove the last profileAdd another profile before removing
This profile is in read-only modeWrite command used with a read-only profileUse a writable profile or remove readOnly from config

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.8%
按下载量换算39

Claude

29.9%
按下载量换算33

Cursor

19.47%
按下载量换算21

Gemini CLI

11.03%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills