Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

publish-to-confluence发布到汇合

Agent Skill

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

总安装

238

周安装

10

GitHub Stars

374

下载量

83
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/huytieu/cog-second-brain --skill publish-to-confluence

简介

用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 建议确认权限范围和维护状态,注意可能触发联网、命令执行或文件读写操作。
  • publish-to-confluence 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

COG Publish to Confluence Skill

When to Invoke

  • User wants to publish a document to Confluence
  • User says "publish to Confluence", "push to wiki", "send to Confluence", "confluence publish"
  • User has a markdown file they want to share with the team on Confluence
  • After generating a PRD, release notes, or other document that should go to the wiki

Agent Mode Awareness

Check agent_mode in 00-inbox/MY-PROFILE.md frontmatter:

  • If agent_mode: team — no significant benefit for this skill (single sequential operation)
  • If agent_mode: solo — standard execution

Command: /publish-to-confluence

Pre-Flight Check

  1. Read 00-inbox/MY-INTEGRATIONS.md — Confluence MUST be listed under Active Integrations

- If Confluence is not active: Inform the user and stop. Confluence is not in your active integrations. Would you like to: a) Set up Confluence integration (I'll add it to MY-INTEGRATIONS.md) b) Export the document in a Confluence-compatible format for manual upload - If Confluence is disabled: Skip silently per COG conventions. Suggest alternative publishing (HackMD, Notion) if active.

  1. Get current timestamp: Run date '+%Y-%m-%d %H:%M' using Bash

Execution Strategy

Phase 1: Identify the Source Document

Determine what to publish:

Option A: User specifies a file path

Read the specified file from the vault.

Option B: User describes the document

Search for matching files:
1. Glob for likely matches in 04-projects/, 05-knowledge/, 01-daily/
2. Present candidates and let user choose

Option C: Just-generated document If this skill is invoked right after generating a PRD, release notes, or other document, use that document.

Phase 2: Configure Publishing Target

Ask the user (if not already provided):

Where should this be published in Confluence?

Required:
- Space key: [CUSTOMIZE: YOUR-SPACE-KEY] (or let me search for spaces)
- Parent page: [Page title or ID under which to nest this page]

Optional:
- Page title: [defaults to the document's H1 heading]
- Labels: [Confluence labels to add]
- Publish mode: "create new" or "update existing"

If the user doesn't know the space or parent page:

Use WebFetch to search Confluence:
GET /wiki/rest/api/space?limit=50
- List available spaces for the user to choose

GET /wiki/rest/api/content?spaceKey=[SPACE]&type=page&limit=25
- List pages in the space for parent page selection

Phase 3: Convert Markdown to Confluence Format

Convert the markdown document to Confluence storage format (XHTML):

Conversion rules:

MarkdownConfluence Storage Format
# Heading<h1>Heading</h1>
## Heading<h2>Heading</h2>
**bold**<strong>bold</strong>
*italic*<em>italic</em>
- list item<ul><li>list item</li></ul>
1. list item<ol><li>list item</li></ol>
[text](url)<a href="url">text</a>
` code `<code>code</code>
Code blocks<ac:structured-macro ac:name="code"><ac:plain-text-body><![CDATA[...]]></ac:plain-text-body></ac:structured-macro>
Tables<table><tbody><tr><th>...</th></tr><tr><td>...</td></tr></tbody></table>
> blockquote<blockquote><p>quote</p></blockquote>
---<hr />
- [] task<ac:task-list><ac:task><ac:task-status>incomplete</ac:task-status><ac:task-body>task</ac:task-body></ac:task></ac:task-list>
- [x] taskSame with complete status
YAML frontmatterStrip entirely (not displayed in Confluence)

Important conversion notes:

  • Strip YAML frontmatter — it should not appear in the Confluence page
  • Preserve table structure carefully
  • Convert relative vault links to plain text (they won't work in Confluence)
  • Handle nested lists properly
  • Preserve emoji characters as-is

Phase 4: Preview and Approval Gate

CRITICAL: NEVER publish without explicit user approval.

Present a summary to the user:

Ready to publish to Confluence:

Document: [filename]
Title: [page title]
Space: [space key]
Parent Page: [parent page title]
Mode: [create new / update existing]
Labels: [labels]

Content preview (first 500 chars):
[preview text]

Estimated page size: [approximate word count]

Proceed with publishing? (yes/no)

Wait for explicit "yes" before proceeding.

Phase 5: Publish

Create New Page

Use WebFetch to POST to Confluence REST API:

POST [CUSTOMIZE: your-confluence-url]/wiki/rest/api/content

Headers:
  Content-Type: application/json
  Authorization: [from configured credentials]

Body:
{
  "type": "page",
  "title": "[page title]",
  "space": { "key": "[SPACE_KEY]" },
  "ancestors": [{ "id": "[PARENT_PAGE_ID]" }],
  "body": {
    "storage": {
      "value": "[converted XHTML content]",
      "representation": "storage"
    }
  },
  "metadata": {
    "labels": [
      { "prefix": "global", "name": "[label]" }
    ]
  }
}

Update Existing Page

First, get the current page to obtain the version number:
GET [CUSTOMIZE: your-confluence-url]/wiki/rest/api/content/[PAGE_ID]?expand=version

Then update:
PUT [CUSTOMIZE: your-confluence-url]/wiki/rest/api/content/[PAGE_ID]

Body:
{
  "type": "page",
  "title": "[page title]",
  "version": { "number": [current_version + 1] },
  "body": {
    "storage": {
      "value": "[converted XHTML content]",
      "representation": "storage"
    }
  }
}

Phase 6: Confirm and Update Vault

After successful publishing:

  1. Confirm to the user: Published successfully! Page: [Title] URL: [Confluence page URL] Space: [Space Key] Version: [version number]
  2. Update the source vault file (add published metadata to frontmatter): confluence_url: "[page URL]" confluence_page_id: "[page ID]" confluence_space: "[space key]" published_at: "[timestamp]" confluence_version: [version number]
  3. Log the publication for future reference.

Re-Publishing (Update Flow)

If the vault file already has confluence_page_id in its frontmatter:

This document was previously published to Confluence:
  URL: [confluence_url]
  Last published: [published_at]

Would you like to:
a) Update the existing Confluence page (increment version)
b) Create a new page (separate copy)
c) Cancel

Fallback Behavior

ScenarioBehavior
Confluence not activeStop and inform user; suggest alternative platforms
Confluence API failsSave the converted XHTML to a file so user can manually paste it
Authentication failureInform user their Confluence credentials may need refreshing
Page already exists (same title)Ask user: update existing, create with different title, or cancel
Very large documentWarn user about page size; suggest splitting into child pages
Complex markdown (unsupported elements)Convert best-effort, warn about any elements that couldn't be converted

Error Handling

  • API 403 (Forbidden): User may lack write permissions to the target space
  • API 404 (Not Found): Space key or parent page ID may be incorrect
  • API 409 (Conflict): Page was modified by someone else; fetch latest version and retry
  • Conversion failures: Fall back to plain text for elements that can't be converted
  • Rate limits: Retry with backoff
  • Network errors: Save converted content locally so no work is lost

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.56%
按下载量换算29

Claude

29.43%
按下载量换算24

Cursor

19.7%
按下载量换算16

Gemini CLI

9.47%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills