본문으로 건너뛰기
Skillpedia
자동화11k · #11817

hive.x-automation

하는 일

이 스킬은 AI에게 브라우저에서 X의 흔한 작업을 수행하는 검증된 단계를 알려 줍니다. 모든 것을 손으로 클릭하지 않고 게시, 답글, 검색에 도움을 받고 싶은 사람들을 위한 것입니다.

사용하는 경우

  • ✓브라우저를 통해 X에 게시물이나 답글을 보내고 싶을 때.
  • ✓X를 검색해서 결과에 답글을 달고 싶을 때.
  • ✓X에서 내가 쓴 게시물 하나를 삭제하고 싶은 경우.

스킬 링크

https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/x-automation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/x-automation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“X에서 AI 도구에 대한 게시물을 검색하고, 그중 가장 유용한 세 개에 답글을 달아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 브라우저를 사용하고, 스크린샷으로 알맞은 위치를 찾으며, X의 작성 상자에 입력합니다. 전송 버튼이 켜지지 않게 하는 문제를 알고 있어 그 문제를 우회합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

X / Twitter Automation

X uses Draft.js (the original Facebook rich-text editor) for the compose text area, which was the original canary for all the rich-text editor quirks the browser-automation skill now documents. Most of the site is otherwise stable — data-testid attributes have held up for years, the SPA is reasonably honest about what it renders, and shadow DOM is minimal. The hard parts are the composer, rate limiting, and the occasional anti-bot challenge.

Always activate browser-automation first. This skill assumes you already know about CSS-px coordinates, click-first typing, and Input.insertText. The guidance below is X-specific.

Timing expectations

  • browser_navigate(wait_until="load") returns in 1.3–1.6 s on a warm cache.
  • After navigation, sleep(2–3) for SPA hydration before querying selectors.
  • Compose modal slide-in: ~1.5 s after clicking reply / compose.
  • First 1–2 characters typed into the compose editor may be dropped — see "Draft.js quirks" below.

Verified selectors (2026-04-11)

Target Selector
Home nav link a[data-testid='AppTabBar_Home_Link']
Explore nav link a[data-testid='AppTabBar_Explore_Link']
Notifications a[data-testid='AppTabBar_Notifications_Link']
Main search input input[data-testid='SearchBox_Search_Input']
Compose text area [data-testid='tweetTextarea_0'] (Draft.js contenteditable)
Post / Tweet submit button [data-testid='tweetButton']
Reply button (on feed / tweet detail) [data-testid='reply']
Like button [data-testid='like']
Retweet / repost button [data-testid='retweet']
Caret (⋯) menu on a post [data-testid='caret']
Confirmation sheet confirm button [data-testid='confirmationSheetConfirm']
Tweet article wrapper article[data-testid='tweet']
Close modal / composer [aria-label='Close'] or press Escape

All of these are light-DOM data-testid attributes — wait_for_selector and browser_type(selector=...) work on them directly, no shadow piercing needed.

Post new tweet flow

browser_navigate("https://x.com/home", wait_until="load")
sleep(3)

# Open the compose UI (click the post-new-tweet nav or use shortcut N)
browser_press("n")   # keyboard shortcut — opens compose modal
sleep(1.5)

# Click the textarea to make sure Draft.js is in edit mode
ta_rect = browser_get_rect("[data-testid='tweetTextarea_0']")
browser_click_coordinate(ta_rect.cx, ta_rect.cy)
sleep(0.5)

# Type — browser_type handles Draft.js correctly now via Input.insertText
browser_type("[data-testid='tweetTextarea_0']", tweet_text)
sleep(1.0)  # let Draft.js commit state

# Verify the Post button is enabled — never click blindly, Draft.js sometimes
# doesn't register the input even with a prior click.
state = browser_evaluate("""
  (function(){
    const btn = document.querySelector('[data-testid="tweetButton"]');
    if (!btn) return {found: false};
    return {
      found: true,
      disabled: btn.disabled || btn.getAttribute('aria-disabled') === 'true',
    };
  })();
""")
if state['found'] and not state['disabled']:
    browser_click("[data-testid='tweetButton']")
    sleep(2)
    browser_press("Escape")  # close any leftover modal

Posting a tweet WITH an image

Critical: NEVER click the photo button. On x.com/compose/post the media button is a styled <button> that triggers Chrome's native OS file picker when clicked — that dialog is unreachable via CDP and will wedge the automation. Instead, set the file directly on the hidden <input type='file'> element using browser_upload:

# 1. Open the compose modal as usual
browser_press("n")
sleep(1.5)
browser_click_coordinate(ta_rect.cx, ta_rect.cy)
sleep(0.5)
browser_type("[data-testid='tweetTextarea_0']", tweet_text)

# 2. Find the hidden file input X uses for media uploads.
#    X's input is marked with data-testid='fileInput' and accepts
#    image/*,video/*. It's hidden (display:none) but still mounted.
inputs = browser_evaluate("""
  (function(){
    return Array.from(document.querySelectorAll('input[type="file"]'))
      .map(el => ({
        testid: el.getAttribute('data-testid') || '',
        accept: el.accept || '',
        multiple: el.multiple,
      }));
  })();
""")
# Expect to see: [{testid: 'fileInput', accept: 'image/jpeg,...', multiple: true}]

# 3. Set the file WITHOUT opening any dialog
browser_upload(
    selector="input[data-testid='fileI
자주 묻는 질문

전송 버튼이 왜 가끔 꺼져 있나요?

X의 텍스트 편집기는 일부 입력을 조용히 무시할 수 있어서, 스킬은 전송 버튼이 켜지도록 입력하는 방법을 설명합니다.

X는 이 작업의 빈도를 제한하나요?

요청 제한과 가끔 나오는 확인 절차가 있을 수 있다고 스킬이 알려 주며, 그 범위 안에서 작업합니다.

어떤 X 페이지를 다루나요?

홈, 검색, 작성, 알림 같은 주요 페이지를 다루며, 선택자는 2026년 4월에 확인되었습니다.

상세 정보

작성자의 원본 설명

Read before automating X / Twitter with browser_* tools. Verified flows for post, reply, delete, search-and-engage, plus the Draft.js compose quirks that silently disable the send button. Includes the daily-reply and job-market-reply playbooks. Requires hive.browser-automation for the underlying screenshot + coordinate workflow. Verified 2026-04-11.

repo: aden-hive/hive

인기도

GitHub 스타
11k
순위
#11817
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