Claude
Skills
Sign in
Back

social-intelligence

Included with Lifetime
$97 forever

Twitter/X social intelligence monitoring for the Claude Code ecosystem. Scans feeds from Anthropic/Claude Code team members, extracts actionable insights, tracks state, and produces reports. Uses claude-in-chrome MCP for browser automation.

AI Agentsscripts

What this skill does


# Social Intelligence

Monitor Twitter/X feeds from Anthropic and Claude Code team members to catch new features, updates, and insights before official documentation is updated.

## Subcommands

Parse the user's argument to determine the subcommand:

| Argument Pattern | Subcommand |
|-----------------|------------|
| `scan`, `scan --accounts critical`, `scan --depth deep` | [Scan Feeds](#scan-feeds) |
| `report`, `report --since 2026-02-01`, `report --save` | [Generate Report](#generate-report) |
| `apply` | [Apply Insights](#apply-insights) |
| `refresh-accounts` | [Refresh Accounts](#refresh-accounts) |
| `discover-accounts` | [Discover Accounts](#discover-accounts) |
| `status` | [Show Status](#show-status) |
| `migrate` | [Data Maintenance](#data-maintenance) |
| `compact` | [Data Maintenance](#data-maintenance) |
| (no argument) | Default to `scan --accounts critical --depth shallow` |

## Prerequisites

Before any operation, ensure the data directory is initialized:

```bash
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" init
```

## Scan Feeds

### Arguments

| Flag | Default | Options |
|------|---------|---------|
| `--accounts` | `critical` | `critical`, `high`, `all` |
| `--depth` | `shallow` | `shallow`, `deep` |

### Workflow

#### Step 1: Load Configuration

Read these config files:

- `plugins/claude-ecosystem/skills/social-intelligence/config/accounts.json` -- Monitored accounts
- `plugins/claude-ecosystem/skills/social-intelligence/config/scan-config.json` -- Scan parameters, keywords, area mappings

If `accounts.json` has an empty `accounts` array, prompt the user:

> No accounts configured. Run `/claude-ecosystem:social-intelligence refresh-accounts` first to populate the account list from your X following list.

#### Step 2: Filter Accounts by Priority

Based on `--accounts` flag:

- `critical`: Only accounts with `priority == "critical"`
- `high`: Accounts with `priority` in `["critical", "high"]`
- `all`: All accounts

#### Step 2.5: Check Account Freshness

For each filtered account, check when it was last scanned:

```bash
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" last-scanned "@handle"
```

If `last_scanned` is within the last 2 hours for shallow scans (or 30 minutes for deep scans), skip that account and note it in the summary. This prevents redundant scanning.

#### Step 3: Load claude-in-chrome MCP Tools

Before delegating to the scanner agent, load the required MCP tools:

```text
Use ToolSearch to load:
- mcp__claude-in-chrome__tabs_context_mcp
- mcp__claude-in-chrome__tabs_create_mcp
- mcp__claude-in-chrome__navigate
- mcp__claude-in-chrome__get_page_text
- mcp__claude-in-chrome__javascript_tool
- mcp__claude-in-chrome__read_page
```

#### Step 4: Delegate to x-feed-scanner Agent

Spawn the `claude-ecosystem:x-feed-scanner` agent (subagent_type: `general-purpose`) with:

```json
{
  "accounts": [filtered account list with profile URLs],
  "depth": "shallow|deep",
  "max_posts_per_account": 20,
  "max_scroll_attempts": 3,
  "navigation_delay_ms": 2500,
  "known_post_ids": [list from dedup-check-batch],
  "since_date": "ISO timestamp of oldest desired post"
}
```

**Important**: The agent must use the claude-in-chrome MCP tools to:

1. Call `tabs_context_mcp` to check browser state
2. Call `tabs_create_mcp` to open a dedicated scan tab
3. For each account: `navigate` to profile, wait, `get_page_text` to extract content
4. Use `javascript_tool` for scroll pagination and post ID extraction
5. Return structured post data

#### Step 5: Batch Dedup Against Existing Posts

Collect all post IDs from the scanner output and check them in a single pass:

```bash
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" dedup-check-batch post_id_1 post_id_2 post_id_3
```

The response includes `new_ids` (not yet stored) and `existing_ids` (already in index). Filter to new posts only.

#### Step 6: Delegate to intelligence-analyst Agent

Spawn the `claude-ecosystem:intelligence-analyst` agent (subagent_type: `general-purpose`) with:

- New posts (after dedup)
- Scan config (keywords, scoring weights, area mappings)

The agent classifies posts, scores relevance, extracts insights, and maps to plugin areas.

#### Step 7: Persist State

Write results using `state_manager.py append`:

```bash
# Log the scan run
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" append scan-log.jsonl '{"scan_id":"scan-YYYYMMDD-HHMMSS","timestamp":"...","accounts_scanned":N,...}'

# Write each analyzed post
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" append posts-index.jsonl '{"post_id":"...","author_handle":"...","text":"...","relevance_score":0.92,...}'

# Write each insight
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" append insights-log.jsonl '{"insight_id":"insight-{seq}","summary":"...","status":"pending_review",...}'
```

#### Step 8: Update Last Scanned Timestamps

For each successfully scanned account, update the last_scanned timestamp:

```bash
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" last-scanned "@handle" "2026-02-15T14:30:00Z"
```

#### Step 9: Present Summary

Display a concise summary to the user:

```markdown
## Scan Complete

**Accounts scanned:** 5 | **Posts found:** 47 | **New posts:** 8 | **Relevant:** 3

### Key Findings

1. [@borischerny] New hook event type announced (score: 0.92, feature_announcement)
   > "Just shipped support for a new SessionPause hook event..."
   [View on X](https://x.com/borischerny/status/1893456789012345678)

### Pending Insights (1)

- **insight-42**: New SessionPause hook event (confidence: 0.85)
  - Areas: hook-management, claude-code-observability
  - Action: Update hook documentation

Run `/claude-ecosystem:social-intelligence report` to see full details.
```

## Generate Report

### Arguments

| Flag | Default | Options |
|------|---------|---------|
| `--since` | (all time) | Any ISO date `YYYY-MM-DD` |
| `--status` | `all` | `pending`, `all`, `new`, `analyzed`, `actioned`, `dismissed` |
| `--format` | `markdown` | `markdown`, `json` |
| `--save` | (off) | When present, saves report to `.claude/social-intelligence/reports/` |

### Workflow

Run the report generator:

```bash
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/generate_report.py" --since "YYYY-MM-DD" --status "pending" --format markdown --save
```

Display the output directly to the user. If `--save` is used, confirm the saved file path.

## Apply Insights

Read pending insights, execute suggested actions, and update insight status.

### Workflow

#### Step 1: Read Pending Insights

```bash
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" read insights-log.jsonl --status pending_review
```

#### Step 2: Present to User

Display pending insights with their suggested actions and ask user to select which to apply.

#### Step 3: Execute Selected Actions

For each approved insight:

1. Execute the `action_suggested` (e.g., update documentation, create issue, modify skill)
2. Log the action to `actions-log.jsonl`:

```bash
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}" python "plugins/claude-ecosystem/skills/social-intelligence/scripts/state_manager.py" append actions-log.jsonl '{"action_id":"action-{seq}","insight_id":"...","action_type":"...","description":"...

Related in AI Agents