Skip to content

Skill Setup

cf ships with a skill file (SKILL.md) that teaches AI agents how to use the CLI --- runtime command discovery, token-efficient patterns, error handling, and batch operations.

The skill follows the Agent Skills open standard, supported by 30+ tools including Claude Code, Cursor, VS Code Copilot, OpenAI Codex, Gemini CLI, Goose, and more.

Download the Skill

bash
curl -sL https://raw.githubusercontent.com/sofq/confluence-cli/main/skill/confluence-cli/SKILL.md \
  -o SKILL.md

Or copy from a local cf install:

bash
cp $(brew --prefix cf)/share/cf/skill/confluence-cli/SKILL.md SKILL.md

Setup by Tool

Claude Code

ScopePath
Project (shared via git).claude/skills/confluence-cli/SKILL.md
Personal (all projects)~/.claude/skills/confluence-cli/SKILL.md
bash
mkdir -p .claude/skills/confluence-cli
cp SKILL.md .claude/skills/confluence-cli/SKILL.md

Grant permission to run cf:

json
// .claude/settings.json
{
  "permissions": {
    "allow": ["Bash(cf *)"]
  }
}

Claude loads the skill automatically when you mention Confluence, or invoke it directly with /confluence-cli.

See Claude Code skills docs for more details.

Cursor

ScopePath
Project.cursor/skills/confluence-cli/SKILL.md or .agents/skills/confluence-cli/SKILL.md
Personal~/.cursor/skills/confluence-cli/SKILL.md
bash
mkdir -p .cursor/skills/confluence-cli
cp SKILL.md .cursor/skills/confluence-cli/SKILL.md

Cursor discovers skills automatically at startup and applies them when relevant. Invoke manually with /confluence-cli in Agent chat.

See Cursor skills docs for more details.

VS Code Copilot

ScopePath
Project.github/skills/confluence-cli/SKILL.md or .agents/skills/confluence-cli/SKILL.md
Personal~/.copilot/skills/confluence-cli/SKILL.md
bash
mkdir -p .github/skills/confluence-cli
cp SKILL.md .github/skills/confluence-cli/SKILL.md

Copilot discovers skills progressively --- reads metadata first, loads full instructions when relevant.

See VS Code skills docs for more details.

OpenAI Codex

ScopePath
Project.agents/skills/confluence-cli/SKILL.md
Personal~/.agents/skills/confluence-cli/SKILL.md
System/etc/codex/skills/confluence-cli/SKILL.md
bash
mkdir -p .agents/skills/confluence-cli
cp SKILL.md .agents/skills/confluence-cli/SKILL.md

Codex scans .agents/skills/ from the current directory up to the repo root. Invoke with /skills or $confluence-cli in the prompt.

See Codex skills docs for more details.

Gemini CLI

ScopePath
Workspace.gemini/skills/confluence-cli/SKILL.md or .agents/skills/confluence-cli/SKILL.md
Personal~/.gemini/skills/confluence-cli/SKILL.md or ~/.agents/skills/confluence-cli/SKILL.md
bash
mkdir -p .gemini/skills/confluence-cli
cp SKILL.md .gemini/skills/confluence-cli/SKILL.md

Gemini CLI injects skill descriptions into the system prompt at session start. When a matching task is detected, it calls activate_skill with user confirmation.

TIP

.agents/skills/ takes precedence over .gemini/skills/ when both exist.

See Gemini CLI skills docs for more details.

Goose

ScopePath
Project.goose/skills/confluence-cli/SKILL.md or .agents/skills/confluence-cli/SKILL.md
bash
mkdir -p .goose/skills/confluence-cli
cp SKILL.md .goose/skills/confluence-cli/SKILL.md

See Goose skills docs for more details.

Universal Path (.agents/skills/)

Most tools scan .agents/skills/ as a vendor-neutral directory. If your tool isn't listed above, or you want one path that works across multiple tools:

bash
mkdir -p .agents/skills/confluence-cli
cp SKILL.md .agents/skills/confluence-cli/SKILL.md

This works with Codex, Cursor, VS Code Copilot, Gemini CLI, Goose, and others that support the Agent Skills standard.

What the Skill Teaches

The SKILL.md teaches agents to:

CapabilityHow
Discover commandscf schema for runtime discovery --- no hardcoded knowledge
Workflow commandscf workflow for move, copy, publish, archive, comment, restrict --- no raw JSON
Minimize tokens--preset for common field sets, --fields + --jq for custom filtering
Batch callscf batch for multiple operations in one process
Handle errorsBranch on exit codes: 0=ok, 2=auth, 3=not_found, 5=rate_limited
Configure authSetup with cf configure, profiles, env vars
TroubleshootCommon issues: auth failures, unknown commands, large responses

For Tools Without Skill Support

If your tool doesn't support the Agent Skills standard, add this to the system prompt or agent instructions:

You have access to `cf`, an agent-friendly Confluence CLI.
- All output is JSON on stdout. Errors are JSON on stderr.
- Use `cf workflow` for move, copy, publish, archive, comment, restrict (no raw JSON).
- Use --preset (agent, brief, titles, tree, meta, search, diff) or --fields + --jq to limit tokens.
- Exit codes: 0=ok, 1=error, 2=auth, 3=not_found, 4=validation, 5=rate_limited, 6=conflict, 7=server.
- Run `cf schema` to discover commands at runtime.
- Use `cf batch` to run multiple operations efficiently.