# Confluence Knowledge Base Auditor

> Audit your Confluence knowledge base for stale pages, orphaned content, and neglected spaces. Get a health report automatically.

Source: https://cotera.co/solutions/ops/confluence-knowledge-base-auditor

---

- **Team:** Operations
- **Tools:** Confluence
- **Difficulty:** medium
- **Setup time:** 10 min
- **Time saved:** 2-3 hrs/audit

## How it works
1. **Enumerate Spaces** — Lists all Confluence spaces and identifies neglected ones with low page counts
2. **Find Stale Content** — Searches for pages not updated within your threshold and flags critically stale content
3. **Detect Orphans** — Identifies pages with no parent-child relationships or inbound links from other content
4. **Health Report** — Generates a space-by-space breakdown with health scores and cleanup recommendations

## Example requests
- Audit all our Confluence spaces and flag anything not updated in the last 90 days
- Check the Engineering and Product spaces for orphaned pages and stale documentation
- Generate a health report for our knowledge base with a 60-day staleness threshold

## Prompt

```markdown
## Task

Use @Confluence/List Spaces to enumerate all spaces, @Confluence/Search Pages to find pages by last modified date, and @Confluence/Get Page to inspect individual pages. Identify stale pages (not updated in 90+ days), orphaned content (pages with no child pages or parent links), and spaces with low page counts. Generate a comprehensive health report.

## Input

The user provides:
1. The staleness threshold in days (optional, defaults to 90 days)
2. Specific spaces to audit (optional, defaults to all spaces)
3. Whether to include archived spaces (optional, defaults to false)

**Example:** "Audit all our Confluence spaces and flag anything not updated in the last 90 days"

## Context

### Enumerate Spaces

1. Use @Confluence/List Spaces to get all active spaces in the Confluence instance
2. Record space keys, names, and types (global vs. personal)
3. Note spaces with unusually low page counts as potentially neglected

### Search for Stale Content

1. Use @Confluence/Search Pages with CQL to find pages not modified within the staleness threshold
2. Group stale pages by space to identify patterns
3. Flag pages that haven&apos;t been updated in 180+ days as critically stale

### Inspect Orphaned Pages

1. Use @Confluence/Get Page to check individual pages for parent-child relationships
2. Identify pages with no children that appear to be standalone or disconnected
3. Flag pages that have no inbound links from other content

### Compile Health Report

1. Summarize findings by space: total pages, stale pages, orphaned pages
2. Calculate a health score for each space based on content freshness
3. Provide actionable recommendations for cleanup

## Output

**Confluence Knowledge Base Health Report**

**Audit Date:** [date]
**Spaces Audited:** [count]
**Staleness Threshold:** [X] days

**Summary:**
- Total pages scanned: [count]
- Stale pages (90+ days): [count]
- Critically stale (180+ days): [count]
- Orphaned pages: [count]
- Neglected spaces: [count]

**Space-by-Space Breakdown:**

| Space | Total Pages | Stale | Orphaned | Health Score |
|-------|-------------|-------|----------|--------------|
| [space name] | [count] | [count] | [count] | [score] |

**Recommendations:**
- [Actionable cleanup suggestions]
```

## Related reading
- [We Automated Our Confluence Workflows. Nobody Missed the Manual Updates.](https://cotera.co/articles/knowledge-management-software-guide.md)

