Agent skill

Publish To Confluence

by huytieu in huytieu/COG-second-brain

Publish any markdown file from the vault to Confluence with format conversion and approval gate

MITAuto-check passedDocuments & Office

Install Publish To Confluence

skills CLI
$ npx skills add huytieu/COG-second-brain --skill publish-to-confluence -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install huytieu/COG-second-brain publish-to-confluence --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/huytieu/COG-second-brain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/publish-to-confluence .claude/skills/publish-to-confluence && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
publish-to-confluence
GitHub stars
1.3k
Token cost
~1.9k tokens
SKILL.md length
572 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Publish any markdown file from the vault to Confluence with format conversion and approval gate

  • Works in 6 steps: Identify the Source Document → Configure Publishing Target → Convert Markdown to Confluence Format → …
  • Tasks that involve Markdown
  • SKILL.md covers When to Invoke, Agent Mode Awareness, Command: /publish-to-confluence and Pre-Flight Check, plus 4 more sections
  • Needs SPACE_KEY

What it does

Publish To Confluence is an agent skill from huytieu/COG-second-brain. Publish any markdown file from the vault to Confluence with format conversion and approval gate

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Markdown. It works with Confluence. The repository describes itself as: Self-evolving second brain with 35 AI skills, 10 agents, and people CRM. Closed-loop harness: a V-model verification lifecycle where the worker never grades its own homework… The licence is MIT.

When your agent uses it

  • Tasks that involve Markdown

Example prompts

  • “/publish-to-confluence”

Requirements

  • A credential in SPACE_KEY

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Identify the Source Document
  2. Configure Publishing Target
  3. Convert Markdown to Confluence Format
  4. Preview and Approval Gate
  5. Publish
  6. Confirm and Update Vault

What it can do on your machine

Read from SKILL.md and the folder at commit 36ac9d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SPACE_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Publish To Confluence loads about 1.9k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 572 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from huytieu/COG-second-brain at commit 36ac9d7, republished under its MIT licence (© huytieu). 572 words, ~1,939 tokens.

Download SKILL.mdSave it as .claude/skills/publish-to-confluence/SKILL.md (or your agent's skills folder).
name
publish-to-confluence
description
Publish any markdown file from the vault to Confluence with format conversion and approval gate
roles
product-manager, engineering-lead, founder
integrations
confluence

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.
  2. 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.

Show full SKILL.md (235 more words)Show less
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):

    yaml
    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

© huytieu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/publish-to-confluence of huytieu/COG-second-brain.

Open the folder on GitHubat commit 36ac9d7

Compare with similar skills

Publish To Confluence next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Publish To Confluence compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Publish To Confluence this skillhuytieu/COG-second-brain1.3k—~1.9kAutomated safety check: PassMIT
Learniurykrieger/claude-bedrock105—~6.5kAutomated safety check: NotesMIT
Markdown To Confluencetestdouble/han281—~2.4kAutomated safety check: PassMIT
Teachccplugins/awesome-claude-code-plugins970—~5.9kAutomated safety check: NotesApache-2.0
Confluence To Markdowniurykrieger/claude-bedrock1051 repos~2.8kAutomated safety check: NotesMIT
Open Knowledgeojowwalker77/BonsAI145—~5.1kAutomated safety check: PassCustom licence

Similar skills

  • Learn

    iurykrieger/claude-bedrock

    Ingests an external data source into the Second Brain. An agent skill from iurykrieger/claude-bedrock.

    105 GitHub stars~6.5k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check: notes
  • Publishes a local Markdown file to a user-specified Confluence location, creating a new page or updating an existing one through the Atlassian MCP server.

    281 GitHub stars~2.4k tokensUpdated 10 days ago
    Documents & OfficeAuto-check passed
  • Teach

    ccplugins/awesome-claude-code-plugins

    Teaches the Second Brain to recognize a new external data source.

    970 GitHub stars~5.9k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Confluence To Markdown

    iurykrieger/claude-bedrock

    Internal fetcher module for Confluence pages. An agent skill from iurykrieger/claude-bedrock.

    105 GitHub starsUsed in 1 repo~2.8k tokens
    Knowledge ManagementAuto-check: notes
  • Open Knowledge

    ojowwalker77/BonsAI

    Authoritative agent-runtime contract for working inside an OpenKnowledge project — a markdown-CRDT knowledge base exposed over MCP.

    145 GitHub stars~5.1k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Obsidian Markdown

    KevRojo/Dulus

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    167 GitHub stars~1.4k tokensUpdated 8 days ago
    Documents & OfficeAuto-check passed

