How the skill works: your agent reads stale pages from Confluence; space keys from What you tell it, 1st of the month at 9:00, and gives you a question for you and a telegram ping and the report in the chat.
Reads
ConfluenceStale pages
What you tell itSpace keys
reads
Your agentClaude Code, Codex, Cursor or Gemini1st of the month at 9:00
posts
You get
A question for youOn your board, answered with a tap
A Telegram pingOnly when it needs your answer, if you connect Telegram
The report in the chatEvery run, with or without Briefkin
What you get
Stale pages: how many, and how many carry a label you rely on.
The ranked list: page, space, label, days since last edit and owner.
The rest, unlabeled, as a count per space for next month.
The ask: have owners confirm, archive the oldest, or go one by one.
The card on the right is a sample. Yours shows your own numbers and updates in place every run.
What lands on your board
Your board1st of the month at 9:00
AcmeConfluence stale pages audit · Claude Code
9 how-to and runbook pages untouched for 6 months
What should happen to the 9 labeled pages?
31 pages in Support and Engineering were last edited over 180 days ago. 9 carry the runbook, how-to or policy label, so customers or on-call may be following them today.
Page
Space
Label
Last edited
Owner
Reset a customer password
SUP
how-to
402 days ago
Lena
Payments outage runbook
ENG
runbook
366 days ago
Sam
Refund policy exceptions
SUP
policy
311 days ago
Dana
Restore a deleted workspace
SUP
how-to
274 days ago
Marco
Rotate API signing keys
ENG
runbook
249 days ago
Priya
Data export requests
SUP
how-to
233 days ago
Lena
Queue backlog runbook
ENG
runbook
214 days ago
Theo
Escalating to engineering
SUP
how-to
205 days ago
Dana
Enterprise SSO setup
SUP
how-to
188 days ago
Marco
The other 22 stale pages have no label you rely on. They are in the full report and can wait for next month.
An example with made-up numbers. Your agent posts your real ones.
What it does
The risky stale page is not the old meeting note; it is the how-to that support sends to customers and the runbook on-call follows at 3 a.m. Both look as current as the day they were written.
Once a month the agent finds pages in your chosen spaces that have gone 180 days without an edit and puts the ones people depend on first: pages labeled runbook, how-to or policy, pages under the parents you name, and, where your plan has page analytics, the most viewed. The card asks whether to have each owner confirm the page or archive it.
How it works
1Find the stale pages
Call GET /wiki/rest/api/search with cql=space in (SUP, ENG) and type = page and lastmodified < startOfDay("-180d") and limit=100, following _links.next. On the Atlassian Rovo MCP server, use searchConfluence with the same CQL.
2Rank by reliance
Put first the pages matching label in ("runbook", "how-to", "policy") (or your own labels), then pages under the parents you name (ancestor = <id>), then the rest by age. If your Confluence plan includes page analytics, add view counts from GET /wiki/rest/api/analytics/content/{id}/views; if that call is refused, rank without it.
3Find each owner
Read ownerId and authorId from GET /wiki/api/v2/pages/{id} and turn them into names with GET /wiki/rest/api/user?accountId=<id>.
4Ask, then act
Post the ranked list as an ask. To have owners confirm, add a footer comment that mentions them (createConfluenceComment on the Rovo MCP server, or POST /wiki/api/v2/footer-comments). To archive, call archiveConfluenceContent or POST /wiki/rest/api/content/archive.
Post it to the board
With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
Install and run it
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
Agent
Data
Schedule
Install the skill
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shellcurl -fsSL https://briefkin.dev/skills/confluence-stale-pages-audit/install | sh
Run it
Ask Claude Code:
promptRun the confluence-stale-pages-audit skill
Or paste the prompt instead of installing:
promptUsing Confluence Cloud (CQL search, or the Atlassian Rovo MCP server), find pages in spaces SUP and ENG not modified in the last 180 days. Rank first the pages labeled runbook, how-to or policy, then the rest by age; add page view counts only if the analytics API answers. For each give the title, space, label, days since last edit and owner name. Then ask me whether to comment to each owner asking them to confirm the page, archive the oldest, or go one by one. Change nothing until I answer.
Put it on a schedule
1st of the month at 9:00, from cron on any machine where Claude Code is signed in:
crontab0 9 1 * * claude -p "Run the confluence-stale-pages-audit skill"
Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.
Send it to your board
Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a question for you. How setup works
SKILL.md---
name: confluence-stale-pages-audit
description: "On the 1st of each month: Confluence pages not edited in 180 days, ranked by the ones people rely on, with their owner and a question on what to do. Use when the user asks for this, or when it runs on a schedule."
---
# Confluence stale pages audit
On the 1st of each month: Confluence pages not edited in 180 days, ranked by the ones people rely on, with their owner and a question on what to do.
The risky stale page is not the old meeting note; it is the how-to that support sends to customers and the runbook on-call follows at 3 a.m. Both look as current as the day they were written.
Once a month the agent finds pages in your chosen spaces that have gone 180 days without an edit and puts the ones people depend on first: pages labeled runbook, how-to or policy, pages under the parents you name, and, where your plan has page analytics, the most viewed. The card asks whether to have each owner confirm the page or archive it.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- View access to the spaces, through the Atlassian Rovo MCP server or an Atlassian API token with your email; comment permission, and the space's Archive permission, if the agent should act.
- The space keys, and the labels or parent pages that mark content people rely on.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Find the stale pages** (Confluence): Call `GET /wiki/rest/api/search` with `cql=space in (SUP, ENG) and type = page and lastmodified < startOfDay("-180d")` and `limit=100`, following `_links.next`. On the Atlassian Rovo MCP server, use `searchConfluence` with the same CQL.
2. **Rank by reliance** (Confluence): Put first the pages matching `label in ("runbook", "how-to", "policy")` (or your own labels), then pages under the parents you name (`ancestor = <id>`), then the rest by age. If your Confluence plan includes page analytics, add view counts from `GET /wiki/rest/api/analytics/content/{id}/views`; if that call is refused, rank without it.
3. **Find each owner** (Confluence): Read `ownerId` and `authorId` from `GET /wiki/api/v2/pages/{id}` and turn them into names with `GET /wiki/rest/api/user?accountId=<id>`.
4. **Ask, then act** (Confluence): Post the ranked list as an ask. To have owners confirm, add a footer comment that mentions them (`createConfluenceComment` on the Rovo MCP server, or `POST /wiki/api/v2/footer-comments`). To archive, call `archiveConfluenceContent` or `POST /wiki/rest/api/content/archive`.
## Route B: the browser
### What you need
- Signed in to Atlassian with view access to the spaces; commenting needs the Add comments space permission and archiving needs the space's Archive permission.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://home.atlassian.com. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Search for old pages**: Open `https://home.atlassian.com`, pick your Confluence site, open the search box and click **Advanced search**. Set **Type** to **Page**, **Space** to SUP and ENG, and under the last modified filter choose **Custom** with an end date 180 days ago.
2. **Rank the labeled pages first**: Add the **Label** filter for `runbook`, `how-to` and `policy` and note those pages first, then clear the label filter and sort the rest by **Last modified**, oldest first. Pages under a parent you rely on count too: open the space page tree to check.
3. **Read owner and views**: Open each labeled page and read the owner and last editor in the byline. If your plan shows an **Analytics** tab on the page (Premium and Enterprise), note the views for the last 90 days.
4. **Ask, then act**: Present the ranked list and wait for an answer. To have an owner confirm, add a page comment that @mentions them. To archive, use **Archive** from the page's **...** menu, one page at a time.
Note: Search results load page by page and do not export, so copy them as you go; past a few hundred stale pages the API route is quicker. The Analytics tab only appears on Premium and Enterprise sites. Archiving from the page menu is one page at a time on Standard plans.
## The report
- **Stale pages**: how many, and how many carry a label you rely on.
- **The ranked list**: page, space, label, days since last edit and owner.
- **The rest**, unlabeled, as a count per space for next month.
- The ask: have owners confirm, archive the oldest, or go one by one.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "confluence-stale-pages-audit/<date of this run, e.g. 2026-10-16>",
"item_key": "confluence-stale-pages-audit",
"project": "Acme",
"source": "Confluence stale pages audit skill",
"kind": "action",
"title": "9 how-to and runbook pages untouched for 6 months",
"summary": "**31** pages in Support and Engineering were last edited over 180 days ago. **9** carry the runbook, how-to or policy label, so customers or on-call may be following them today.",
"action": {
"request": "What should happen to the 9 labeled pages?",
"options": [
"Ask owners to confirm",
"Archive the 3 oldest",
"Go one by one",
"Leave them"
]
},
"widget": [
{
"type": "Table",
"props": {
"columns": [
"Page",
"Space",
"Label",
"Last edited",
"Owner"
],
"align": [
"left",
"left",
"left",
"right",
"left"
],
"rows": [
[
"Reset a customer password",
"SUP",
"how-to",
"402 days ago",
"Lena"
],
[
"Payments outage runbook",
"ENG",
"runbook",
"366 days ago",
"Sam"
],
[
"Refund policy exceptions",
"SUP",
"policy",
"311 days ago",
"Dana"
],
[
"Restore a deleted workspace",
"SUP",
"how-to",
"274 days ago",
"Marco"
],
[
"Rotate API signing keys",
"ENG",
"runbook",
"249 days ago",
"Priya"
],
[
"Data export requests",
"SUP",
"how-to",
"233 days ago",
"Lena"
],
[
"Queue backlog runbook",
"ENG",
"runbook",
"214 days ago",
"Theo"
],
[
"Escalating to engineering",
"SUP",
"how-to",
"205 days ago",
"Dana"
],
[
"Enterprise SSO setup",
"SUP",
"how-to",
"188 days ago",
"Marco"
]
]
}
},
{
"type": "Callout",
"props": {
"text": "The other 22 stale pages have no label you rely on. They are in the full report and can wait for next month.",
"tone": "info"
}
}
]
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
## Run it on a schedule
Suggested: 1st of the month at 9:00 (`0 9 1 * *`). From cron, with the agent signed in on that machine:
```bash
0 9 1 * * claude -p "Run the confluence-stale-pages-audit skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/confluence-stale-pages-audit#schedule
Source: https://briefkin.dev/skills/confluence-stale-pages-audit
What your agent needs
View access to the spaces, through the Atlassian Rovo MCP server or an Atlassian API token with your email; comment permission, and the space's Archive permission, if the agent should act.
The space keys, and the labels or parent pages that mark content people rely on.
Connecting Confluence
Atlassian Rovo MCP Server, Atlassian's official remote server for Confluence and Jira at https://mcp.atlassian.com/v2/mcp. Add the Atlassian connector from Claude's directory, or in Claude Code run claude mcp add --transport http atlassian https://mcp.atlassian.com/v2/mcp and authenticate with /mcp; Codex and Cursor take the same URL. It searches Confluence with CQL, reads pages and comments, and can create and edit pages, always within your own Confluence permissions (getting started).
REST API with an API token. Create a token at id.atlassian.com under Security > API tokens. The skill reads CONFLUENCE_EMAIL, CONFLUENCE_API_TOKEN and CONFLUENCE_BASE_URL (https://acme.atlassian.net) and uses basic auth. A scoped token with read scopes such as search:confluence and read:confluence-content.summary is narrower; scoped tokens call https://api.atlassian.com/ex/confluence/{cloudId} instead of your site URL.
A classic token can do everything your account can, so prefer a scoped read-only token, or run reports as an account with View permission on just the spaces involved.
Questions
Why doesn't it rank by page views?
View counts come from Confluence page analytics, which not every plan includes. The skill tries the analytics call and falls back to labels, parent pages and age when it is refused, so it works on any plan; adding a runbook or how-to label to the pages that matter makes the ranking sharper.
What does archiving do?
Archived pages leave the page tree and default search but can be restored. Through the API, Free sites cannot archive, and sites below Premium archive one page per request, so the skill archives one at a time.
Do I need Briefkin to use the Confluence stale pages audit skill?
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a asks you, so you can glance at it instead of asking again.
Which agents can run it?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Can it work without an API or MCP server, from my browser?
Yes. Switch the data source to "Your browser" and the steps change to the Confluence pages themselves: the agent opens home.atlassian.com in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.
Answer your agents from one board, or from Telegram
Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.