From x-manager
X(Twitter)投稿パフォーマンスの日次レポートを生成するスキル。 Supabaseのx_*テーブルからデータを取得し、Winner/Watch分類・伸びパターン分析・投稿方針提案を行い、Markdownレポートを出力する。 「X日次レポート」「Xのパフォーマンス」「ツイート分析」「投稿の伸び確認」「x-daily-report」などのリクエストで発動。
How this skill is triggered — by the user, by Claude, or both
Slash command
/x-manager:x-daily-reportThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Supabaseのx_*テーブルからデータを取得し、投稿パフォーマンスを分析してレポートを生成する。
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 になる以上で完了。 メインエージェントは分析やレポート内容の要約を行わない。
npx claudepluginhub iketomo/cowork_x_plugin --plugin x-managerProvides JavaScript scripts for browser console to analyze X/Twitter engagement, best posting times, hashtags, competitors, follower demographics, tweet performance, viral detection, and A/B testing. Use for optimizing X account performance.
Provides X (Twitter) growth playbook: 3-4 posts/day minimum, 10 comments/day on leaders, visuals, communities, authenticity, world affairs. For engagement and audience planning.
Scores X/Twitter posts for viral potential using a 19-element heuristic system based on X's published recommendation architecture. Rewrites drafts to improve algorithmic reach and debugs underperforming tweets.