Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

ask-opencli询问 opencli

Agent Skill

ask-opencli 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

849

周安装

34

GitHub Stars

28

下载量

275
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ask-opencli(询问 opencli)
来源仓库:https://github.com/majiayu000/claude-arsenal
仓库路径:skills/ask-opencli
安装命令:
npx skills add https://github.com/majiayu000/claude-arsenal --skill ask-opencli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/majiayu000/claude-arsenal --skill ask-opencli

简介

ask-opencli 用于通过已登录的 Chrome 浏览器会话查询 Grok 或 Gemini,无需 API 费用。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中需要零成本调用 Grok/Gemini 时使用。
  • 依赖 opencli 工具和 Browser Bridge 扩展,需提前配置环境变量与登录状态。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Ask via OpenCLI (Grok / Gemini)

Use opencli to query Grok or Gemini through the user's already-logged-in Chrome session. Zero API cost, fully driven by the existing browser session.

opencli 项目https://github.com/jackwener/opencli 安装npm install -g @jackwener/opencli(需要 Node ≥20) 首次运行opencli doctor 会自动引导安装 Chrome Browser Bridge 扩展 登录:用装了扩展的 Chrome profile 打开 grok.com 和 gemini.google.com 登录一次 必须环境变量export OPENCLI_BROWSER_COMMAND_TIMEOUT=300(写进 shell rc) 更深度的多 AI 并行调研工作流:use the multi-ai-research skill instead

When to trigger:

  • User explicitly asks to query Grok or Gemini ("问一下 grok", "用 gemini 查", "让 grok 看看")
  • User wants a second opinion / external advisor from Grok or Gemini
  • User says "ask grok"/"ask gemini" or mentions these two as the information source

When NOT to trigger:

  • User wants to use native Gemini CLI (gemini -p) → use ask-gemini skill instead
  • User wants Claude's own opinion → answer directly
  • User wants other AI (Doubao, Yuanbao, ChatGPT, etc.) → use other tools

Model selection

If the user doesn't specify which model, default to Grok for real-time / social / news / tech-trend questions, and Gemini for long-form reasoning, research, coding, and document analysis.

If still ambiguous, ask the user which one to use before sending.

⚠️ 常见错误命令(直接 fail fast)

❌ 错误✅ 正确原因
opencli gemini chat "..."opencli gemini ask "..."没有 chat 子命令
opencli grok chat "..."opencli grok ask "..."只有 ask 子命令
opencli grok newopencli grok ask "..." --new truegrok 的"新对话"是 ask 的参数
opencli gemini query "..."opencli gemini ask "..."没有 query 子命令

完整子命令速查(运行 opencli grok --helpopencli gemini --help 查看):

Grok:
  ask <prompt>                    # 唯一命令

Gemini:
  ask <prompt>                    # 最常用
  new                             # 开新对话
  deep-research <prompt>          # Deep Research 模式
  deep-research-result [query]    # 取 Deep Research 结果
  image <prompt>                  # 图片生成

⚠️ Critical: Two-layer timeout (from 2026-04-08 debugging)

opencli has two independent timeout layers, both must be set for grok to wait long enough:

  1. Inner: --timeout 300 — grok.com web response wait time
  2. Outer: OPENCLI_BROWSER_COMMAND_TIMEOUT=300 environment variable — entire browser command execution timeout (default 60s, hardcoded in runtime.js:25)

The outer takes priority over the inner. Setting only --timeout 300 still gets killed at 60s. You MUST set both.

Source code: .omx/reference/opencli/dist/src/runtime.js:25:

export const DEFAULT_BROWSER_COMMAND_TIMEOUT = parseEnvTimeout('OPENCLI_BROWSER_COMMAND_TIMEOUT', 60);

Recommended: add export OPENCLI_BROWSER_COMMAND_TIMEOUT=300 to ~/.zshrc so every grok/gemini call has room to breathe.

Commands

Grok (MANDATORY env var)

OPENCLI_BROWSER_COMMAND_TIMEOUT=300 opencli grok ask "{{PROMPT}}" --timeout 300 -f json

