From x-manager
X(Twitter)に投稿または下書き保存するスキル。x-writingスキル等で作成した投稿文を、API経由で投稿するか、Chrome MCP経由でXの下書きに保存する。「Xに投稿して」「ツイートして」「下書きにして」「Xの下書きに保存」「x-post」などのリクエストで発動。
How this skill is triggered — by the user, by Claude, or both
Slash command
/x-manager:x-postThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
投稿文(+ 任意で画像URL)を、X(Twitter)に投稿または下書き保存するスキル。
投稿文(+ 任意で画像URL)を、X(Twitter)に投稿または下書き保存するスキル。
x-post-tweet をpg_net経由で呼び出して即時投稿x-post-tweet がデプロイ済み(v11以降)X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRETユーザーの指示から投稿モードか下書きモードかを判定する:
| ユーザーの表現 | モード |
|---|---|
| 「投稿して」「ポストして」「ツイートして」 | 投稿モード |
| 「下書きにして」「下書き保存」「ドラフトにして」 | 下書きモード |
| 「x-post」(引数なし) | ユーザーに確認 |
判断がつかない場合は「投稿しますか?それとも下書きに保存しますか?」と確認する。
ユーザーから投稿文と(任意で)画像URLを受け取る:
image_url を画像として使用投稿前に必ずユーザーに最終確認を行う:
📝 以下の内容でXに投稿します:
---
{投稿文テキスト}
---
文字数: {文字数}文字
画像: {image_urlがあれば "あり({URL})" / なければ "なし"}
投稿してよろしいですか?
ユーザーの明示的な承認なしに絶対に投稿しない。
ユーザーの承認後、Supabase MCPの execute_sql で pg_net を使ってEdge Functionを呼び出す。
SELECT net.http_post(
url := '{EDGE_FUNCTION_URL}/x-post-tweet',
headers := '{"Content-Type": "application/json", "Authorization": "Bearer {ANON_KEY}"}'::jsonb,
body := '{"text": "投稿テキスト"}'::jsonb
) AS request_id;
SELECT net.http_post(
url := '{EDGE_FUNCTION_URL}/x-post-tweet',
headers := '{"Content-Type": "application/json", "Authorization": "Bearer {ANON_KEY}"}'::jsonb,
body := '{"text": "投稿テキスト", "image_url": "https://...supabase.co/storage/v1/object/public/x-images/..."}'::jsonb,
timeout_milliseconds := 30000
) AS request_id;
EDGE_FUNCTION_URL と ANON_KEY は config.local.md から取得timeout_milliseconds := 30000 を指定リクエスト送信後、5秒程度待ってから確認:
SELECT id, status_code, content::text, timed_out
FROM net._http_response
WHERE id = {リクエストID};
成功時(status_code=200, success=true):
✅ Xに投稿しました!
🔗 {投稿URL}
🖼 画像: あり / なし
失敗時:
❌ 投稿に失敗しました
エラー: {エラー内容}
tabs_context_mcp でChrome拡張の接続を確認する。
createIfEmpty: true でタブグループを作成navigate → https://x.com/compose/post
type アクションで投稿文テキストを入力× ボタンをクリック(座標はスクリーンショットで確認)✅ Xの下書きに保存しました!
X.com → 下書き から編集・投稿できます。
⚠️ 画像はX画面から手動で添付してください。
POST {EDGE_FUNCTION_URL}/x-post-tweet
{
"text": "投稿テキスト",
"image_url": "https://...supabase.co/storage/v1/object/public/x-images/...png"
}
text: 必須image_url: 任意。公開アクセス可能なURL。Supabase Storage public URLが推奨。image_url の画像をダウンロードPOST https://upload.twitter.com/1.1/media/upload.json に multipart/form-data でアップロードmedia_id_string を media: { media_ids: [id] } として X API v2 に渡して投稿{
"success": true,
"tweet_id": "1234567890",
"url": "https://x.com/iketomo2/status/1234567890",
"text": "投稿テキスト",
"char_count": 10,
"has_image": true,
"media_ids": ["9876543210"]
}
画像付き投稿の典型フロー:
image_url を取得text + image_url を渡して投稿確認 → 投稿実行下書き保存フロー:
npx claudepluginhub iketomo/cowork_x_plugin --plugin x-managerPublishes articles to X/Twitter. Useful when you need to automate or assist with posting content to the platform.
Posts text, images, videos, and long-form Markdown articles to X (Twitter) via Chrome browser automation. Handles regular posts, videos, quote tweets, and articles.
Posts text, images, and videos to X (Twitter) from the command line using a Python CLI script with OAuth credentials. Supports chunked video uploads and requires user confirmation before posting.