More from huytieu/COG-second-brain

All 37 skills in this repo
  • Voice Baseline

    huytieu/COG-second-brain

    Measure your own writing corpus for the words and sentence shapes you over-use, so an agent writing in your voice stops amplifying your tics into a style.

    1.3k GitHub stars~957 tokensUpdated 9 days ago
    Auto-check passed
  • Daily Journal

    huytieu/COG-second-brain

    A passive daily work journal that Claude keeps FOR you so you never have to write it yourself.

    1.3k GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • Editorial Illustrations

    huytieu/COG-second-brain

    Generate meaning-carrying editorial data-illustrations in the monotykamary / Linear aesthetic (near-black grayscale, Inter display + mono labels, hairline framed figures) with a single coral accent.

    1.3k GitHub stars~2.4k tokensUpdated 9 days ago
    Auto-check passed
  • Loop Engineering

    huytieu/COG-second-brain

    Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns.

    1.3k GitHub stars~1.5k tokensUpdated 9 days ago
    Auto-check passed
  • Release Video

    huytieu/COG-second-brain

    Turn a product release (the list of shipped items plus real screen recordings) into a motion recap video and one explained demo per feature, with sound effects tied to on-screen motion and a…

    1.3k GitHub stars~1.7k tokensUpdated 9 days ago
    Auto-check passed
  • Onboarding

    huytieu/COG-second-brain

    Personalize COG for your workflow - creates profile, interests, and watchlist files with guided setup (run this first!)

    1.3k GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed

Works with

Questions about Publish To Confluence

What does Publish To Confluence do?

Publish any markdown file from the vault to Confluence with format conversion and approval gate. Publish To Confluence is an agent skill from huytieu/COG-second-brain.

When should I use Publish To Confluence?

Publish To Confluence fits situations like: tasks that involve Markdown.

How do I install Publish To Confluence in Claude Code?

Run `npx skills add huytieu/COG-second-brain --skill publish-to-confluence -a claude-code`. Or copy the skill folder (skills/publish-to-confluence in huytieu/COG-second-brain) into .claude/skills/publish-to-confluence in your project. Claude Code loads it when a task matches its description.

How do I install Publish To Confluence in Codex?

Run `npx skills add huytieu/COG-second-brain --skill publish-to-confluence -a codex`. Or copy the skill folder (skills/publish-to-confluence in huytieu/COG-second-brain) into .agents/skills/publish-to-confluence in your project. Codex loads it when a task matches its description.

Can I use Publish To Confluence in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add huytieu/COG-second-brain --skill publish-to-confluence -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/publish-to-confluence, .gemini/skills/publish-to-confluence, .github/skills/publish-to-confluence and .opencode/skills/publish-to-confluence in your project.

What does Publish To Confluence need to run?

Going by SKILL.md and its folder, Publish To Confluence needs credentials named SPACE_KEY. Our summary lists: A credential in SPACE_KEY.

Does Publish To Confluence access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Publish To Confluence safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Publish To Confluence use?

Publish To Confluence is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Publish To Confluence use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Publish To Confluence?

Skills that share tags, products or a category with Publish To Confluence: Learn (iurykrieger/claude-bedrock, 105 stars), Markdown To Confluence (testdouble/han, 281 stars), Teach (ccplugins/awesome-claude-code-plugins, 970 stars) and Confluence To Markdown (iurykrieger/claude-bedrock, 105 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Publish To Confluence?

huytieu (a GitHub user) maintains it in huytieu/COG-second-brain, which has 1,268 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 2, 2026.

Source: huytieu/COG-second-brain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.