hive.linkedin-automation
できること
このスキルは、AIがあなたのブラウザで、よくあるLinkedInのタスクを行うためのテスト済みの手順を与えます。メッセージ、つながりのリクエスト、投稿の作業を、すべて手でクリックせずに手伝ってほしい人向けです。
使う場面
- ✓LinkedInの連絡先にメッセージを送らせたいとき。
- ✓保留中のLinkedInのつながりのリクエストを確認したいとき。
- ✓ブラウザを通じて、LinkedInで投稿を書いて公開したいとき。
スキルのリンク
https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/linkedin-automation/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私の保留中のLinkedInのつながりのリクエストを確認し、誰が待っているかを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIは、スクリーンショットを撮り、その位置からクリックする場所を選び、フォーカスされた入力欄に入力します。LinkedInのレイアウトは頻繁に変わり、欄が隠れることもあるため、既知の回避策を使います。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
LinkedIn Automation
LinkedIn is the hardest mainstream site to automate because it combines shadow DOM (#interop-outlet for messaging), strict Trusted Types CSP (silently drops innerHTML), heavy React reconciliation (injected nodes get stripped on re-render), native beforeunload draft dialogs (hang the bridge), and aggressive spam filters. Every one of those has bit us at least once. This skill documents what actually works.
Always activate browser-automation first. This skill assumes you already know about CSS-px coordinates, browser_type/browser_type_focused, and browser_shadow_query. The guidance below is LinkedIn-specific; general browser rules are there.
Rule #0: screenshot + coordinates, not selectors
LinkedIn changes class names aggressively and hides composers inside shadow roots AND iframes. Selectors break constantly. Your default strategy on every LinkedIn page should be:
browser_screenshot()— see the page visually- Pick the target's position from the image
browser_coords(image_x, image_y)→ get CSS pixelsbrowser_click_coordinate(css_x, css_y)— reaches shadow DOM, iframes, and React elements indifferentlybrowser_type(use_insert_text=True, text=...)— types into whatever is focused, including Lexical composers
If browser_evaluate(...querySelectorAll...) returns [] even once, do not try a different selector. Stop, screenshot, and click. The "what if I try .artdeco-list__item next" instinct has burned ~50 tool calls in real sessions before the agent pivoted. Don't fall into that loop.
The selectors in the table below are only for when you already know the target is in the light DOM and you want a faster path than screenshot+coord. When in doubt, default to coordinates.
Invitation manager — inline message button path is BROKEN
If the user asks to message a connection request from the invitation manager page without accepting first, the inline "Message" button opens a composer inside a nested iframe overlay (not a shadow root). The iframe's contentDocument is either cross-origin-blocked or not hydrated at access time. This path is not reliably automatable today.
Redirect: click the person's name/profile link on the card, go to the profile page, and use the standard Profile Message flow below. The profile flow is battle-tested; the inline-iframe flow isn't.
If you end up writing document.activeElement.tagName === 'IFRAME' inside a browser_evaluate, you've hit this trap. Stop and go to the profile page.
Timing expectations
browser_navigate(wait_until="load")— LinkedIn takes 4–5 seconds to load the feed cold.- After navigation, always
sleep(3)to let React hydrate the profile/feed chrome before querying selectors. Without the sleepwait_for_selectorwill flake on elements that exist moments later. - Composer modal slide-in takes ~2 seconds after you click the Message button.
Verified selectors
| Target | Selector | Notes |
|---|---|---|
| Global search input | input[data-testid='typeahead-input'] |
Light DOM, straightforward |
| Own profile link | a[href*='linkedin.com/in/'] |
Top nav; filter to the one near top-left |
| Profile Message action | a[href*='/messaging/compose/'] filtered by NON_SELF_PROFILE_VIEW AND no body= param AND x < 700 |
Is an <a>, not a <button>. Multiple match; filter carefully. |
| Modal composer textarea | div.msg-form__contenteditable (inside #interop-outlet shadow) |
Multiple instances exist — pick largest-area in-viewport one. |
| Modal Send button | button.msg-form__send-button (inside #interop-outlet shadow) |
Same multi-instance trap — filter by y + height <= innerHeight. |
| Invitation manager | navigate to https://www.linkedin.com/mynetwork/invitation-manager/received/ |
Direct URL is faster than nav-link clicking |
| Pending connection card | .invitation-card, .invitations-card, [data-test-incoming-invitation-card] |
Filter out "invited you to follow" / "subscribe" cards |
| Accept button | button[aria-label*="Accept"] within the card scope |
Per-card scoping is critical — there are many Accept buttons on the page |
LinkedIn changes class names aggressively. If a class-based selector breaks, fall back to browser_screenshot → visual identification → browser_click_coordinate with the pixel you read straight off the image (screenshots are CSS-sized, no conversion). The sc
よくある質問
なぜAIはページのセレクターではなくスクリーンショットを使うのですか?
LinkedInはレイアウトをよく変え、欄を隠すので、スクリーンショットの位置に基づくクリックのほうが確実です。
どのLinkedInのタスクが扱われますか?
プロフィールへのメッセージ、つながりのリクエストの承認、フィードの投稿、検索を扱います。
どんな厄介な点を扱いますか?
隠れたページの部分、厳格なスクリプトのルール、入力した文字を消してしまう編集欄、予期しないブラウザのダイアログを扱います。
詳細
作者による元の説明
Read before automating LinkedIn with browser_* tools. LinkedIn combines shadow DOM (#interop-outlet), strict Trusted Types CSP that silently drops innerHTML, Lexical composer, native beforeunload dialogs that hang the bridge, and aggressive spam filters — each has bitten us at least once. Verified flows for profile messaging, connection-request acceptance, feed composition, and search. Requires hive.browser-automation. Verified against logged-in production 2026-04-11.
repo: aden-hive/hive
人気
- GitHubのスター
- 11k
- ランキング
- #11811
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
browser-edge-cases
11kエージェントが、LinkedIn、X、スクリプトの多いページなど、扱いの難しいサイトでブラウザ自動化が失敗する原因を直せるよう支援します。
hive.browser-automation
11kエージェントが、hive-browserツールを使い、スクリーンショットとクリックで、自分のChromeブラウザを操作できるよう支援します。
hive.colony-progress-tracker
11kエージェントが、タスクを確保し、その手順と確認を共有データベースに記録できるよう支援します。作業が進むにつれて追跡されます。
hive.context-preservation
11kエージェントが、長いツールの結果から重要な事実を、メモとして保存し、古い詳細がメモリから消される前に残せるよう支援します。