Clip thread

From mikeprasad/aria-knowledge · View interactive version

Clip thread is an AI agent skill from the GitHub repository mikeprasad/aria-knowledge. NOTE: this skill requires ~~chat or ~~email MCPs, which are typically only connected in Cowork — the Code variant exists for parity but most users will want the Cowork variant. Capture a chat or email thread from a connected MCP to the knowledge intake. Use when user says '/clip-thread', 'clip this

How to use this skill

Skill file

/clip-thread — Capture Chat/Email Thread to Intake

RETIRED 2026-06-21 (v2.33.0). Folded into /intake: clip-thread → /intake thread <id> (or auto-detected from a chat/email URL). Kept for reference only — not a live skill (archived under skills/.archived/, excluded from discovery).

Save a chat thread or email conversation to intake/clippings/{YYYY-MM-DD}-{slug}.md for review and promotion. Unlike /clip (URL/snippet) or /intake (bulk/doc-anchored), /clip-thread is shaped specifically for threaded conversations — Slack threads, Teams channel discussions, Gmail conversation chains, MS365 email threads.

Runtime Gate (per ADR-094)

Canonical resolution: This is the Claude Code variant. When both plugin-claude-code and plugin-claude-cowork are loaded in the same session (most common in Claude Desktop), bare /clip-thread resolves to this skill — aria-knowledge (Code) is the canonical owner of all 24 dual-port skills per ADR-094 §Part 1. The Cowork variant is namespaced-only: /aria-cowork:clip-thread.

Before Step 0: Check that the Bash tool is available in this session. If Bash is NOT available (you are running in Claude Cowork or another non-Code runtime), surface the following notification and wait for explicit user confirmation:

⚠️ Runtime mismatch — you invoked aria-knowledge's /clip-thread from a non-Code runtime.

This skill requires connected ~~chat / ~~email MCPs, which are typically only present in Cowork. The Cowork-native variant has working MCP access. Use /aria-cowork:clip-thread.

Use /aria-cowork:clip-thread instead? (y / n)

Wait for an explicit reply:

This gate applies even when mode = auto per ADR-094 §Part 3. Auto mode's "implicit-yes on all gates" rule is suspended for the runtime-mismatch check — auto trusts that the user invoked the correct variant, and this gate enforces that precondition. All other auto-mode gates remain bypassed. The friction cost is now low: on y, the auto-redirect runs the correct variant with the original args.

If Bash is available, proceed to Step 0.

Step 0: Resolve Config

Read ~/.claude/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/clippings/ exists. If not, stop: "Clippings directory not found. Run /setup to repair the knowledge folder structure."

Step 1: Probe Connected MCPs

Check Claude's available tool list for ~~chat and ~~email MCPs. The skill needs at least ONE of these connected to proceed.

If NEITHER category has a connected MCP, output the standard fallback notice and stop:

No required MCPs connected for /clip-thread. Connect one of: Slack, Microsoft 365 Teams (for ~~chat) or Gmail, Microsoft 365 Outlook (for ~~email) 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), the runtime tool list IS the probe — no explicit API call needed.

Step 2: Parse Input

The user provides one of:

Optionally followed by tags (e.g., slack #engineering, email customer-feedback).

Source-type detection:

| Input shape | Routes to |

|---|---|

| Contains slack.com/archives/ | ~~chat (slack) |

| Contains teams.microsoft.com | ~~chat (ms365) |

| Contains mail.google.com or matches Gmail thread-ID pattern | ~~email (gmail) |

| Outlook-shaped ID | ~~email (ms365) |

| Ambiguous | Ask user which category to route through |

If the detected category's MCP is NOT connected, output the category-specific fallback notice and stop:

This thread looks like a [Slack thread / Gmail thread / etc.] but the ~~chat / ~~email MCP for that source is not connected. Connect [vendor] via your MCP config and retry. Skipping this run.

Step 3: Fetch Thread Content

Call the appropriate MCP tool to retrieve the thread:

For each message in the thread, gather:

Limit: if the thread has more than 50 messages, fetch the first 50 + note the truncation in the clipping. The user can run /clip-thread again with a refined identifier for the tail.

Step 4: Compose Clipping

Slug-ify the thread for the filename: use the first message's first ~6 significant words, lowercased, hyphen-separated, ASCII-only.

Generate the date stamp as YYYY-MM-DD (local time).

Filename: intake/clippings/{date}-{slug}.md

If a file with that name already exists, append -2, -3, etc. to deduplicate.

Body template:

---
source: <thread-url-or-id>
source_type: <slack|teams|gmail|ms365>
date: <YYYY-MM-DD>
participants: [<list of unique authors>]
message_count: <N>
tags: [<from input args, plus auto-detected like 'slack' or 'email'>]
---

# <thread topic — extracted from first message's first line or the channel name>

## Context

- **Source:** <source URL or "Slack thread in #channel" / "Gmail thread with N replies">
- **Participants:** <N authors>: <list>
- **Spans:** <first-message-date> → <last-message-date>
- **Message count:** <N> (or "<N> of <total> — truncated at 50")

## Thread

<for each message:>

### <Author> — <timestamp>

<message body, lightly cleaned (remove Slack/MS markup if obvious, preserve markdown)>

<reactions if present: e.g., "Reactions: 👍 ×3, 🎉 ×1">

<attachment notes if present: e.g., "[attachment: deploy-logs.txt (45KB)]">

---

## Reaction

<intentionally left empty — the user's reaction / why this is worth keeping. /audit-knowledge surfaces this for review at next audit pass.>

Step 5: Write + Report

Write the composed clipping to {knowledge_folder}/intake/clippings/{date}-{slug}.md.

Report to user:

Clipped <N> messages from <source-type> thread to intake/clippings/<date>-<slug>.md.

- Participants: <list, max 5 + "and N more" if truncated>
- Spans: <date range>
- Tags: <from input>

Next: review at next /audit-knowledge run. Add a reaction in the "## Reaction" section if you want to lock in the why-it-matters context now.

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.