The actual problem

In an internal engineering setup, the requirement sits in a Jira issue and the design doc sits in a Confluence page. To get AI involved, you open the web UI, copy the body text, paste it in — and lose the attachments, comments and subtasks along the way.

We use two existing CLIs and expose them to the agent as callable capabilities. No custom API integration, no MCP server to build.

Two tools, two jobs

ToolTargetCapabilities
pchuri/confluence-cli Confluence Server / Data Center Read pages, search, list spaces, create/update/delete pages, upload and download attachments, comments, export, format conversion
@pchuri/jira-cli Jira Server / Data Center Read issues, add comments, update content
Check your deployment first Both tools target self-hosted Server / Data Center. Atlassian Cloud (xxx.atlassian.net) uses different auth and API paths — do not copy these parameters there.

Where the installs differ

The names look similar; the package names and init commands do not.

StepConfluenceJira
Installnpm install -g confluence-clinpm install -g @pchuri/jira-cli
Initconfluence init (flag-based)jira config (flag-based)
URL--domain + --api-path--server (full URL)
Auth--auth-type basic + --email + --token--username + --token
Install skillconfluence install-skill --dest ./.claude/skills/wikijira install-skill --dest ./.claude/skills/jira
Two common mistakes ① Writing the Jira package as jira-cli and dropping the @pchuri/ scope. ② Passing --server to Confluence — it expects --domain plus --api-path.

Confluence setup

# 1. Install npm install -g confluence-cli # 2. Initialise confluence init \ --domain "wiki.xxx.com" \ --api-path "/rest/api" \ --auth-type "basic" \ --email "your_username" \ --token "your_password" # 3. Install the skill into this project confluence install-skill --dest ./.claude/skills/wiki

--api-path is usually /rest/api. If your Confluence lives under a sub-path (e.g. wiki.xxx.com/confluence), adjust it accordingly.

Jira setup

# 1. Install (mind the @pchuri/ scope) npm install -g @pchuri/jira-cli # 2. Initialise jira config \ --server https://jira.xxx.com \ --username your_username \ --token your_password # 3. Install the skill jira install-skill --dest ./.claude/skills/jira

Jira init is simpler: --server takes the full URL, no domain/API-path split.

Two prompts you can use

Confluence: read → plan → execute → attach

Using the Confluence skill, read the requirement on PageId=1000, produce a change plan, and after I confirm, save the plan as plan-pageid.txt. Then execute the plan, save the result as result-pageid.txt, and upload both as attachments under PageId.

The important part: write the output back to the original page, not just into the chat. Attachments under the requirement page are visible to everyone.

Jira: read → code → commit → comment

Using the jira skill, fetch the requirement for issue=SCRVUL-9046, get the code, switch to the target branch, and produce a change plan. After I confirm, execute it. Once the code is done, commit and push. Then call the jira skill again and add two comments: the plan and the result.

Same principle — write the plan and result back as issue comments. The requester never has to look at your chat window.

Why "confirm before execute" Splitting plan → approval → execution stops most runaway changes. It matters most for code edits and page writes.

A real run: turning Confluence into a weekly report

We also use the same skill for routine reporting. The goal was simple: read one Confluence page, extract the week's work, and generate an Excel report with three fixed sections.

The prompt we actually used

Using the Confluence skill, read the document at pageid 112525338, summarize it, and generate a weekly report.

The prompt is short but includes the three essentials: which skill to use, which PageId to read, and what artefact to produce. A PageId is more stable than a page title — renaming the page does not break the flow.

What the run produced

  • A three-section weekly report generated from the template and saved as 周报1106.xlsx, with the worksheet named 11.02-11.06.
  • The sections contained 9 progress items, 5 issues with fixes, and 8 items for next week's plan.
  • The agent also kept generate_weekly_report_1106.py, so the report can be adjusted and regenerated without starting over.
  • The run took about 11 minutes 20 seconds. This is a multi-step task, not an instant chat reply.
Actual run screenshot (redacted; click to open the full image). The prompt, output path, report counts and elapsed time all come from the real session.
Why this case matters Not because “AI can write a report”, but because it connects reading an internal document, extracting the relevant facts, producing a structured file, and keeping a rerunnable script. Next week you only change the PageId and date.

Two practical rules follow from the run: read first, generate second — do not let the agent modify the source page immediately; and keep the generation script so format fixes are a small edit and a rerun, not a full redo.

Chaining them together

  1. Requirement gathering — Jira issue plus the linked Confluence doc, merged into one brief.
  2. Plan — the agent drafts a change plan for human review.
  3. Execution — hand it to a coding agent (see Coding Agents).
  4. Write-back — plan and result go to Jira comments and Confluence attachments.
  5. Codify — turn the whole flow into a Skill so next time is one sentence.

Permissions and safety

Use a dedicated service account Give the CLIs only what they need: read issues, add comments, upload attachments. Not "delete pages" or "edit permissions".
Keep credentials out of the repo Init writes local config. Make sure it is not committed, and never paste --token into scripts or chat logs.
Confirm before write-back Creating pages, adding comments and uploading attachments are writes. Have the agent state what it is about to write, then confirm.
Verify against the README This records what worked for us in November 2026. CLI flags change — run confluence --help and jira --help after installing.