{
  "schemaVersion": "1.0",
  "item": {
    "slug": "xint",
    "name": "Xint",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/0xNyk/xint",
    "canonicalUrl": "https://clawhub.ai/0xNyk/xint",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/xint",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=xint",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      ".changeset/README.md",
      ".changeset/config.json",
      ".github/ISSUE_TEMPLATE.md",
      ".github/PULL_REQUEST_TEMPLATE/pull_request_template.md",
      ".github/release-drafter/config.yml",
      ".github/release.yml"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/xint"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/xint",
    "agentPageUrl": "https://openagent3.xyz/skills/xint/agent",
    "manifestUrl": "https://openagent3.xyz/skills/xint/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/xint/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "xint — X Intelligence CLI",
        "body": "General-purpose agentic research over X/Twitter. Decompose any research question into targeted searches, iteratively refine, follow threads, deep-dive linked content, and synthesize into a sourced briefing.\n\nFor X API details (endpoints, operators, response format): read references/x-api.md."
      },
      {
        "title": "Security Considerations",
        "body": "This skill requires sensitive credentials. Follow these guidelines:"
      },
      {
        "title": "Credentials",
        "body": "X_BEARER_TOKEN: Required for X API. Treat as a secret - prefer exported environment variables (optional project-local .env)\nXAI_API_KEY: Optional, needed for AI analysis. Also a secret\nX_CLIENT_ID: Optional, needed for OAuth. Less sensitive but don't expose publicly\nXAI_MANAGEMENT_API_KEY: Optional, for collections management"
      },
      {
        "title": "File Writes",
        "body": "This skill writes to its own data/ directory: cache, exports, snapshots, OAuth tokens\nOAuth tokens stored with restrictive permissions (chmod 600)\nReview exported data before sharing - may contain sensitive search queries"
      },
      {
        "title": "Webhooks",
        "body": "watch and stream can send data to webhook endpoints\nRemote endpoints must use https:// (http:// is accepted only for localhost/loopback)\nOptional host allowlist: XINT_WEBHOOK_ALLOWED_HOSTS=hooks.example.com,*.internal.example\nAvoid sending sensitive search queries or token-bearing URLs to third-party destinations"
      },
      {
        "title": "Runtime Notes",
        "body": "This file documents usage and safety controls for the CLI only.\nNetwork listeners are opt-in (mcp --sse) and disabled by default\nWebhook delivery is opt-in (--webhook) and disabled by default"
      },
      {
        "title": "Installation",
        "body": "For Bun: prefer OS package managers over curl | bash when possible\nVerify any installer scripts before running"
      },
      {
        "title": "MCP Server (Optional)",
        "body": "bun run xint.ts mcp starts a local MCP server exposing xint commands as tools\nDefault mode is stdio/local integration; no inbound web server unless --sse is explicitly enabled\nRespect --policy read_only|engagement|moderation and budget guardrails"
      },
      {
        "title": "CLI Tool",
        "body": "All commands run from the project directory:\n\n# Set your environment variables\nexport X_BEARER_TOKEN=\"your-token\""
      },
      {
        "title": "Search",
        "body": "bun run xint.ts search \"<query>\" [options]\n\nOptions:\n\n--sort likes|impressions|retweets|recent — sort order (default: likes)\n--since 1h|3h|12h|1d|7d — time filter (default: last 7 days). Also accepts minutes (30m) or ISO timestamps.\n--min-likes N — filter by minimum likes\n--min-impressions N — filter by minimum impressions\n--pages N — pages to fetch, 1-5 (default: 1, 100 tweets/page)\n--limit N — max results to display (default: 15)\n--quick — quick mode: 1 page, max 10 results, auto noise filter, 1hr cache, cost summary\n--from <username> — shorthand for from:username in query\n--quality — filter low-engagement tweets (>=10 likes, post-hoc)\n--no-replies — exclude replies\n--sentiment — AI-powered per-tweet sentiment analysis (via Grok). Shows positive/negative/neutral/mixed with scores.\n--save — save results to data/exports/\n--json — raw JSON output\n--jsonl — one JSON object per line (optimized for Unix pipes: | jq, | tee)\n--csv — CSV output for spreadsheet analysis\n--markdown — markdown output for research docs\n\nAuto-adds -is:retweet unless query already includes it. All searches display estimated API cost.\n\nExamples:\n\nbun run xint.ts search \"AI agents\" --sort likes --limit 10\nbun run xint.ts search \"from:elonmusk\" --sort recent\nbun run xint.ts search \"(opus 4.6 OR claude) trading\" --pages 2 --save\nbun run xint.ts search \"$BTC (revenue OR fees)\" --min-likes 5\nbun run xint.ts search \"AI agents\" --quick\nbun run xint.ts search \"AI agents\" --quality --quick\nbun run xint.ts search \"solana memecoins\" --sentiment --limit 20\nbun run xint.ts search \"startup funding\" --csv > funding.csv\nbun run xint.ts search \"AI\" --jsonl | jq 'select(.metrics.likes > 100)'"
      },
      {
        "title": "Profile",
        "body": "bun run xint.ts profile <username> [--count N] [--replies] [--json]\n\nFetches recent tweets from a specific user (excludes replies by default)."
      },
      {
        "title": "Thread",
        "body": "bun run xint.ts thread <tweet_id> [--pages N]\n\nFetches full conversation thread by root tweet ID."
      },
      {
        "title": "Single Tweet",
        "body": "bun run xint.ts tweet <tweet_id> [--json]"
      },
      {
        "title": "Article (Full Content Fetcher)",
        "body": "bun run xint.ts article <url> [--json] [--full] [--ai <text>]\n\nFetches and extracts full article content from any URL using xAI's web_search tool (Grok reads the page). Returns clean text with title, author, date, and word count. Requires XAI_API_KEY.\n\nAlso supports X tweet URLs — automatically extracts the linked article from the tweet and fetches it.\n\nOptions:\n\n--json — structured JSON output (title, content, author, published, wordCount, ttr)\n--full — return full article text without truncation (default truncates to ~5000 chars)\n--model <name> — Grok model (default: grok-4)\n--ai <text> — analyze article with Grok AI (passes content to analyze command)\n\nExamples:\n\n# Fetch article from URL\nbun run xint.ts article https://example.com/blog/post\n\n# Auto-extract article from X tweet URL and analyze\nbun run xint.ts article \"https://x.com/user/status/123456789\" --ai \"Summarize key takeaways\"\n\n# Fetch + analyze with AI\nbun run xint.ts article https://techcrunch.com/article --ai \"What are the main points?\"\n\n# Full content without truncation\nbun run xint.ts article https://blog.example.com/deep-dive --full\n\nAgent usage: When search results include tweets with article links, use article to read the full content. Search results now include article titles and descriptions from the X API (shown as 📰 lines), so you can decide which articles are worth a full read. Prioritize articles that:\n\nMultiple tweets reference\nCome from high-engagement tweets\nHave relevant titles/descriptions from the API metadata"
      },
      {
        "title": "Bookmarks",
        "body": "bun run xint.ts bookmarks [options]       # List bookmarked tweets\nbun run xint.ts bookmark <tweet_id>       # Bookmark a tweet\nbun run xint.ts unbookmark <tweet_id>     # Remove a bookmark\n\nBookmark list options:\n\n--limit N — max bookmarks to display (default: 20)\n--since <dur> — filter by recency (1h, 1d, 7d, etc.)\n--query <text> — client-side text filter\n--json — raw JSON output\n--markdown — markdown output\n--save — save to data/exports/\n--no-cache — skip cache\n\nRequires OAuth. Run auth setup first."
      },
      {
        "title": "Likes",
        "body": "bun run xint.ts likes [options]           # List your liked tweets\nbun run xint.ts like <tweet_id>           # Like a tweet\nbun run xint.ts unlike <tweet_id>         # Unlike a tweet\n\nLikes list options: Same as bookmarks (--limit, --since, --query, --json, --no-cache).\n\nRequires OAuth with like.read and like.write scopes."
      },
      {
        "title": "Following",
        "body": "bun run xint.ts following [username] [--limit N] [--json]\n\nLists accounts you (or another user) follow. Defaults to the authenticated user.\n\nRequires OAuth with follows.read scope."
      },
      {
        "title": "Trends",
        "body": "bun run xint.ts trends [location] [options]\n\nFetches trending topics. Tries the official X API trends endpoint first; falls back to search-based hashtag frequency estimation if unavailable.\n\nOptions:\n\n[location] — location name or WOEID number (default: worldwide)\n--limit N — number of trends to display (default: 20)\n--json — raw JSON output\n--no-cache — bypass the 15-minute cache\n--locations — list all known location names\n\nExamples:\n\nbun run xint.ts trends                    # Worldwide\nbun run xint.ts trends us --limit 10      # US top 10\nbun run xint.ts trends japan --json       # Japan, JSON output\nbun run xint.ts trends --locations        # List all locations"
      },
      {
        "title": "Analyze (Grok AI)",
        "body": "bun run xint.ts analyze \"<query>\"                              # Ask Grok a question\nbun run xint.ts analyze --tweets <file>                        # Analyze tweets from JSON file\nbun run xint.ts search \"topic\" --json | bun run xint.ts analyze --pipe  # Pipe search results\n\nUses xAI's Grok API (OpenAI-compatible). Requires XAI_API_KEY in env or .env.\n\nOptions:\n\n--model <name> — grok-4, grok-4-1-fast (default), grok-3, grok-3-mini, grok-2\n--tweets <file> — path to JSON file containing tweets\n--pipe — read tweet JSON from stdin\n\nExamples:\n\nbun run xint.ts analyze \"What are the top AI agent frameworks right now?\"\nbun run xint.ts search \"AI agents\" --json | bun run xint.ts analyze --pipe \"Which show product launches?\"\nbun run xint.ts analyze --model grok-3 \"Deep analysis of crypto market sentiment\""
      },
      {
        "title": "xAI X Search (No Cookies/GraphQL)",
        "body": "For “recent sentiment / what X is saying” without using cookies/GraphQL, use xAI’s hosted x_search tool.\n\nScript:\n\npython3 scripts/xai_x_search_scan.py --help"
      },
      {
        "title": "xAI Collections Knowledge Base (Files + Collections)",
        "body": "Store first-party artifacts (reports, logs) in xAI Collections and semantic-search them later.\n\nScript:\n\npython3 scripts/xai_collections.py --help\n\nEnv:\n\nXAI_API_KEY (api.x.ai): file upload + search\nXAI_MANAGEMENT_API_KEY (management-api.x.ai): collections management + attaching documents\n\nNotes:\n\nNever print keys.\nPrefer --dry-run when wiring new cron jobs."
      },
      {
        "title": "Reposts",
        "body": "bun run xint.ts reposts <tweet_id> [--limit N] [--json]\n\nLook up users who reposted a specific tweet. Useful for engagement analysis and OSINT.\n\nExamples:\n\nbun run xint.ts reposts 1234567890\nbun run xint.ts reposts 1234567890 --limit 50 --json"
      },
      {
        "title": "User Search",
        "body": "bun run xint.ts users \"<query>\" [--limit N] [--json]\n\nSearch for X users by keyword. Uses the /2/users/search endpoint.\n\nExamples:\n\nbun run xint.ts users \"AI researcher\"\nbun run xint.ts users \"solana developer\" --limit 10 --json"
      },
      {
        "title": "Watch (Real-Time Monitoring)",
        "body": "bun run xint.ts watch \"<query>\" [options]\n\nPolls a search query on an interval, shows only new tweets. Great for monitoring topics during catalysts, tracking mentions, or feeding live data into downstream tools.\n\nOptions:\n\n--interval <dur> / -i — poll interval: 30s, 1m, 5m, 15m (default: 5m)\n--webhook <url> — POST new tweets as JSON to this URL (https:// required for remote hosts)\n--jsonl — output as JSONL instead of formatted text (for piping to tee, jq, etc.)\n--quiet — suppress per-poll headers (just show tweets)\n--limit N — max tweets to show per poll\n--sort likes|impressions|retweets|recent — sort order\n\nPress Ctrl+C to stop — prints session stats (duration, total polls, new tweets found, total cost).\n\nExamples:\n\nbun run xint.ts watch \"solana memecoins\" --interval 5m\nbun run xint.ts watch \"@vitalikbuterin\" --interval 1m\nbun run xint.ts watch \"AI agents\" -i 30s --webhook https://hooks.example.com/ingest\nbun run xint.ts watch \"breaking news\" --jsonl | tee -a feed.jsonl\n\nAgent usage: Use watch when you need continuous monitoring of a topic. For one-off checks, use search instead. The watch command auto-stops if the daily budget is exceeded."
      },
      {
        "title": "Diff (Follower Tracking)",
        "body": "bun run xint.ts diff <@username> [options]\n\nTracks follower/following changes over time using local snapshots. First run creates a baseline; subsequent runs show who followed/unfollowed since last check.\n\nOptions:\n\n--following — track who the user follows (instead of their followers)\n--history — view all saved snapshots for this user\n--json — structured JSON output\n--pages N — pages of followers to fetch (default: 5, 1000 per page)\n\nRequires OAuth (auth setup first). Snapshots stored in data/snapshots/.\n\nExamples:\n\nbun run xint.ts diff @vitalikbuterin          # First run: create snapshot\nbun run xint.ts diff @vitalikbuterin          # Later: show changes\nbun run xint.ts diff @0xNyk --following       # Track who you follow\nbun run xint.ts diff @solana --history        # View snapshot history\n\nAgent usage: Use diff to detect notable follower changes for monitored accounts. Combine with watch for comprehensive account monitoring. Run periodically (e.g., daily) to build a history of follower changes."
      },
      {
        "title": "Report (Intelligence Reports)",
        "body": "bun run xint.ts report \"<topic>\" [options]\n\nGenerates comprehensive markdown intelligence reports combining search results, optional sentiment analysis, and AI-powered summary via Grok.\n\nOptions:\n\n--sentiment — include per-tweet sentiment analysis\n--accounts @user1,@user2 — include per-account activity sections\n--model <name> — Grok model for AI summary (default: grok-4-1-fast)\n--pages N — search pages to fetch (default: 2)\n--save — save report to data/exports/\n\nExamples:\n\nbun run xint.ts report \"AI agents\"\nbun run xint.ts report \"solana\" --sentiment --accounts @aaboronkov,@rajgokal --save\nbun run xint.ts report \"crypto market\" --model grok-3 --sentiment --save\n\nAgent usage: Use report when the user wants a comprehensive briefing on a topic. This is the highest-level command — it runs search, sentiment, and analysis in one pass and produces a structured markdown report. For quick pulse checks, use search --quick instead."
      },
      {
        "title": "Costs",
        "body": "bun run xint.ts costs                     # Today's costs\nbun run xint.ts costs week                # Last 7 days\nbun run xint.ts costs month               # Last 30 days\nbun run xint.ts costs all                 # All time\nbun run xint.ts costs budget              # Show budget info\nbun run xint.ts costs budget set 2.00     # Set daily limit to $2\nbun run xint.ts costs reset               # Reset today's data\n\nTracks per-call API costs with daily aggregates and configurable budget limits."
      },
      {
        "title": "Watchlist",
        "body": "bun run xint.ts watchlist                       # Show all\nbun run xint.ts watchlist add <user> [note]     # Add account\nbun run xint.ts watchlist remove <user>         # Remove account\nbun run xint.ts watchlist check                 # Check recent from all"
      },
      {
        "title": "Auth",
        "body": "bun run xint.ts auth setup [--manual]    # Set up OAuth 2.0 (PKCE)\nbun run xint.ts auth status              # Check token status\nbun run xint.ts auth refresh             # Manually refresh tokens\n\nRequired scopes: bookmark.read bookmark.write tweet.read users.read like.read like.write follows.read offline.access"
      },
      {
        "title": "Cache",
        "body": "bun run xint.ts cache clear    # Clear all cached results\n\n15-minute TTL. Avoids re-fetching identical queries."
      },
      {
        "title": "Research Loop (Agentic)",
        "body": "When doing deep research (not just a quick search), follow this loop:"
      },
      {
        "title": "1. Decompose the Question into Queries",
        "body": "Turn the research question into 3-5 keyword queries using X search operators:\n\nCore query: Direct keywords for the topic\nExpert voices: from: specific known experts\nPain points: Keywords like (broken OR bug OR issue OR migration)\nPositive signal: Keywords like (shipped OR love OR fast OR benchmark)\nLinks: url:github.com or url: specific domains\nNoise reduction: -is:retweet (auto-added), add -is:reply if needed"
      },
      {
        "title": "2. Search and Extract",
        "body": "Run each query via CLI. After each, assess:\n\nSignal or noise? Adjust operators.\nKey voices worth searching from: specifically?\nThreads worth following via thread command?\nLinked resources worth deep-diving?"
      },
      {
        "title": "3. Follow Threads",
        "body": "When a tweet has high engagement or is a thread starter:\n\nbun run xint.ts thread <tweet_id>"
      },
      {
        "title": "4. Deep-Dive Linked Content",
        "body": "Search results now include article titles and descriptions from the X API (shown as 📰 in output). Use these to decide which links are worth a full read, then fetch with xint article:\n\nbun run xint.ts article <url>               # terminal display\nbun run xint.ts article <url> --json         # structured output\nbun run xint.ts article <url> --full         # no truncation\n\nPrioritize links that:\n\nMultiple tweets reference\nCome from high-engagement tweets\nHave titles/descriptions suggesting depth (not just link aggregators)\nPoint to technical resources directly relevant to the question"
      },
      {
        "title": "5. Analyze with Grok",
        "body": "For complex research, pipe search results into Grok for synthesis:\n\nbun run xint.ts search \"topic\" --json | bun run xint.ts analyze --pipe \"Summarize themes and sentiment\""
      },
      {
        "title": "6. Synthesize",
        "body": "Group findings by theme, not by query:\n\n### [Theme/Finding Title]\n\n[1-2 sentence summary]\n\n- @username: \"[key quote]\" (NL, NI) [Tweet](url)\n- @username2: \"[another perspective]\" (NL, NI) [Tweet](url)\n\nResources shared:\n- [Resource title](url) — [what it is]"
      },
      {
        "title": "7. Save",
        "body": "Use --save flag to save to data/exports/."
      },
      {
        "title": "Obsidian Bookmark Sync (Optional)",
        "body": "Only activate when user explicitly asks to sync bookmarks to Obsidian (e.g., \"sync bookmarks\", \"capture bookmarks\", \"bookmark research\", \"save my bookmarks to obsidian\").\n\nFetches recent X bookmarks, analyzes article content, and saves as structured research notes in the Obsidian inbox. Requires OAuth + Obsidian vault path (~/obsidian/nyk/inbox/)."
      },
      {
        "title": "Pipeline",
        "body": "Step 1 — Fetch bookmarks:\n\nxint bookmarks --limit {count} --json --policy engagement {--since flag if provided} {--query flag if provided}\n\nParse JSON output. Each bookmark has: id, text, username, name, created_at, metrics, urls, tweet_url.\n\nStep 2 — Classify: For each bookmark, determine type:\n\narticle: Contains X article URL (x.com/i/article/...) or thread with 3+ linked tweets\nthread: Multi-tweet thread (conversation_id, reply chains)\nstandalone: Single tweet with insight/opinion/announcement\nlink: Tweet primarily sharing an external URL\n\nStep 3 — Analyze content:\n\nFor article/thread: Use Agent tool (subagent_type: \"general-purpose\") to fetch + analyze full content — run analyses in parallel (one agent per article)\nFor standalone/link: Analyze directly from tweet text + WebFetch for external links\n\nStep 4 — Deduplicate: Before creating files, check for existing notes:\n\ngrep -rl \"{tweet_id}\" ~/obsidian/nyk/inbox/ 2>/dev/null\n\nSkip bookmarks that already have notes.\n\nStep 5 — Generate research notes at ~/obsidian/nyk/inbox/research-{slug}.md:\n\n---\nid: research-{slug}\ncreated: {today's date}\ntype: research\nstatus: inbox\ntags: [{auto-detected tags}]\nsource: x-bookmarks\ntweet_id: \"{tweet_id}\"\ndescription: {one-line summary}\n---\n\nContent sections: Signal (author, engagement, tweet URL) → Core Thesis → Key Findings (bullets) → Why It Resonated (engagement analysis) → Actionable Takeaways (checklist) → Related (wikilinks). Apply 2-4 tags per note.\n\nStep 6 — Summary report: Output a table of processed bookmarks (author, topic, engagement, file), counts of new/skipped/total."
      },
      {
        "title": "Tag Detection Rules",
        "body": "Content PatternTagsAI agents, deployment, orchestrationai-agents, agent-deploymentEnterprise, SaaS, businessenterprise, business-strategyTrading, quant, markets, DeFiquantitative-finance, prediction-marketsClaude, LLM, promptingai-ml-research, llm-engineeringSecurity, hacking, CTFsecurity-governanceDesign, UI/UX, frontenddesign, frontendStartup, growth, marketingstartup, marketingCoding, engineering, architecturesoftware-engineering"
      },
      {
        "title": "Sync Heuristics",
        "body": "Bookmark-to-like ratio >2:1 = reference material, >3:1 = textbook-grade\nArticles with >1K bookmarks are almost always worth full analysis\nStandalone tweets with <100 likes can still be high-signal if from domain experts\nAll notes go to inbox/ — promotion to knowledge/graph/ happens via knowledge-doctor pipeline\nUse [[wikilinks]] for internal cross-references (never standard markdown links)"
      },
      {
        "title": "Cost Management",
        "body": "All API calls are tracked in data/api-costs.json. The budget system warns when approaching limits but does not block calls (passive).\n\nX API v2 pay-per-use rates:\n\nTweet reads (search, bookmarks, likes, profile): ~$0.005/tweet\nFull-archive search: ~$0.01/tweet\nWrite operations (like, unlike, bookmark, unbookmark): ~$0.01/action\nProfile lookups: ~$0.005/lookup\nFollower/following lookups: ~$0.01/page\nTrends: ~$0.10/request\nUser search: ~$0.01/page\nReposts lookup: ~$0.01/page\nGrok AI (sentiment/analyze/report): billed by xAI separately (not X API)\n\ngrok-4-1-fast: $0.20/$0.50 per 1M tokens (default for analysis)\ngrok-4: $3.00/$15.00 per 1M tokens (used for article/x-search)\nxAI tool invocations: max $5/1K calls (50% cheaper than 2025 rates)\n\nDefault daily budget: $1.00 (adjustable via costs budget set <N>)."
      },
      {
        "title": "Refinement Heuristics",
        "body": "Too much noise? Add -is:reply, use --sort likes, narrow keywords\nToo few results? Broaden with OR, remove restrictive operators\nCrypto spam? Add -$ -airdrop -giveaway -whitelist\nExpert takes only? Use from: or --min-likes 50\nSubstance over hot takes? Search with has:links"
      },
      {
        "title": "File Structure",
        "body": "xint/\n├── SKILL.md           (this file — agent instructions)\n├── xint.ts            (CLI entry point)\n├── lib/\n│   ├── api.ts         (X API wrapper: search, thread, profile, tweet)\n│   ├── article.ts     (full article content fetcher via xAI web_search)\n│   ├── bookmarks.ts   (bookmark read — OAuth)\n│   ├── cache.ts       (file-based cache, 15min TTL)\n│   ├── costs.ts       (API cost tracking & budget)\n│   ├── engagement.ts  (likes, like/unlike, following, bookmark write — OAuth)\n│   ├── followers.ts   (follower/following tracking + snapshot diffs)\n│   ├── format.ts      (terminal, markdown, CSV, JSONL formatters)\n│   ├── grok.ts        (xAI Grok analysis integration)\n│   ├── oauth.ts       (OAuth 2.0 PKCE auth + token refresh)\n│   ├── reposts.ts     (repost/retweet lookup)\n│   ├── report.ts      (intelligence report generation)\n│   ├── sentiment.ts   (AI-powered sentiment analysis via Grok)\n│   ├── trends.ts      (trending topics — API + search fallback)\n│   ├── users.ts       (user search by keyword)\n│   └── watch.ts       (real-time monitoring with polling)\n├── data/\n│   ├── api-costs.json  (cost tracking data)\n│   ├── oauth-tokens.json (OAuth tokens — chmod 600)\n│   ├── watchlist.json  (accounts to monitor)\n│   ├── exports/        (saved research)\n│   ├── snapshots/      (follower/following snapshots for diff)\n│   └── cache/          (auto-managed)\n└── references/\n    └── x-api.md        (X API endpoint reference)"
      },
      {
        "title": "Package API Tools",
        "body": "The Package API provides agent memory package management:\n\nToolPurposeAuthxint_package_createCreate ingest job from topic queryXINT_PACKAGE_API_KEYxint_package_statusGet package metadata + freshnessXINT_PACKAGE_API_KEYxint_package_queryQuery packages, return claims + citationsXINT_PACKAGE_API_KEYxint_package_refreshTrigger new snapshotXINT_PACKAGE_API_KEYxint_package_searchSearch package catalogXINT_PACKAGE_API_KEYxint_package_publishPublish to shared catalogXINT_PACKAGE_API_KEY\n\nWorkflow:\n\nxint_package_create -> creates package with topic query + sources\nxint_package_status -> poll until status is \"ready\"\nxint_package_query -> retrieve claims with citations\nxint_package_refresh -> trigger re-ingest when data is stale\nxint_package_publish -> share to catalog when quality is confirmed"
      },
      {
        "title": "Token Budget Awareness",
        "body": "Use --quick flag for initial discovery (1 page, 1hr cache, noise filter)\nUse --fields id,text,metrics.likes to reduce response size\nPrefer xint_search with limit: 5 for quick checks\nUse xint_costs to check budget before expensive operations"
      },
      {
        "title": "Batch Operations",
        "body": "Search + profile in sequence, not parallel (rate limit: 350ms between requests)\nUse xint_watch for polling instead of repeated searches\nCombine xint_report for topic intelligence instead of multiple searches"
      },
      {
        "title": "Context Window Management",
        "body": "xint_search with limit=15: ~3KB response\nxint_profile with count=20: ~4KB response\nxint_article: 1-10KB depending on article length\nBookmark sync pipeline: ~2-8KB per bookmark (depends on article analysis)\nxint_trends: ~2KB response\nUse --fields flag to reduce output to only needed fields"
      },
      {
        "title": "Error Recovery Matrix",
        "body": "Error CodeRetryableAgent ActionExampleRATE_LIMITEDYesWait retry_after_ms, then retry429 from X APIAUTH_FAILEDNoStop, report missing credentialMissing X_BEARER_TOKENNOT_FOUNDNoSkip resource, try alternativeDeleted tweetBUDGET_DENIEDNoStop, use xint costs budget set NDaily limit exceededPOLICY_DENIEDNoStop, escalate to userNeed --policy=engagementVALIDATION_ERRORNoFix parameter, retryInvalid tweet_id formatTIMEOUTYesRetry after 5sNetwork timeoutAPI_ERRORIf 5xxRetry after 30s for 5xx, stop for 4xxX API outage"
      },
      {
        "title": "Fallback Chain",
        "body": "When a tool fails, try the next option:\n\nxint_search (X API v2, fast, real-time)\nxint_xsearch (xAI Grok search via grok-4-1-fast, AI-enhanced, requires XAI_API_KEY)\nCached results from previous searches (15min TTL)\n\nFor article fetching:\n\nxint_article with tweet URL (extracts inline X Article)\nxint_article with article URL (web fetch via grok-4)\nxint_search for tweets about the topic\n\nFor user discovery:\n\nxint_users (search by keyword, new /2/users/search endpoint)\nxint_search with from: operator for known usernames\nxint_reposts to find engaged users on specific tweets"
      }
    ],
    "body": "xint — X Intelligence CLI\n\nGeneral-purpose agentic research over X/Twitter. Decompose any research question into targeted searches, iteratively refine, follow threads, deep-dive linked content, and synthesize into a sourced briefing.\n\nFor X API details (endpoints, operators, response format): read references/x-api.md.\n\nSecurity Considerations\n\nThis skill requires sensitive credentials. Follow these guidelines:\n\nCredentials\nX_BEARER_TOKEN: Required for X API. Treat as a secret - prefer exported environment variables (optional project-local .env)\nXAI_API_KEY: Optional, needed for AI analysis. Also a secret\nX_CLIENT_ID: Optional, needed for OAuth. Less sensitive but don't expose publicly\nXAI_MANAGEMENT_API_KEY: Optional, for collections management\nFile Writes\nThis skill writes to its own data/ directory: cache, exports, snapshots, OAuth tokens\nOAuth tokens stored with restrictive permissions (chmod 600)\nReview exported data before sharing - may contain sensitive search queries\nWebhooks\nwatch and stream can send data to webhook endpoints\nRemote endpoints must use https:// (http:// is accepted only for localhost/loopback)\nOptional host allowlist: XINT_WEBHOOK_ALLOWED_HOSTS=hooks.example.com,*.internal.example\nAvoid sending sensitive search queries or token-bearing URLs to third-party destinations\nRuntime Notes\nThis file documents usage and safety controls for the CLI only.\nNetwork listeners are opt-in (mcp --sse) and disabled by default\nWebhook delivery is opt-in (--webhook) and disabled by default\nInstallation\nFor Bun: prefer OS package managers over curl | bash when possible\nVerify any installer scripts before running\nMCP Server (Optional)\nbun run xint.ts mcp starts a local MCP server exposing xint commands as tools\nDefault mode is stdio/local integration; no inbound web server unless --sse is explicitly enabled\nRespect --policy read_only|engagement|moderation and budget guardrails\nCLI Tool\n\nAll commands run from the project directory:\n\n# Set your environment variables\nexport X_BEARER_TOKEN=\"your-token\"\n\nSearch\nbun run xint.ts search \"<query>\" [options]\n\n\nOptions:\n\n--sort likes|impressions|retweets|recent — sort order (default: likes)\n--since 1h|3h|12h|1d|7d — time filter (default: last 7 days). Also accepts minutes (30m) or ISO timestamps.\n--min-likes N — filter by minimum likes\n--min-impressions N — filter by minimum impressions\n--pages N — pages to fetch, 1-5 (default: 1, 100 tweets/page)\n--limit N — max results to display (default: 15)\n--quick — quick mode: 1 page, max 10 results, auto noise filter, 1hr cache, cost summary\n--from <username> — shorthand for from:username in query\n--quality — filter low-engagement tweets (>=10 likes, post-hoc)\n--no-replies — exclude replies\n--sentiment — AI-powered per-tweet sentiment analysis (via Grok). Shows positive/negative/neutral/mixed with scores.\n--save — save results to data/exports/\n--json — raw JSON output\n--jsonl — one JSON object per line (optimized for Unix pipes: | jq, | tee)\n--csv — CSV output for spreadsheet analysis\n--markdown — markdown output for research docs\n\nAuto-adds -is:retweet unless query already includes it. All searches display estimated API cost.\n\nExamples:\n\nbun run xint.ts search \"AI agents\" --sort likes --limit 10\nbun run xint.ts search \"from:elonmusk\" --sort recent\nbun run xint.ts search \"(opus 4.6 OR claude) trading\" --pages 2 --save\nbun run xint.ts search \"$BTC (revenue OR fees)\" --min-likes 5\nbun run xint.ts search \"AI agents\" --quick\nbun run xint.ts search \"AI agents\" --quality --quick\nbun run xint.ts search \"solana memecoins\" --sentiment --limit 20\nbun run xint.ts search \"startup funding\" --csv > funding.csv\nbun run xint.ts search \"AI\" --jsonl | jq 'select(.metrics.likes > 100)'\n\nProfile\nbun run xint.ts profile <username> [--count N] [--replies] [--json]\n\n\nFetches recent tweets from a specific user (excludes replies by default).\n\nThread\nbun run xint.ts thread <tweet_id> [--pages N]\n\n\nFetches full conversation thread by root tweet ID.\n\nSingle Tweet\nbun run xint.ts tweet <tweet_id> [--json]\n\nArticle (Full Content Fetcher)\nbun run xint.ts article <url> [--json] [--full] [--ai <text>]\n\n\nFetches and extracts full article content from any URL using xAI's web_search tool (Grok reads the page). Returns clean text with title, author, date, and word count. Requires XAI_API_KEY.\n\nAlso supports X tweet URLs — automatically extracts the linked article from the tweet and fetches it.\n\nOptions:\n\n--json — structured JSON output (title, content, author, published, wordCount, ttr)\n--full — return full article text without truncation (default truncates to ~5000 chars)\n--model <name> — Grok model (default: grok-4)\n--ai <text> — analyze article with Grok AI (passes content to analyze command)\n\nExamples:\n\n# Fetch article from URL\nbun run xint.ts article https://example.com/blog/post\n\n# Auto-extract article from X tweet URL and analyze\nbun run xint.ts article \"https://x.com/user/status/123456789\" --ai \"Summarize key takeaways\"\n\n# Fetch + analyze with AI\nbun run xint.ts article https://techcrunch.com/article --ai \"What are the main points?\"\n\n# Full content without truncation\nbun run xint.ts article https://blog.example.com/deep-dive --full\n\n\nAgent usage: When search results include tweets with article links, use article to read the full content. Search results now include article titles and descriptions from the X API (shown as 📰 lines), so you can decide which articles are worth a full read. Prioritize articles that:\n\nMultiple tweets reference\nCome from high-engagement tweets\nHave relevant titles/descriptions from the API metadata\nBookmarks\nbun run xint.ts bookmarks [options]       # List bookmarked tweets\nbun run xint.ts bookmark <tweet_id>       # Bookmark a tweet\nbun run xint.ts unbookmark <tweet_id>     # Remove a bookmark\n\n\nBookmark list options:\n\n--limit N — max bookmarks to display (default: 20)\n--since <dur> — filter by recency (1h, 1d, 7d, etc.)\n--query <text> — client-side text filter\n--json — raw JSON output\n--markdown — markdown output\n--save — save to data/exports/\n--no-cache — skip cache\n\nRequires OAuth. Run auth setup first.\n\nLikes\nbun run xint.ts likes [options]           # List your liked tweets\nbun run xint.ts like <tweet_id>           # Like a tweet\nbun run xint.ts unlike <tweet_id>         # Unlike a tweet\n\n\nLikes list options: Same as bookmarks (--limit, --since, --query, --json, --no-cache).\n\nRequires OAuth with like.read and like.write scopes.\n\nFollowing\nbun run xint.ts following [username] [--limit N] [--json]\n\n\nLists accounts you (or another user) follow. Defaults to the authenticated user.\n\nRequires OAuth with follows.read scope.\n\nTrends\nbun run xint.ts trends [location] [options]\n\n\nFetches trending topics. Tries the official X API trends endpoint first; falls back to search-based hashtag frequency estimation if unavailable.\n\nOptions:\n\n[location] — location name or WOEID number (default: worldwide)\n--limit N — number of trends to display (default: 20)\n--json — raw JSON output\n--no-cache — bypass the 15-minute cache\n--locations — list all known location names\n\nExamples:\n\nbun run xint.ts trends                    # Worldwide\nbun run xint.ts trends us --limit 10      # US top 10\nbun run xint.ts trends japan --json       # Japan, JSON output\nbun run xint.ts trends --locations        # List all locations\n\nAnalyze (Grok AI)\nbun run xint.ts analyze \"<query>\"                              # Ask Grok a question\nbun run xint.ts analyze --tweets <file>                        # Analyze tweets from JSON file\nbun run xint.ts search \"topic\" --json | bun run xint.ts analyze --pipe  # Pipe search results\n\n\nUses xAI's Grok API (OpenAI-compatible). Requires XAI_API_KEY in env or .env.\n\nOptions:\n\n--model <name> — grok-4, grok-4-1-fast (default), grok-3, grok-3-mini, grok-2\n--tweets <file> — path to JSON file containing tweets\n--pipe — read tweet JSON from stdin\n\nExamples:\n\nbun run xint.ts analyze \"What are the top AI agent frameworks right now?\"\nbun run xint.ts search \"AI agents\" --json | bun run xint.ts analyze --pipe \"Which show product launches?\"\nbun run xint.ts analyze --model grok-3 \"Deep analysis of crypto market sentiment\"\n\nxAI X Search (No Cookies/GraphQL)\n\nFor “recent sentiment / what X is saying” without using cookies/GraphQL, use xAI’s hosted x_search tool.\n\nScript:\n\npython3 scripts/xai_x_search_scan.py --help\n\nxAI Collections Knowledge Base (Files + Collections)\n\nStore first-party artifacts (reports, logs) in xAI Collections and semantic-search them later.\n\nScript:\n\npython3 scripts/xai_collections.py --help\n\n\nEnv:\n\nXAI_API_KEY (api.x.ai): file upload + search\nXAI_MANAGEMENT_API_KEY (management-api.x.ai): collections management + attaching documents\n\nNotes:\n\nNever print keys.\nPrefer --dry-run when wiring new cron jobs.\nReposts\nbun run xint.ts reposts <tweet_id> [--limit N] [--json]\n\n\nLook up users who reposted a specific tweet. Useful for engagement analysis and OSINT.\n\nExamples:\n\nbun run xint.ts reposts 1234567890\nbun run xint.ts reposts 1234567890 --limit 50 --json\n\nUser Search\nbun run xint.ts users \"<query>\" [--limit N] [--json]\n\n\nSearch for X users by keyword. Uses the /2/users/search endpoint.\n\nExamples:\n\nbun run xint.ts users \"AI researcher\"\nbun run xint.ts users \"solana developer\" --limit 10 --json\n\nWatch (Real-Time Monitoring)\nbun run xint.ts watch \"<query>\" [options]\n\n\nPolls a search query on an interval, shows only new tweets. Great for monitoring topics during catalysts, tracking mentions, or feeding live data into downstream tools.\n\nOptions:\n\n--interval <dur> / -i — poll interval: 30s, 1m, 5m, 15m (default: 5m)\n--webhook <url> — POST new tweets as JSON to this URL (https:// required for remote hosts)\n--jsonl — output as JSONL instead of formatted text (for piping to tee, jq, etc.)\n--quiet — suppress per-poll headers (just show tweets)\n--limit N — max tweets to show per poll\n--sort likes|impressions|retweets|recent — sort order\n\nPress Ctrl+C to stop — prints session stats (duration, total polls, new tweets found, total cost).\n\nExamples:\n\nbun run xint.ts watch \"solana memecoins\" --interval 5m\nbun run xint.ts watch \"@vitalikbuterin\" --interval 1m\nbun run xint.ts watch \"AI agents\" -i 30s --webhook https://hooks.example.com/ingest\nbun run xint.ts watch \"breaking news\" --jsonl | tee -a feed.jsonl\n\n\nAgent usage: Use watch when you need continuous monitoring of a topic. For one-off checks, use search instead. The watch command auto-stops if the daily budget is exceeded.\n\nDiff (Follower Tracking)\nbun run xint.ts diff <@username> [options]\n\n\nTracks follower/following changes over time using local snapshots. First run creates a baseline; subsequent runs show who followed/unfollowed since last check.\n\nOptions:\n\n--following — track who the user follows (instead of their followers)\n--history — view all saved snapshots for this user\n--json — structured JSON output\n--pages N — pages of followers to fetch (default: 5, 1000 per page)\n\nRequires OAuth (auth setup first). Snapshots stored in data/snapshots/.\n\nExamples:\n\nbun run xint.ts diff @vitalikbuterin          # First run: create snapshot\nbun run xint.ts diff @vitalikbuterin          # Later: show changes\nbun run xint.ts diff @0xNyk --following       # Track who you follow\nbun run xint.ts diff @solana --history        # View snapshot history\n\n\nAgent usage: Use diff to detect notable follower changes for monitored accounts. Combine with watch for comprehensive account monitoring. Run periodically (e.g., daily) to build a history of follower changes.\n\nReport (Intelligence Reports)\nbun run xint.ts report \"<topic>\" [options]\n\n\nGenerates comprehensive markdown intelligence reports combining search results, optional sentiment analysis, and AI-powered summary via Grok.\n\nOptions:\n\n--sentiment — include per-tweet sentiment analysis\n--accounts @user1,@user2 — include per-account activity sections\n--model <name> — Grok model for AI summary (default: grok-4-1-fast)\n--pages N — search pages to fetch (default: 2)\n--save — save report to data/exports/\n\nExamples:\n\nbun run xint.ts report \"AI agents\"\nbun run xint.ts report \"solana\" --sentiment --accounts @aaboronkov,@rajgokal --save\nbun run xint.ts report \"crypto market\" --model grok-3 --sentiment --save\n\n\nAgent usage: Use report when the user wants a comprehensive briefing on a topic. This is the highest-level command — it runs search, sentiment, and analysis in one pass and produces a structured markdown report. For quick pulse checks, use search --quick instead.\n\nCosts\nbun run xint.ts costs                     # Today's costs\nbun run xint.ts costs week                # Last 7 days\nbun run xint.ts costs month               # Last 30 days\nbun run xint.ts costs all                 # All time\nbun run xint.ts costs budget              # Show budget info\nbun run xint.ts costs budget set 2.00     # Set daily limit to $2\nbun run xint.ts costs reset               # Reset today's data\n\n\nTracks per-call API costs with daily aggregates and configurable budget limits.\n\nWatchlist\nbun run xint.ts watchlist                       # Show all\nbun run xint.ts watchlist add <user> [note]     # Add account\nbun run xint.ts watchlist remove <user>         # Remove account\nbun run xint.ts watchlist check                 # Check recent from all\n\nAuth\nbun run xint.ts auth setup [--manual]    # Set up OAuth 2.0 (PKCE)\nbun run xint.ts auth status              # Check token status\nbun run xint.ts auth refresh             # Manually refresh tokens\n\n\nRequired scopes: bookmark.read bookmark.write tweet.read users.read like.read like.write follows.read offline.access\n\nCache\nbun run xint.ts cache clear    # Clear all cached results\n\n\n15-minute TTL. Avoids re-fetching identical queries.\n\nResearch Loop (Agentic)\n\nWhen doing deep research (not just a quick search), follow this loop:\n\n1. Decompose the Question into Queries\n\nTurn the research question into 3-5 keyword queries using X search operators:\n\nCore query: Direct keywords for the topic\nExpert voices: from: specific known experts\nPain points: Keywords like (broken OR bug OR issue OR migration)\nPositive signal: Keywords like (shipped OR love OR fast OR benchmark)\nLinks: url:github.com or url: specific domains\nNoise reduction: -is:retweet (auto-added), add -is:reply if needed\n2. Search and Extract\n\nRun each query via CLI. After each, assess:\n\nSignal or noise? Adjust operators.\nKey voices worth searching from: specifically?\nThreads worth following via thread command?\nLinked resources worth deep-diving?\n3. Follow Threads\n\nWhen a tweet has high engagement or is a thread starter:\n\nbun run xint.ts thread <tweet_id>\n\n4. Deep-Dive Linked Content\n\nSearch results now include article titles and descriptions from the X API (shown as 📰 in output). Use these to decide which links are worth a full read, then fetch with xint article:\n\nbun run xint.ts article <url>               # terminal display\nbun run xint.ts article <url> --json         # structured output\nbun run xint.ts article <url> --full         # no truncation\n\n\nPrioritize links that:\n\nMultiple tweets reference\nCome from high-engagement tweets\nHave titles/descriptions suggesting depth (not just link aggregators)\nPoint to technical resources directly relevant to the question\n5. Analyze with Grok\n\nFor complex research, pipe search results into Grok for synthesis:\n\nbun run xint.ts search \"topic\" --json | bun run xint.ts analyze --pipe \"Summarize themes and sentiment\"\n\n6. Synthesize\n\nGroup findings by theme, not by query:\n\n### [Theme/Finding Title]\n\n[1-2 sentence summary]\n\n- @username: \"[key quote]\" (NL, NI) [Tweet](url)\n- @username2: \"[another perspective]\" (NL, NI) [Tweet](url)\n\nResources shared:\n- [Resource title](url) — [what it is]\n\n7. Save\n\nUse --save flag to save to data/exports/.\n\nObsidian Bookmark Sync (Optional)\n\nOnly activate when user explicitly asks to sync bookmarks to Obsidian (e.g., \"sync bookmarks\", \"capture bookmarks\", \"bookmark research\", \"save my bookmarks to obsidian\").\n\nFetches recent X bookmarks, analyzes article content, and saves as structured research notes in the Obsidian inbox. Requires OAuth + Obsidian vault path (~/obsidian/nyk/inbox/).\n\nPipeline\n\nStep 1 — Fetch bookmarks:\n\nxint bookmarks --limit {count} --json --policy engagement {--since flag if provided} {--query flag if provided}\n\n\nParse JSON output. Each bookmark has: id, text, username, name, created_at, metrics, urls, tweet_url.\n\nStep 2 — Classify: For each bookmark, determine type:\n\narticle: Contains X article URL (x.com/i/article/...) or thread with 3+ linked tweets\nthread: Multi-tweet thread (conversation_id, reply chains)\nstandalone: Single tweet with insight/opinion/announcement\nlink: Tweet primarily sharing an external URL\n\nStep 3 — Analyze content:\n\nFor article/thread: Use Agent tool (subagent_type: \"general-purpose\") to fetch + analyze full content — run analyses in parallel (one agent per article)\nFor standalone/link: Analyze directly from tweet text + WebFetch for external links\n\nStep 4 — Deduplicate: Before creating files, check for existing notes:\n\ngrep -rl \"{tweet_id}\" ~/obsidian/nyk/inbox/ 2>/dev/null\n\n\nSkip bookmarks that already have notes.\n\nStep 5 — Generate research notes at ~/obsidian/nyk/inbox/research-{slug}.md:\n\n---\nid: research-{slug}\ncreated: {today's date}\ntype: research\nstatus: inbox\ntags: [{auto-detected tags}]\nsource: x-bookmarks\ntweet_id: \"{tweet_id}\"\ndescription: {one-line summary}\n---\n\n\nContent sections: Signal (author, engagement, tweet URL) → Core Thesis → Key Findings (bullets) → Why It Resonated (engagement analysis) → Actionable Takeaways (checklist) → Related (wikilinks). Apply 2-4 tags per note.\n\nStep 6 — Summary report: Output a table of processed bookmarks (author, topic, engagement, file), counts of new/skipped/total.\n\nTag Detection Rules\nContent Pattern\tTags\nAI agents, deployment, orchestration\tai-agents, agent-deployment\nEnterprise, SaaS, business\tenterprise, business-strategy\nTrading, quant, markets, DeFi\tquantitative-finance, prediction-markets\nClaude, LLM, prompting\tai-ml-research, llm-engineering\nSecurity, hacking, CTF\tsecurity-governance\nDesign, UI/UX, frontend\tdesign, frontend\nStartup, growth, marketing\tstartup, marketing\nCoding, engineering, architecture\tsoftware-engineering\nSync Heuristics\nBookmark-to-like ratio >2:1 = reference material, >3:1 = textbook-grade\nArticles with >1K bookmarks are almost always worth full analysis\nStandalone tweets with <100 likes can still be high-signal if from domain experts\nAll notes go to inbox/ — promotion to knowledge/graph/ happens via knowledge-doctor pipeline\nUse [[wikilinks]] for internal cross-references (never standard markdown links)\nCost Management\n\nAll API calls are tracked in data/api-costs.json. The budget system warns when approaching limits but does not block calls (passive).\n\nX API v2 pay-per-use rates:\n\nTweet reads (search, bookmarks, likes, profile): ~$0.005/tweet\nFull-archive search: ~$0.01/tweet\nWrite operations (like, unlike, bookmark, unbookmark): ~$0.01/action\nProfile lookups: ~$0.005/lookup\nFollower/following lookups: ~$0.01/page\nTrends: ~$0.10/request\nUser search: ~$0.01/page\nReposts lookup: ~$0.01/page\nGrok AI (sentiment/analyze/report): billed by xAI separately (not X API)\ngrok-4-1-fast: $0.20/$0.50 per 1M tokens (default for analysis)\ngrok-4: $3.00/$15.00 per 1M tokens (used for article/x-search)\nxAI tool invocations: max $5/1K calls (50% cheaper than 2025 rates)\n\nDefault daily budget: $1.00 (adjustable via costs budget set <N>).\n\nRefinement Heuristics\nToo much noise? Add -is:reply, use --sort likes, narrow keywords\nToo few results? Broaden with OR, remove restrictive operators\nCrypto spam? Add -$ -airdrop -giveaway -whitelist\nExpert takes only? Use from: or --min-likes 50\nSubstance over hot takes? Search with has:links\nFile Structure\nxint/\n├── SKILL.md           (this file — agent instructions)\n├── xint.ts            (CLI entry point)\n├── lib/\n│   ├── api.ts         (X API wrapper: search, thread, profile, tweet)\n│   ├── article.ts     (full article content fetcher via xAI web_search)\n│   ├── bookmarks.ts   (bookmark read — OAuth)\n│   ├── cache.ts       (file-based cache, 15min TTL)\n│   ├── costs.ts       (API cost tracking & budget)\n│   ├── engagement.ts  (likes, like/unlike, following, bookmark write — OAuth)\n│   ├── followers.ts   (follower/following tracking + snapshot diffs)\n│   ├── format.ts      (terminal, markdown, CSV, JSONL formatters)\n│   ├── grok.ts        (xAI Grok analysis integration)\n│   ├── oauth.ts       (OAuth 2.0 PKCE auth + token refresh)\n│   ├── reposts.ts     (repost/retweet lookup)\n│   ├── report.ts      (intelligence report generation)\n│   ├── sentiment.ts   (AI-powered sentiment analysis via Grok)\n│   ├── trends.ts      (trending topics — API + search fallback)\n│   ├── users.ts       (user search by keyword)\n│   └── watch.ts       (real-time monitoring with polling)\n├── data/\n│   ├── api-costs.json  (cost tracking data)\n│   ├── oauth-tokens.json (OAuth tokens — chmod 600)\n│   ├── watchlist.json  (accounts to monitor)\n│   ├── exports/        (saved research)\n│   ├── snapshots/      (follower/following snapshots for diff)\n│   └── cache/          (auto-managed)\n└── references/\n    └── x-api.md        (X API endpoint reference)\n\nPackage API Tools\n\nThe Package API provides agent memory package management:\n\nTool\tPurpose\tAuth\nxint_package_create\tCreate ingest job from topic query\tXINT_PACKAGE_API_KEY\nxint_package_status\tGet package metadata + freshness\tXINT_PACKAGE_API_KEY\nxint_package_query\tQuery packages, return claims + citations\tXINT_PACKAGE_API_KEY\nxint_package_refresh\tTrigger new snapshot\tXINT_PACKAGE_API_KEY\nxint_package_search\tSearch package catalog\tXINT_PACKAGE_API_KEY\nxint_package_publish\tPublish to shared catalog\tXINT_PACKAGE_API_KEY\n\nWorkflow:\n\nxint_package_create -> creates package with topic query + sources\nxint_package_status -> poll until status is \"ready\"\nxint_package_query -> retrieve claims with citations\nxint_package_refresh -> trigger re-ingest when data is stale\nxint_package_publish -> share to catalog when quality is confirmed\nAgent Patterns\nToken Budget Awareness\nUse --quick flag for initial discovery (1 page, 1hr cache, noise filter)\nUse --fields id,text,metrics.likes to reduce response size\nPrefer xint_search with limit: 5 for quick checks\nUse xint_costs to check budget before expensive operations\nBatch Operations\nSearch + profile in sequence, not parallel (rate limit: 350ms between requests)\nUse xint_watch for polling instead of repeated searches\nCombine xint_report for topic intelligence instead of multiple searches\nContext Window Management\nxint_search with limit=15: ~3KB response\nxint_profile with count=20: ~4KB response\nxint_article: 1-10KB depending on article length\nBookmark sync pipeline: ~2-8KB per bookmark (depends on article analysis)\nxint_trends: ~2KB response\nUse --fields flag to reduce output to only needed fields\nError Recovery Matrix\nError Code\tRetryable\tAgent Action\tExample\nRATE_LIMITED\tYes\tWait retry_after_ms, then retry\t429 from X API\nAUTH_FAILED\tNo\tStop, report missing credential\tMissing X_BEARER_TOKEN\nNOT_FOUND\tNo\tSkip resource, try alternative\tDeleted tweet\nBUDGET_DENIED\tNo\tStop, use xint costs budget set N\tDaily limit exceeded\nPOLICY_DENIED\tNo\tStop, escalate to user\tNeed --policy=engagement\nVALIDATION_ERROR\tNo\tFix parameter, retry\tInvalid tweet_id format\nTIMEOUT\tYes\tRetry after 5s\tNetwork timeout\nAPI_ERROR\tIf 5xx\tRetry after 30s for 5xx, stop for 4xx\tX API outage\nFallback Chain\n\nWhen a tool fails, try the next option:\n\nxint_search (X API v2, fast, real-time)\nxint_xsearch (xAI Grok search via grok-4-1-fast, AI-enhanced, requires XAI_API_KEY)\nCached results from previous searches (15min TTL)\n\nFor article fetching:\n\nxint_article with tweet URL (extracts inline X Article)\nxint_article with article URL (web fetch via grok-4)\nxint_search for tweets about the topic\n\nFor user discovery:\n\nxint_users (search by keyword, new /2/users/search endpoint)\nxint_search with from: operator for known usernames\nxint_reposts to find engaged users on specific tweets"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/0xNyk/xint",
    "publisherUrl": "https://clawhub.ai/0xNyk/xint",
    "owner": "0xNyk",
    "version": "2026.2.26",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/xint",
    "downloadUrl": "https://openagent3.xyz/downloads/xint",
    "agentUrl": "https://openagent3.xyz/skills/xint/agent",
    "manifestUrl": "https://openagent3.xyz/skills/xint/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/xint/agent.md"
  }
}