Or if env var already exported in shell:

opencli grok ask "{{PROMPT}}" --timeout 300 -f json

Flags:

  • --new true — start a fresh chat (avoids polluting prior conversation context)
  • --web true — use the hardened grok.com consumer web flow (better error messages)
  • --timeout 300 — MUST match or be lower than OPENCLI_BROWSER_COMMAND_TIMEOUT
  • -f json — structured output (recommended over --format plain for parsing)

Gemini

opencli gemini ask "{{PROMPT}}" --format plain

Gemini is more stable than grok and usually doesn't hit the 60s timeout. No env var required but adding it doesn't hurt:

OPENCLI_BROWSER_COMMAND_TIMEOUT=300 opencli gemini ask "{{PROMPT}}" --format plain

Flags:

  • --new true — start a fresh chat
  • --timeout 90 — extend timeout for long answers (default 60s)

Parallel dispatch (for multi-AI workflows)

To call grok and gemini in parallel from Claude Code, use the Bash tool with run_in_background=true for both calls in the same assistant turn. Claude Code will launch them concurrently and wait for task-completion notifications.

For deep cross-validation workflows (N internal sub-agents + 2 external AIs, confidence-tiered synthesis), use the multi-ai-research skill instead — it covers the full orchestration pattern.

Prerequisites (check before running)

  1. opencli installed: opencli --version should print a version.
  2. Chrome running with Browser Bridge extension loaded — the extension is installed from ~/Desktop/code/AI/tools/opencli/extension/ via chrome://extensions → Developer mode → Load unpacked. If the extension is missing, opencli doctor will flag it.
  3. Logged in to the target site:

- Grok: grok.com must be logged in - Gemini: gemini.google.com must be logged in

  1. Daemon connectivity: run opencli doctor once per session if unsure.

If any check fails, do not fall back to another tool silently. Report the missing prerequisite and ask the user to fix it (per U-23 no-silent-degradation rule).

Execution protocol

  1. Decide which model to use (Grok vs Gemini). If unclear, ask.
  2. Build the prompt. Be explicit — these browser UIs have no system prompt so the full question must be self-contained.
  3. Run the opencli command with --format plain.
  4. Capture the response. If the command fails with a session/auth/challenge message, stop and surface the error to the user. Do NOT retry blindly.
  5. Save an artifact (see below).
  6. Report back to the user: model used, summary of response, and path to the artifact.

Error handling

opencli will emit specific errors like:

  • "Not logged in to grok.com" → ask user to log in
  • "Composer not found" → DOM changed, ask user to open the site manually and retry
  • "Session gated / challenge" → user needs to solve the challenge in Chrome manually
  • Timeout → offer to retry with a longer --timeout

Do not swallow these. Report verbatim with the fix action.

Artifact requirement

After every successful call, save a markdown artifact to:

.omx/artifacts/ask-opencli-<grok|gemini>-<slug>-<YYYYMMDD-HHMMSS>.md

Minimum sections:

  1. Original user task — what the user asked you
  2. Model — grok or gemini, plus any flags used (--new, --web, --timeout)
  3. Final prompt sent — the exact string passed to opencli... ask
  4. Raw response — the full output from opencli
  5. Summary — 2-3 bullets distilling the key points
  6. Action items / next steps — what to do with this information

Keep the artifact even when the response is low quality — it documents that the query was made.

Examples

# Quick factual question, Grok default path
opencli grok ask "最新的 Claude 4.6 定价和 4.5 有什么差别?" --format plain

# Long reasoning task, Gemini with extended timeout + fresh chat
opencli gemini ask "分析这段 Rust 代码的并发安全问题:..." --new true --timeout 120 --format plain

# Grok hardened web path with new chat
opencli grok ask "X 上这两天关于 agent framework 的讨论焦点是什么?" --web true --new true --format plain

Task: {{ARGUMENTS}}

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.24%
按下载量换算100

Claude

29.91%
按下载量换算82

Cursor

21.05%
按下载量换算58

Gemini CLI

8.8%
按下载量换算24

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills