Extract doc

From mikeprasad/aria-knowledge · View interactive version

Extract doc is an AI agent skill from the GitHub repository mikeprasad/aria-knowledge. NOTE: this skill requires connected ~~docs MCPs (Notion, Google Docs, Confluence, Box, Egnyte), which are typically only present in Cowork — the Code variant exists for parity but most users will want the Cowork variant. Pull insights from a single doc or page (Notion, Google Doc, Confluence, etc.)

How to use this skill

Skill file

/extract-doc — Extract Insights from a Doc to Intake Backlog

RETIRED 2026-06-21 (v2.33.0). Folded into /intake: extract-doc → /intake extract <doc-url> (decompose a source into backlog entries). Kept for reference only — not a live skill (archived under skills/.archived/, excluded from discovery).

Pull knowledge-worthy items from a single connected ~~docs source (Notion page, Google Doc, Confluence page, Box doc, Egnyte file) into intake/insights-backlog.md. Unlike /intake doc (which captures the doc itself as one structured artifact for later reaction), /extract-doc decomposes the doc into N intake entries — one per insight, decision, or question worth surfacing at audit.

Step 0: Resolve Config

Read ~/.gemini/antigravity/aria-knowledge.local.md and extract knowledge_folder. If the file doesn't exist, stop: "aria-knowledge is not configured. Run /setup to get started."

Verify {knowledge_folder}/intake/insights-backlog.md exists. If not, stop: "Insights backlog not found. Run /setup to repair the knowledge folder structure."

Step 1: Probe Connected MCPs

Check Claude's available tool list for ~~docs MCPs:

If NO ~~docs MCP is connected, output the standard fallback notice and stop:

No required MCPs connected for /extract-doc. Connect one of: Notion, Atlassian (Confluence), Box, Egnyte, or Google Docs (when available) via Claude Code's MCP config (or Cowork Settings → Connectors). See CONNECTORS.md. Skipping this run.

Per ADR-015 ({knowledge_folder}/projects/aria-cowork/decisions/015-capability-probe-pattern.md).

Step 2: Parse Input

The user provides one of:

Optionally followed by tags (e.g., engineering postmortem, cs onboarding).

Source-type detection:

| Input shape | Routes to |

|---|---|

| Contains notion.so or www.notion.so | ~~docs (notion) |

| Contains atlassian.net/wiki | ~~docs (atlassian) |

| Contains docs.google.com/document | ~~docs (google docs) |

| Contains app.box.com/file | ~~docs (box) |

| Contains egnyte.com | ~~docs (egnyte) |

| Ambiguous | Ask user which ~~docs MCP holds the doc |

If the detected-source's MCP is not connected, output a specific fallback notice:

This doc looks like a [Notion / Confluence / etc.] page but the [vendor] MCP is not connected. Connect [vendor] via your MCP config and retry, or paste the doc URL of a different format. Skipping this run.

Step 3: Fetch Doc Content

Call the connected MCP's page/doc-fetch tool with the resolved ID:

Gather:

Limit: if the doc is >20KB of extracted text, fetch the first 20KB + note the truncation in the entry metadata. The user can re-invoke with a section anchor (#heading) for the tail.

Step 4: Extract Insights

Read the doc body and identify knowledge-worthy items — discrete propositions worth surfacing at next /audit-knowledge. Each candidate should be a single self-contained claim, decision, lesson, or question.

For each candidate, classify into one of the standard intake categories:

| Category | Use when |

|---|---|

| insight | Observation about how something works, or a learning |

| decision | A choice that was made + rationale |

| extraction | A pattern, recipe, or how-to worth promoting later |

| idea | A "we should consider X" proposition |

| reference | A useful URL or external resource named in the doc |

Quality bar: skip items that are project-status updates, ephemeral context, or items already obviously in the knowledge folder. Default to fewer-but-stronger — extracting 3 strong items beats 12 weak ones.

Step 5: Stage to Backlog + Report

For each extracted item, append a new entry to {knowledge_folder}/intake/insights-backlog.md (or decisions-backlog.md / extraction-backlog.md per category; ideas go to intake/ideas/<date>-<slug>.md per v2.11.0 per-file convention).

Standard intake entry format (mirrors /extract skill output):

## <one-line claim or title>

- **Source:** [<doc-title>](<doc-url>) ([<vendor>])
- **Date captured:** <YYYY-MM-DD>
- **Project tags:** <from input args + auto-detected from doc workspace>
- **Original context:** <2-3 sentence excerpt from the doc giving the surrounding context>

<the insight itself, 1-3 sentences, in the user's voice as inferred from the doc>

For idea candidates (per v2.11.0 per-file convention), write {knowledge_folder}/intake/ideas/{date}-{slug}.md:

---
date: <YYYY-MM-DD>
project: <tag>
type: <category>
title: <slug-shaped title>
source: <doc-url>
---

**Proposal:** <the idea>

**Motivation:** <why this matters per the doc context>

**Source:** [<doc-title>](<doc-url>) via /extract-doc

Report to user:

Extracted <N> items from <doc-title> (<vendor>):

| Category | Count | Routed to |
|---|---|---|
| insight | <n> | intake/insights-backlog.md |
| decision | <n> | intake/decisions-backlog.md |
| extraction | <n> | intake/extraction-backlog.md |
| idea | <n> | intake/ideas/<date>-*.md |
| reference | <n> | intake/insights-backlog.md (will route to references/ at audit) |

Next: review at next /audit-knowledge run. The standard disposition vocabulary (Accept → tracker / roadmap / todo / adr / plan / bundle / rule / Defer / Reject) applies.

Rules

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.