x-dm-auto-chat
できること
Xのダイレクトメッセージを、受信トレイの確認から返信の送信まで管理します。一貫したトーンでDMに返信したい人や、選んだ相手と新しいチャットを始めたい人向けです。
使う場面
- ✓未読のXのダイレクトメッセージに返信が必要なとき。
- ✓返信を、ブランドの決まったトーンと目的に合わせたいとき。
- ✓選んだ相手とXで新しい会話を始めたいとき。
スキルのリンク
https://github.com/browser-act/skills/blob/main/solutions/social-listening/x-dm-auto-chat/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Xの受信トレイで未読のメッセージを確認して、各チャットを読み、ブランドの声に合った親しみのある返信を送ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、Xのメッセージを開き、返信が必要なチャットを見つけて履歴を読みます。設定したペルソナで返信を送り、レート制限と許可のフィルターを適用します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
X (Twitter) — DM Auto Chat (End-to-End)
Full X DM automation Skill: inbox scan → conversation read → persona-based reply → send; also supports search-and-outreach. The calling Agent generates reply text based on persona; this Skill handles all mechanical operations.
Language
All process output to user (progress updates, process notifications) follows the user's language.
Objective
Encapsulate "refresh DM list → identify pending replies → read context → reply with persona → send" and "search user → enter chat → send first message" into callable end-to-end capabilities.
Prerequisites
- Browser is open at X site, logged into X account (
[aria-label="Account menu"]present) - The 4-digit DM passcode for the current account is available (required for E2E encryption)
- Caller has prepared a "persona description" (used to generate replies), e.g.:
"You are BrowserAct outreach team. Tone: friendly, concise, professional. Goal: invite creators to collaborate."
- Optional: list of target user search queries (for outreach scenario)
Pre-execution Checks
1. Tool Readiness
If browser-act has been confirmed available in the current session → skip.
Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.
2. Open DM Entry + Comprehensive State Check
browser-act --session <name> navigate https://x.com/i/chat
browser-act --session <name> wait stable --timeout 15000
browser-act --session <name> eval "$(python scripts/check-page-state.py)"
Return format:
{
"url": "https://x.com/i/chat/pin/recovery?from=%2Fi%2Fchat",
"logged_in": true,
"need_passcode": true,
"on_inbox": false,
"on_conversation": false,
"has_panel": false,
"has_composer": false,
"inbox_count": 0
}
Decision matrix:
logged_in: false→ inform user to log in first; wait; retry this stepneed_passcode: true→ proceed to step 3 belowon_inbox: trueandinbox_count > 0→ ready, enter business flowon_inbox: truebutinbox_count === 0→ account has no DM conversations; outreach scenario can still proceed, pending-reply scenario has nothing to do
3. DM Passcode Unlock (when need_passcode is true)
- If caller has provided passcode in advance → use it directly; otherwise ask user for 4-digit DM passcode via AskUserQuestion tool (do not use plain text prompt — must call AskUserQuestion)
browser-act --session <name> state— find indexes of 4<input maxlength=1 pattern=[0-9]*>elements (usually 4 consecutive)- Enter each digit:
browser-act --session <name> input <idx1> "<d1>",<idx2> "<d2>",<idx3> "<d3>",<idx4> "<d4>"- Must use
browser-act input(CDP real keyboard events), cannot use eval to set value — X ignores non-real keyboard input
- Must use
browser-act --session <name> wait stable --timeout 10000- Re-run
check-page-state.py, confirmneed_passcode: falseandon_inbox: true - 3 consecutive failures still showing
need_passcode: true→ inform user passcode may be wrong; terminate
Business Flows
Choose Scenario A, Scenario B, or both. Each scenario is an ordered AI Workflow (not a single JS).
Scenario A: Scan unread DMs → Persona-based reply
Flow: Scan inbox → Filter unread & latest peer messages → Per-conversation: read context → Generate reply with persona → Send → Next
Steps:
Scan inbox:
browser-act --session <name> eval "$(python scripts/scan-inbox-merged.py)"Returns
items[], each containingconversation_id/conversation_url/peer_screen_name/peer_display_name/peer_can_dm/latest_message_preview/latest_message_from_self/unread, etc.Filter pending-reply conversations: from
items, select conversations meeting all conditions:unread === true(has unread) orlatest_message_from_self === false(peer's latest message not yet replied)peer_can_dm === true(recipient allows DM)is_muted !== trueandis_deleted_by_viewer !== true- Optional caller filters: only reply to specific screen_names, exclude already-replied (use external JSONL ledger)
For each pending-reply conversation (strictly serial, random
sleep 8-15seconds between each):a. Open conversation:
browser-act --session <name> navigate https://x.com<conversation_url> browser-act --session <name> wait stable --timeout 15000b
よくある質問
Xのパスコードが必要ですか?
はい。説明では、暗号化されたメッセージのために、アカウントの4桁のDMパスコードが必要とされています。
まだ連絡のない相手にメッセージを送れますか?
新しい会話を始めることはできますが、許可のフィルターがあり、誰に連絡するかをユーザーが管理できます。
返信は誰が書きますか?
設定したペルソナに基づいて、エージェントが返信の文章を書きます。スキルは送信の手順を担当します。
詳細
作者による元の説明
X (Twitter) DM automated chat end-to-end Skill: scan DM inbox to identify pending-reply conversations, read message history, generate persona-based replies and send; also supports searching users and starting new conversations. Built-in E2E passcode unlock, DM permission filtering, and rate control. Use when user mentions X auto-reply DMs, Twitter DM automated chat, auto-handle unread DMs, reply to X private messages with persona, X DM outreach campaign, batch send DMs to Twitter users, auto-process pending DM replies, Twitter DM bot, automated Twitter outreach, X direct message automation.
repo: browser-act/skills
人気
- GitHubのスター
- 6.3k
- ランキング
- #14317
- ライセンス
- MIT
- 更新日
- 2026/8/24
コメント
- …
このリポジトリの他のスキル
browser-act-skill-forge
6.3k一度サイトを調べて、スクリプト付きの再利用できるスキルを保存するのを支援します。そのサイトからのデータ取得が次回から速くなります。
browser-act
6.3kブラウザー自動化ツールで、ページを開いて内容を読んだり、フォーム入力、スクリーンショット、ログイン状態の維持を行えるよう支援します。
1688-product-detail
6.3k1688.comの卸売ページから、価格帯、バリエーション、販売者の評価、属性などの商品詳細を取得するのを支援します。
airbnb-listing-detail
6.3kAirbnbの掲載IDから、写真、設備、評価、宿泊ルールなど、公開されている詳細情報を取得するのを支援します。
似ているスキル
xurl
394k認証済みのxurlツールを使い、Xに投稿、返信、検索、閲覧し、ダイレクトメッセージを送り、メディアをアップロードするようエージェントを支援します。
connections-optimizer
280kソーシャルネットワークのつながりを改善します。フォローやフォロー解除の候補を提案し、パーソナライズされたメッセージの作成を支援して、ネットワークを広げます。
content-engine
280kさまざまなプラットフォーム向けのコンテンツを作成します。X、LinkedIn、YouTubeなどのネットワークで効果的な投稿、台本、コンテンツカレンダーの作成を支援します。