关于 confluence
面向 Golden Armada AI Agent Fleet Platform 的 Confluence 文档与空间操作技能,提供 Confluence API 和 Python 示例,涵盖页面管理、搜索、模板、宏及文档规范。
主要功能
- 01创建、获取、更新和删除页面
- 02创建并查看空间
- 03使用 CQL 或页面查询进行搜索
- 04使用文档模板和宏
- 05遵循页面组织规范
适用场景
- 01创建或更新 Confluence 文档
- 02按文本或空间查找页面
- 03整理架构文档和会议记录
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ thelobbi/ claude --skill confluence安装后在 Claude Code 中输入/confluence确认已加载。
详细介绍
Confluence 技能
为 Golden Armada AI Agent Fleet Platform 提供全面的 Confluence 文档功能。
何时使用此技能
在处理以下内容时启用此技能:
- 文档页面
- 空间管理
- 模板和蓝图
- 知识库创建
- Confluence API 集成
Confluence API 快速参考
身份验证
```python from atlassian import Confluence
confluence = Confluence( url='https://your-domain.atlassian.net', username='[email protected]', password='API_TOKEN', cloud=True ) ```
页面操作
```python
Create page
page = confluence.create_page( space='GA', title='Agent Architecture', body='
Overview
Architecture documentation...
', parent_id=12345 # Optional parent page )Get page
page = confluence.get_page_by_title( space='GA', title='Agent Architecture', expand='body.storage,version' )
Get page by ID
page = confluence.get_page_by_id( page_id=12345, expand='body.storage,version' )
Update page
confluence.update_page( page_id=12345, title='Agent Architecture v2', body='
Updated Overview
New content...
' )Delete page
confluence.remove_page(page_id=12345)
Get page content
content = confluence.get_page_by_id(page_id, expand='body.storage') html_content = content['body']['storage']['value'] ```
空间操作
```python
Create space
space = confluence.create_space( space_key='GA', space_name='Golden Armada', description='AI Agent Fleet Platform documentation' )
Get space
space = confluence.get_space('GA', expand='homepage')
Get all pages in space
pages = confluence.get_all_pages_from_space( space='GA', start=0, limit=100, expand='body.storage' ) ```
搜索
```python
CQL search
results = confluence.cql( 'space = GA AND type = page AND text ~ "agent"', limit=25 )
Search pages
results = confluence.search( query='agent architecture', space='GA', type='page' ) ```
页面模板
架构文档
```html
系统架构
<ac:structured-macro ac:name="toc"> <ac:parameter ac:name="printable">true</ac:parameter> <ac:parameter ac:name="style">disc</ac:parameter> <ac:parameter ac:name="maxLevel">3</ac:parameter> </ac:structured-macro>
概述
系统简要说明...
组件
关键组件- 组件 1 - 说明
- 组件 2 - 说明
架构图
数据流
数据流说明...
安全注意事项
安全说明...
\`\`\` ### API 文档 ```htmlAPI 参考
身份验证
bash端点
GET /agents
列出所有 Agent。
<ac:structured-macro ac:name="expand"> <ac:parameter ac:name="title">示例响应</ac:parameter> ac:rich-text-body <ac:structured-macro ac:name="code"> <ac:parameter ac:name="language">json</ac:parameter> ac:plain-text-body</ac:plain-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro>
### 会议记录
```html
<h1>会议记录:<ac:placeholder>会议标题</ac:placeholder></h1>
<ac:structured-macro ac:name="info">
<ac:rich-text-body>
<p><strong>日期:</strong> <ac:placeholder>日期</ac:placeholder></p>
<p><strong>参会者:</strong> <ac:placeholder>姓名</ac:placeholder></p>
</ac:rich-text-body>
</ac:structured-macro>
<h2>议程</h2>
<ul>
<li>主题 1</li>
<li>主题 2</li>
</ul>
<h2>讨论</h2>
<p>讨论记录……</p>
<h2>行动项</h2>
<ac:task-list>
<ac:task>
<ac:task-status>incomplete</ac:task-status>
<ac:task-body>行动项 1 <ac:link><ri:user ri:userkey="assignee"/></ac:link></ac:task-body>
</ac:task>
</ac:task-list>
<h2>后续步骤</h2>
<p>后续事项……</p>
宏参考
常用宏
<ac:structured-macro ac:name="toc"/>
<ac:structured-macro ac:name="code">
<ac:parameter ac:name="language">python</ac:parameter>
<ac:plain-text-body><![CDATA[print("Hello")]]></ac:plain-text-body>
</ac:structured-macro>
<ac:structured-macro ac:name="info">
<ac:rich-text-body><p>信息文本</p></ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:name="warning">
<ac:rich-text-body><p>警告文本</p></ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:name="expand">
<ac:parameter ac:name="title">点击展开</ac:parameter>
<ac:rich-text-body><p>隐藏内容</p></ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:name="status">
<ac:parameter ac:name="colour">Green</ac:parameter>
<ac:parameter ac:name="title">已完成</ac:parameter>
</ac:structured-macro>
<ac:structured-macro ac:name="jira">
<ac:parameter ac:name="key">GA-123</ac:parameter>
</ac:structured-macro>
Golden Armada 命令
# 发布到 Confluence
/confluence-publish --space GA --title "Agent API Docs" --file docs/api.md
# 更新页面
/confluence-update --page-id 12345 --file docs/updated.md
# 同步文档
/atlassian-sync --confluence --space GA
最佳实践
- 使用模板,确保文档风格一致
- 通过页面层级组织内容(父页面/子页面)
- 为复杂概念添加图表
- 链接到 Jira 问题,以便追踪
- 使用标签为重要页面标注版本
- 使用宏展示动态内容