Skip to main content
grok-account-bridge Use Grok through a locally signed-in X account using cookie credentials (AUTH_TOKEN/CT0) with strict preflight validation, secret-safe handling, and browser-first execution.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Sheshiyer/grok-account-bridge --skill grok-account-bridge命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中...
name grok-account-bridge displayName 🪶 Grok Account Bridge — Local Signed-In X Session description Use Grok through a locally signed-in X account using cookie credentials (AUTH_TOKEN/CT0) with strict preflight validation, secret-safe handling, and browser-first execution. emoji 🪶 homepage https://skills.sh license MIT
🪶 Grok Account Bridge — Local Signed-In X Session
Use this skill when the user explicitly wants Grok via their local signed-in X account and cookie-backed auth context.
When to trigger
Trigger on prompts like:
"use grok with my local account"
"use auth_token and ct0"
"use cookies from .claude/.env"
"run through signed-in X account"
Do not auto-trigger for generic “use Grok API” requests unless the user asks for cookie/session mode.
Default behavior
Validate local prerequisites ( available)
bird
Resolve credentials safely (AUTH_TOKEN, CT0)
Verify account context (bird ... whoami)
Execute via browser-first Grok UI path
Keep outputs concise and never expose credentials
Auth resolution order (strict)
Existing process env:
~/.claude/.env fallback (if env missing)
~/.config/bird/config.json5 fallback (auth_token + ct0)
If either token is still missing, stop and return a precise remediation message.
Mandatory preflight (must pass) command -v bird && bird --version
bird --auth-token "$AUTH_TOKEN " --ct0 "$CT0 " whoami
If preflight fails, do not attempt Grok execution. Explain exactly which layer failed:
binary missing
credentials missing
credentials invalid/expired
account/session mismatch
Execution path
Primary: browser-backed session (recommended) Use in-app browser automation on the signed-in Grok UI:
Open browser
Navigate to https://x.com/i/grok (or current Grok URL)
Verify login state
Submit user prompt without rewriting unless asked
Return answer summary + any generated artifacts
This path is default because X internal endpoints can change.
Optional: API mode (explicit opt-in only) If and only if user asks for API mode:
Use XAI_API_KEY
Call api.x.ai
Clearly mark output as API mode , not cookie-backed account mode
Hard constraints
Never print or log AUTH_TOKEN, CT0, or API keys
Never persist secrets to files
Never silently switch from cookie mode to API mode
Never rewrite user prompt without user permission
For state-changing actions, show draft and request confirmation first
Fast diagnostics snippets
[ -n "$AUTH_TOKEN " ] && echo "AUTH_TOKEN: set" || echo "AUTH_TOKEN: missing"
[ -n "$CT0 " ] && echo "CT0: set" || echo "CT0: missing"
bird --auth-token "$AUTH_TOKEN " --ct0 "$CT0 " whoami
Failure messaging template
Failed at: credential validation
Reason: bird whoami returned auth failure
Fix: refresh X cookies and update AUTH_TOKEN/CT0 in ~/.claude/.env, then retry
Security posture
Principle of least exposure: only test what is required
Output redaction by default
Deterministic preflight before runtime actions
No destructive action without explicit confirmation