360 Secure SkillHub
360 安全技能中心

Dia Ask Public

在 macOS 上通过 Node.js 脚本把提示词注入本地运行中的 Dia 浏览器,由其内置 AI 助手在真实登录会话中读取页面,并把回答以 md/txt/json/csv 文本文件写入磁盘,脚本只输出该文件路径。v2 采用不抢焦点的注入方式,v1 作为回退。依赖辅助功能权限与非官方 UI 自动化,仅用于读取/研究,不执行点击操作。

germankovacevic-lab
germankovacevic-lab
热度 42.92
最近更新 2026-08-21 08:43:48
分类:自动化依赖:代码执行 / 联网浏览搜索 / 读写文件 / 内部调用大模型应用场景:自动化脚本 / 研究 / 摘要总结 / 数据处理 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add dia-ask
Metadata
name
dia-ask
description
Prompt The Browser Company's Dia (a macOS browser whose assistant is an AI agent) from the command line and get its answer back as an exact text file. Use to read/research logged-in or JS-heavy pages in a real browser session. macOS + Accessibility only; unofficial UI automation.
license
MIT

dia-ask — drive Dia's assistant from the CLI

Delegate a prompt to the AI assistant inside a locally-running Dia browser and read its answer as a file. Dia renders logged-in, JavaScript-heavy pages in your real session and writes its answer to disk, so you get exact text — any length, any format — without screen OCR.

Dia is eyes, not hands: reach for it to read / research what's behind a login or heavy JS; use other tools to act (click, submit).

Built by AgentNeo — AI agents with operational rigor, and the open-source safety patterns to run them.

Requirements

  • macOS, with Dia installed (runs on your own Dia + subscription — no hosted service).
  • Accessibility permission for the process running node (System Settings → Privacy & Security → Accessibility).
  • Node.js ≥ 18. No dependencies.

Usage

node dia-ask-v2.js "<prompt>" [--format md|txt|json|csv] [--timeout 300] [--no-fallback] [--debug]

Prints one line to stdout: the absolute path of the file Dia wrote. Read that file.

node dia-ask-v2.js "summarize the open tab and list every external link" --format md
node dia-ask-v2.js "extract every row of the pricing table on the page" --format csv --timeout 600
  • dia-ask-v2.js — default, focus-safe (injects into Dia's existing window via CGEventPostToPid; never steals focus).
  • dia-ask.js — v1 fallback (opens a fresh window, briefly takes focus). v2 falls back to it automatically; --no-fallback disables.

Caveats

Unofficial UI automation: it depends on Dia's window/Accessibility internals and can break on any Dia update. No official API. macOS only. A reference implementation, not a hardened product. See README.md.

About

Built and maintained by AgentNeo — we build AI agents with operational rigor and open-source the safety patterns needed to run them in the real world.

Contact: gk@agneo.app