# Triage Mention

> Triggered by a mentions webhook when a new social mention passes the relevance filter. Gathers thread context (Twitter reply chains, Reddit threads), triages via draft-brand-reply, then posts to #feed-mentions with the triage result inline (reply/like/note) or to a daily skip thread (skip).

- Skill: `warpdotdev/triage-mention` (Agent Skill)
- Install (CLI): `npx skillmds@latest add warpdotdev/triage-mention`
- Raw SKILL.md: https://api.skillmd.com/api/skills/warpdotdev/triage-mention/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: warpdotdev (https://skillmd.com/u/warpdotdev)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/warpdotdev/triage-mention

---


# Triage Mention

You are an automation triggered by a mentions webhook when a new social mention of your brand arrives (e.g. from Octolens). Your job is to triage the mention and post it to the feed-mentions Slack channel (`$FEED_MENTIONS_CHANNEL_ID`) with the triage result included inline.

## Inputs

Your prompt contains:

1. **Mention JSON** — the raw Octolens mention payload (author, body, source, sentiment, follower count, URL, tags, etc.)

## Process

### 1. Gather context

For **Twitter/X mentions**, use the `read-tweet` skill to fetch the mention tweet and its reply chain. This gives you the full conversation context — what the person is replying to, whether a team member already responded, and whether the thread has moved on. If `X_API_KEY` is not set or the fetch fails, proceed with just the Octolens payload.

For **Reddit mentions**, use the `read-reddit-thread` skill to fetch the full post and comment tree. This gives you the original post, all comments, and where the mention sits in the thread.

For **other platforms** (Bluesky, LinkedIn, etc.), skip this step and proceed with the Octolens payload as-is.

Don't block triage if context gathering fails — always fall back to the Octolens payload.

### 2. Triage

Use the `draft-brand-reply` skill to triage the mention. Pass it the mention context from your prompt, plus any thread context gathered in Step 1.

The result should be one of:
- **Reply** — with a draft reply and a one-line justification
- **Like** — with a one-line justification
- **Note** — non-actionable but worth the team seeing (podcasts, YouTube videos, Hacker News threads, notable articles). One-line description of what it is and why it's noteworthy.
- **Skip** — with a one-line justification

### 3. Post to Slack

Use a Python script with `$BUZZ_SLACK_TOKEN` via `os.environ` — never echo, log, or hardcode it. Use `urllib` to call the Slack API (no external dependencies needed).

The target channel is `$FEED_MENTIONS_CHANNEL_ID` (the feed-mentions channel). Set `username` to `"New mention • Buzz"` and disable `unfurl_links` and `unfurl_media` on all messages — except the daily skip thread parent, which should use the default bot identity (no `username` override).

#### Reply, Like, or Note → top-level message

Post a single `chat.postMessage` combining the mention content with the triage result. Blocks top-to-bottom:

1. **Header** — `section` with mrkdwn. Title (bold, truncated ~200 chars) if present, author name (bold, linked to profile), follower count with ⭐ if ≥10k, subreddit link if Reddit, timestamp linked to the mention URL.
2. **Body** — `section` with the mention body blockquoted (`>` prefix), truncated to ~280 chars / 4 lines.
3. **Triage** — `section` with the recommendation:
   - Reply: `*Suggested reply* ✅` + justification
   - Like: `*Suggestion: like* ❤️` + justification
   - Note: `*FYI* 📌` + description of what it is and why it's noteworthy
4. **Draft** (reply only) — `rich_text` block with `rich_text_preformatted` element containing the draft text (gives a copy button on hover).
5. **Metadata** — `context` block: `sentiment • Relevance: <raw> • <tags> • <keywords>`. Filter out the `own_brand_mention` tag.

Capitalize platform names naturally (Twitter, Reddit, Bluesky, LinkedIn).

**Example blocks (reply suggestion on Twitter):**

```json
[
  {"type": "section", "text": {"type": "mrkdwn", "text": "<https://x.com/devuser|*@devuser*> (2,340 followers) \u2022 <https://x.com/devuser/status/1907456789012345678|Apr 2, 9:12 AM UTC \u2192>"}},
  {"type": "section", "text": {"type": "mrkdwn", "text": ">Really impressed with <BRAND>'s agent mode but the credit burn is brutal on long sessions."}},
  {"type": "section", "text": {"type": "mrkdwn", "text": "*Suggested reply* \u2705\nActive user with specific pricing pain point, good opportunity to share concrete cost-saving steps"}},
  {"type": "rich_text", "elements": [{"type": "rich_text_preformatted", "elements": [{"type": "text", "text": "The biggest lever is usually initial context size \u2014 check how much your agent context files and MCP calls are adding to each prompt. Also try the \"cost-efficient\" model preset."}]}]},
  {"type": "context", "elements": [{"type": "mrkdwn", "text": "negative  \u2022  Relevance: high  \u2022  user_feedback  \u2022  <brand>, agent mode"}]}
]
```

#### Skip → daily skip thread

Skipped mentions go to a shared daily thread instead of cluttering the main channel.

**Find or create today's skip thread:**
1. Compute today's date range in UTC: start of day (`00:00:00`) and end of day (`23:59:59`) as Unix timestamps.
2. Fetch `conversations.history` with `oldest` and `latest` set to today's range.
3. Find any message whose `text` contains `"Skipped mentions"`. Don't match on the date in the text — any message posted today with that substring is the right thread. Use the earliest match if multiple exist.
4. If found, use its `ts` as `thread_ts`.
5. If not found, create the thread parent by posting: `⏭️ Skipped mentions — Thu, Apr 2` (use today's day/date, plain text, no bold). Do NOT set the `username` override on this message — use the default bot identity.

**Post the skip as a thread reply** under that parent. Compact format:
1. **Header** — `section`: `*author* on Platform — <url|timestamp →>`
2. **Body** — `section`: blockquoted excerpt (~200 chars / 3 lines)
3. **Context** — `context`: `❌ reason • Relevance: <raw> • sentiment`

## Constraints

- Do NOT actually post the reply to Twitter/Reddit/etc. You are only posting a *suggestion* to Slack for a human to review and send.
- Do NOT fabricate product details, roadmap, or commitments in the draft — follow `draft-brand-reply` hard constraints.
- Do NOT include the Slack token in any output, log, or file.
- Keep it to one Slack message per mention. No follow-ups or threads of your own (except skip thread replies).

