npx skills add https://github.com/odyssey4me/agent-skills --skill confluence与 Confluence 交互,用于内容搜索、查看页面和空间管理。
创建/更新内容? 关于使用 Markdown 创建和更新页面,请参阅 references/creating-content.md。
依赖项 : pip install --user requests keyring pyyaml
安装后,验证技能是否正确配置:
$SKILL_DIR/scripts/confluence.py check
这将检查:
如果缺少任何内容,check 命令将提供设置说明。
使用以下方法之一配置 Confluence 身份验证:
export CONFLUENCE_URL="https://yourcompany.atlassian.net/wiki"
export CONFLUENCE_EMAIL="you@example.com"
export CONFLUENCE_API_TOKEN="your-token"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
将这些添加到您的 ~/.bashrc 或 ~/.zshrc 中以持久保存。
创建 ~/.config/agent-skills/confluence.yaml:
url: https://yourcompany.atlassian.net/wiki
email: you@example.com
token: your-token
https://yourcompany.atlassian.net/wikihttps://confluence.yourcompany.com可选地在 ~/.config/agent-skills/confluence.yaml 中配置默认值,以减少重复输入:
# 身份验证(如果使用环境变量则为可选)
url: https://yourcompany.atlassian.net/wiki
email: you@example.com
token: your-token
# 可选默认值
defaults:
cql_scope: "space = DEMO"
max_results: 25
default_space: "DEMO"
(scope) AND (your_query)# 显示所有配置
$SKILL_DIR/scripts/confluence.py config show
# 显示特定空间的默认值
$SKILL_DIR/scripts/confluence.py config show --space DEMO
有关每个命令的读/写分类,请参阅 permissions.md。
验证配置和连接性。
$SKILL_DIR/scripts/confluence.py check
这将验证:
使用 CQL (Confluence Query Language) 搜索内容。
# 基本搜索
$SKILL_DIR/scripts/confluence.py search "type=page AND space = DEMO"
$SKILL_DIR/scripts/confluence.py search "title~login" --space DEMO
# 按类型过滤
$SKILL_DIR/scripts/confluence.py search "space = DEMO" --type page
# 限制结果
$SKILL_DIR/scripts/confluence.py search "type=page" --max-results 10
参数:
cql: CQL 查询字符串(必需)--max-results: 最大结果数(默认:50)--type: 内容类型过滤器 (page, blogpost, comment)--space: 限制到特定空间另请参阅 : CQL 参考以了解查询语法
通过 ID 或标题获取页面内容。
# 按标题获取(默认返回 Markdown)
$SKILL_DIR/scripts/confluence.py page get "My Page Title"
# 按 ID 获取
$SKILL_DIR/scripts/confluence.py page get 123456
# 获取时不包含正文内容
$SKILL_DIR/scripts/confluence.py page get "My Page" --no-body
# 获取原始格式(非 Markdown)
$SKILL_DIR/scripts/confluence.py page get "My Page" --raw
输出 : 默认情况下,显示页面元数据以及为便于阅读而转换为 Markdown 的正文内容。
参数:
page_identifier: 页面 ID 或标题(必需)--markdown: 以 Markdown 格式输出正文(默认)--raw: 以原始格式输出--no-body: 不包含正文内容$ $SKILL_DIR/scripts/confluence.py page get "API Documentation"
Page ID: 123456
Title: API Documentation
Type: page
Space: DEMO
Status: current
Version: 1
---
# API Documentation
## Overview
This document describes our **REST API**.
## Endpoints
- `GET /api/users` - List users
- `POST /api/users` - Create user
关于使用 Markdown 支持创建和更新页面,请参阅 references/creating-content.md。
快速示例:
# 从 Markdown 文件创建页面
$SKILL_DIR/scripts/confluence.py page create --space DEMO --title "Documentation" \
--body-file README.md
# 从文件更新页面
$SKILL_DIR/scripts/confluence.py page update 123456 --body-file updated.md
管理空间。
# 列出所有空间
$SKILL_DIR/scripts/confluence.py space list
# 限制数量列出
$SKILL_DIR/scripts/confluence.py space list --max-results 10
# 按类型过滤
$SKILL_DIR/scripts/confluence.py space list --type global
# 获取空间详情
$SKILL_DIR/scripts/confluence.py space get DEMO
参数:
list: 列出空间
--type: 按类型过滤 (global, personal)--max-results: 最大结果数get <space-key>: 获取空间详情关于创建空间,请参阅 references/creating-content.md。
显示配置和默认值。
# 显示所有配置
$SKILL_DIR/scripts/confluence.py config show
# 显示特定空间的默认值
$SKILL_DIR/scripts/confluence.py config show --space DEMO
这将显示:
# 在空间中查找页面
$SKILL_DIR/scripts/confluence.py search "type=page AND space = DEMO"
# 按标题搜索
$SKILL_DIR/scripts/confluence.py search "title~login"
# 查找最近页面
$SKILL_DIR/scripts/confluence.py search "type=page AND created >= now('-7d')"
# 以 Markdown 格式查看页面
$SKILL_DIR/scripts/confluence.py page get "My Page Title"
# 仅查看页面元数据
$SKILL_DIR/scripts/confluence.py page get 123456 --no-body
# 导出到文件
$SKILL_DIR/scripts/confluence.py page get "My Page" > exported-page.md
# 列出所有空间
$SKILL_DIR/scripts/confluence.py space list
# 获取空间详情
$SKILL_DIR/scripts/confluence.py space get DEMO
按照配置默认值部分所示配置默认值后:
# 搜索自动使用 CQL 作用域
$SKILL_DIR/scripts/confluence.py search "type=page"
# 变为:(space = DEMO) AND (type=page)
# 使用配置中的 max_results 自动搜索
$SKILL_DIR/scripts/confluence.py search "status=current"
# 自动使用配置的 max_results (25)
# 需要时覆盖默认值
$SKILL_DIR/scripts/confluence.py search "type=page" --max-results 100
# CLI 参数覆盖了配置的默认值 25
常见的 CQL (Confluence Query Language) 查询:
| 查询 | 描述 |
|---|---|
type = page | 所有页面 |
type = blogpost | 所有博客文章 |
space = DEMO | DEMO 空间中的内容 |
title ~ "login" | 标题包含 "login" |
text ~ "API" | 正文文本包含 "API" |
created >= now("-7d") | 最近 7 天内创建 |
lastmodified >= startOfDay() | 今天修改 |
creator = currentUser() | 由您创建 |
contributor = "username" | 用户贡献过 |
label = "important" | 具有 "important" 标签 |
使用 AND、OR 组合,并使用 ORDER BY 进行排序:
$SKILL_DIR/scripts/confluence.py search "type=page AND space=DEMO AND created >= now('-30d') ORDER BY created DESC"
此技能需要进行 API 调用,需要结构化的输入/输出。推荐使用标准能力模型。
运行 $SKILL_DIR/scripts/confluence.py check 来诊断问题。它将提供具体的错误消息和设置说明。
您可能没有访问请求的空间或页面的权限。请联系您的 Confluence 管理员。
在 CLI 中使用 CQL 查询之前,先在 Confluence Web 界面搜索中测试您的查询。
按标题搜索时,请确保标题完全匹配(区分大小写)。您可以使用:
$SKILL_DIR/scripts/confluence.py page get "Exact Page Title"$SKILL_DIR/scripts/confluence.py page get 123456确保依赖项已安装:
pip install --user requests keyring pyyaml
该技能会自动检测您的 Confluence 部署类型并进行适配:
/wiki/rest/api 和编辑器格式 (ADF)/rest/api 和存储格式 (XHTML)读取页面时,无论部署类型如何,内容都会自动转换为 Markdown 以便显示。
每周安装数
76
仓库
GitHub 星标数
2
首次出现
Jan 22, 2026
安全审计
安装于
gemini-cli64
opencode64
cursor63
codex62
claude-code61
github-copilot60
Interact with Confluence for content search, viewing pages, and space management.
Creating/Updating Content? See references/creating-content.md for page creation and updates with Markdown.
Dependencies : pip install --user requests keyring pyyaml
After installation, verify the skill is properly configured:
$SKILL_DIR/scripts/confluence.py check
This will check:
If anything is missing, the check command will provide setup instructions.
Configure Confluence authentication using one of these methods:
export CONFLUENCE_URL="https://yourcompany.atlassian.net/wiki"
export CONFLUENCE_EMAIL="you@example.com"
export CONFLUENCE_API_TOKEN="your-token"
Add these to your ~/.bashrc or ~/.zshrc for persistence.
Create ~/.config/agent-skills/confluence.yaml:
url: https://yourcompany.atlassian.net/wiki
email: you@example.com
token: your-token
https://yourcompany.atlassian.net/wikihttps://confluence.yourcompany.comOptionally configure defaults in ~/.config/agent-skills/confluence.yaml to reduce repetitive typing:
# Authentication (optional if using environment variables)
url: https://yourcompany.atlassian.net/wiki
email: you@example.com
token: your-token
# Optional defaults
defaults:
cql_scope: "space = DEMO"
max_results: 25
default_space: "DEMO"
(scope) AND (your_query)# Show all configuration
$SKILL_DIR/scripts/confluence.py config show
# Show space-specific defaults
$SKILL_DIR/scripts/confluence.py config show --space DEMO
See permissions.md for read/write classification of each command.
Verify configuration and connectivity.
$SKILL_DIR/scripts/confluence.py check
This validates:
Search for content using CQL (Confluence Query Language).
# Basic search
$SKILL_DIR/scripts/confluence.py search "type=page AND space = DEMO"
$SKILL_DIR/scripts/confluence.py search "title~login" --space DEMO
# Filter by type
$SKILL_DIR/scripts/confluence.py search "space = DEMO" --type page
# Limit results
$SKILL_DIR/scripts/confluence.py search "type=page" --max-results 10
Arguments:
cql: CQL query string (required)--max-results: Maximum number of results (default: 50)--type: Content type filter (page, blogpost, comment)--space: Limit to specific spaceSee also : CQL Reference for query syntax
Get page content by ID or title.
# Get by title (returns Markdown by default)
$SKILL_DIR/scripts/confluence.py page get "My Page Title"
# Get by ID
$SKILL_DIR/scripts/confluence.py page get 123456
# Get without body content
$SKILL_DIR/scripts/confluence.py page get "My Page" --no-body
# Get in original format (not Markdown)
$SKILL_DIR/scripts/confluence.py page get "My Page" --raw
Output : By default, displays page metadata and body content converted to Markdown for readability.
Arguments:
page_identifier: Page ID or title (required)--markdown: Output body as Markdown (default)--raw: Output in original format--no-body: Don't include body content$ $SKILL_DIR/scripts/confluence.py page get "API Documentation"
Page ID: 123456
Title: API Documentation
Type: page
Space: DEMO
Status: current
Version: 1
---
# API Documentation
## Overview
This document describes our **REST API**.
## Endpoints
- `GET /api/users` - List users
- `POST /api/users` - Create user
For creating and updating pages with Markdown support, see references/creating-content.md.
Quick examples:
# Create page from Markdown file
$SKILL_DIR/scripts/confluence.py page create --space DEMO --title "Documentation" \
--body-file README.md
# Update page from file
$SKILL_DIR/scripts/confluence.py page update 123456 --body-file updated.md
Manage spaces.
# List all spaces
$SKILL_DIR/scripts/confluence.py space list
# List with limit
$SKILL_DIR/scripts/confluence.py space list --max-results 10
# Filter by type
$SKILL_DIR/scripts/confluence.py space list --type global
# Get space details
$SKILL_DIR/scripts/confluence.py space get DEMO
Arguments:
list: List spaces
--type: Filter by type (global, personal)--max-results: Maximum resultsget <space-key>: Get space detailsFor creating spaces, see references/creating-content.md.
Show configuration and defaults.
# Show all configuration
$SKILL_DIR/scripts/confluence.py config show
# Show space-specific defaults
$SKILL_DIR/scripts/confluence.py config show --space DEMO
This displays:
# Find pages in a space
$SKILL_DIR/scripts/confluence.py search "type=page AND space = DEMO"
# Search by title
$SKILL_DIR/scripts/confluence.py search "title~login"
# Find recent pages
$SKILL_DIR/scripts/confluence.py search "type=page AND created >= now('-7d')"
# View page as Markdown
$SKILL_DIR/scripts/confluence.py page get "My Page Title"
# View page metadata only
$SKILL_DIR/scripts/confluence.py page get 123456 --no-body
# Export to file
$SKILL_DIR/scripts/confluence.py page get "My Page" > exported-page.md
# List all spaces
$SKILL_DIR/scripts/confluence.py space list
# Get details about a space
$SKILL_DIR/scripts/confluence.py space get DEMO
With defaults configured as shown in the Configuration Defaults section:
# Search uses CQL scope automatically
$SKILL_DIR/scripts/confluence.py search "type=page"
# Becomes: (space = DEMO) AND (type=page)
# Search with automatic max_results from config
$SKILL_DIR/scripts/confluence.py search "status=current"
# Uses configured max_results (25) automatically
# Override defaults when needed
$SKILL_DIR/scripts/confluence.py search "type=page" --max-results 100
# CLI argument overrides the configured default of 25
Common CQL (Confluence Query Language) queries:
| Query | Description |
|---|---|
type = page | All pages |
type = blogpost | All blog posts |
space = DEMO | Content in DEMO space |
title ~ "login" | Title contains "login" |
text ~ "API" | Body text contains "API" |
created >= now("-7d") | Created in last 7 days |
Combine with AND, OR, and use ORDER BY for sorting:
$SKILL_DIR/scripts/confluence.py search "type=page AND space=DEMO AND created >= now('-30d') ORDER BY created DESC"
This skill makes API calls requiring structured input/output. A standard-capability model is recommended.
Run $SKILL_DIR/scripts/confluence.py check to diagnose issues. It will provide specific error messages and setup instructions.
You may not have access to the requested space or page. Contact your Confluence administrator.
Test your CQL query in the Confluence web interface search before using it in the CLI.
When searching by title, ensure the title is exact (case-sensitive). You can use:
$SKILL_DIR/scripts/confluence.py page get "Exact Page Title"$SKILL_DIR/scripts/confluence.py page get 123456Ensure dependencies are installed:
pip install --user requests keyring pyyaml
The skill automatically detects your Confluence deployment type and adapts:
/wiki/rest/api and editor format (ADF)/rest/api and storage format (XHTML)When reading pages, content is automatically converted to Markdown for display regardless of deployment type.
Weekly Installs
76
Repository
GitHub Stars
2
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli64
opencode64
cursor63
codex62
claude-code61
github-copilot60
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
44,900 周安装
lastmodified >= startOfDay() | Modified today |
creator = currentUser() | Created by you |
contributor = "username" | User contributed |
label = "important" | Has "important" label |