X(Twitter)投稿パフォーマンスの日次レポートを生成するスキル。 Supabaseのx_*テーブルからデータを取得し、Winner/Watch分類・伸びパターン分析・投稿方針提案を行い、Markdownレポートを出力する。 「X日次レポート」「Xのパフォーマンス」「ツイート分析」「投稿の伸び確認」「x-daily-report」などのリクエストで発動。
From x-managernpx claudepluginhub iketomo/cowork_x_plugin --plugin x-managerThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
Supabaseのx_*テーブルからデータを取得し、投稿パフォーマンスを分析してレポートを生成する。 フォロワー数の日次推移も取得し、増減要因の考察を含める。
config.local.md の Supabase 設定を参照execute_sql を使用してデータ取得メインエージェントの役割は最小限にする。
| 担当 | 処理内容 |
|---|---|
| メインエージェント | SQL実行 → サブエージェント起動 → 完了報告 |
| サブエージェント(x-daily-analyzer) | 分類・分析・ニュース検索・DB保存・レポートファイル出力 すべて |
メインエージェントは SQL結果をそのままサブエージェントに渡し、返り値のファイルパスだけ受け取る。分析・レポート生成には一切関与しない。
以下の2つのSQLを execute_sql で並列実行する。
WITH latest AS (
SELECT DISTINCT ON (tweet_id) tweet_id, date, like_count, repost_count, reply_count, quote_count, impression_count
FROM x_tweet_metrics_daily
ORDER BY tweet_id, date DESC
),
three_days_ago AS (
SELECT DISTINCT ON (tweet_id) tweet_id, like_count, repost_count, reply_count, quote_count, impression_count
FROM x_tweet_metrics_daily
WHERE date <= CURRENT_DATE - 3
ORDER BY tweet_id, date DESC
),
yesterday AS (
SELECT DISTINCT ON (tweet_id) tweet_id, like_count, repost_count, reply_count, quote_count, impression_count
FROM x_tweet_metrics_daily
WHERE date <= CURRENT_DATE - 1
ORDER BY tweet_id, date DESC
),
scored AS (
SELECT
t.tweet_id,
LEFT(t.text, 60) as text_short,
t.url,
t.created_at::date as created_date,
l.like_count as cur_likes,
l.repost_count as cur_reposts,
l.quote_count as cur_quotes,
COALESCE(l.like_count - w.like_count, l.like_count) as d3_likes,
COALESCE(l.repost_count - w.repost_count, l.repost_count) as d3_reposts,
COALESCE(l.quote_count - w.quote_count, l.quote_count) as d3_quotes,
COALESCE(l.like_count - y.like_count, 0) as d24h_likes,
COALESCE(l.repost_count - y.repost_count, 0) as d24h_reposts,
COALESCE(l.like_count - w.like_count, l.like_count)
+ COALESCE(l.repost_count - w.repost_count, l.repost_count) * 3
+ COALESCE(l.quote_count - w.quote_count, l.quote_count) * 5
as score_3d
FROM x_tweets t
JOIN latest l ON l.tweet_id = t.tweet_id
LEFT JOIN three_days_ago w ON w.tweet_id = t.tweet_id
LEFT JOIN yesterday y ON y.tweet_id = t.tweet_id
WHERE t.is_tracking = true
),
counts AS (
SELECT COUNT(*) as total_tracked FROM x_tweets WHERE is_tracking = true
)
SELECT s.*, c.total_tracked
FROM scored s, counts c
WHERE s.score_3d > 0 OR s.d24h_likes > 0
ORDER BY s.score_3d DESC
LIMIT 20;
SELECT date, follower_count, following_count, diff_from_prev
FROM x_follower_daily
ORDER BY date DESC
LIMIT 14;
SQL結果を受け取ったら、すぐにTaskツールでサブエージェント x-daily-analyzer を起動する。メインエージェントでの分析は一切行わない。
Taskツールの呼び出し:
subagent_type: "general-purpose"model: "sonnet"description: "X daily report generation"promptに含める内容:
サブエージェントの返答から REPORT_PATH= で始まる行を探し、そのパスを取得する。
/mnt/c/Users/tomoh/Dropbox/Cursor/cowork/cowork_plugin/x-manager/log/x-daily-report_YYYY-MM-DD.md になる以上で完了。 メインエージェントは分析やレポート内容の要約を行わない。