Skip to content

domain-skills(x): add logged-in X web-search workflow#442

Open
janzheng wants to merge 1 commit into
browser-use:mainfrom
janzheng:domain-skills/x-search
Open

domain-skills(x): add logged-in X web-search workflow#442
janzheng wants to merge 1 commit into
browser-use:mainfrom
janzheng:domain-skills/x-search

Conversation

@janzheng

@janzheng janzheng commented Jun 13, 2026

Copy link
Copy Markdown

Adds domain-skills/x/search.md — a workflow for driving the user's logged-in Chrome at x.com/search to read results with the full advanced-search operator set, reaching past the public API's ~7-day recent-search ceiling.

There was no x/twitter domain skill before, so the next harness run on X starts ahead.

Captures:

  • URL pattern (?q=...&f=live|top) and the advanced-search operator table (since:/until: for any date window, min_faves:, from:, filter:, lang:, boolean groups).
  • Login-wall STOP rule — detect /login redirect and stop, never type credentials.
  • Scroll-while-extract guidance for X's virtualized timeline (it recycles off-screen DOM nodes).
  • Stable selectors, and the aria-label exact-count trick — visible engagement numbers are truncated ("1.2K") but [role=group][aria-label] carries the exact integers.
  • A js() extractor that emits the universal SourceItem shape directly, a full capture snippet, and a traps list.

🤖 Generated with Claude Code


Summary by cubic

Add a logged-in X (Twitter) web-search workflow that uses advanced operators and reaches beyond the public API’s ~7‑day window. Includes a robust extractor and guidance for virtualized lists and auth walls.

  • New Features
    • Adds domain-skills/x/search.md to drive x.com/search (?q=...&f=live|top) using the logged-in session.
    • Enables full advanced operators in q (since:/until:, min_faves:, from:, filter:, lang:, boolean).
    • Handles auth via a login-wall STOP rule; never types credentials.
    • Provides scroll-while-extract guidance, stable selectors, aria-label exact counts, and a js() extractor + capture snippet.

Written for commit d0c35f1. Summary will update on new commits.

Review in cubic

Drive the user's logged-in Chrome at x.com/search to read results with the
full advanced-search operator set (since:/until: for any date window,
min_faves:, from:, filter:, lang:, boolean groups) — reaching past the
public API's ~7-day recent-search ceiling. Captures URL pattern, the
operator table, login-wall STOP rule, scroll-while-extract guidance for
the virtualized timeline, stable selectors, the aria-label exact-count
trick (visible counts are truncated), a SourceItem-emitting js() extractor,
a full capture snippet, and a traps list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@browser-harness-review

Copy link
Copy Markdown

✅ Skill review passed

Reviewed 1 file(s) — no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="domain-skills/x/search.md">

<violation number="1" location="domain-skills/x/search.md:80">
P1: Extractor drops media-only tweets by requiring non-empty `tweetText`, breaking `filter:media`/`filter:videos` captures</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread domain-skills/x/search.md
for (const art of document.querySelectorAll('article[data-testid="tweet"]')) {
const textEl = art.querySelector('[data-testid="tweetText"]');
const text = textEl ? textEl.innerText.trim() : "";
if (!text) continue;

@cubic-dev-ai cubic-dev-ai Bot Jun 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Extractor drops media-only tweets by requiring non-empty tweetText, breaking filter:media/filter:videos captures

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At domain-skills/x/search.md, line 80:

<comment>Extractor drops media-only tweets by requiring non-empty `tweetText`, breaking `filter:media`/`filter:videos` captures</comment>

<file context>
@@ -0,0 +1,145 @@
+  for (const art of document.querySelectorAll('article[data-testid="tweet"]')) {
+    const textEl = art.querySelector('[data-testid="tweetText"]');
+    const text = textEl ? textEl.innerText.trim() : "";
+    if (!text) continue;
+    const timeEl = art.querySelector('a[href*="/status/"] time');
+    const a = timeEl && timeEl.closest('a[href*="/status/"]');
</file context>
Fix with cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant