Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

agent-eyes特工的眼睛

Agent Skill

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

总安装

261

周安装

11

GitHub Stars

12

下载量

92
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mrxyy/agents-eyes --skill agent-eyes

简介

Agent Eyes 提供基于页面元素锚定的精确定位能力,适用于 UI 任务中对特定按钮、区域或 DOM 节点的操作。

  • 适合处理“这个按钮”、“当前选中区域”等模糊指代的任务,提升代码修改的准确性。
  • 当项目未启用 context-first 行为规则时推荐使用,可替代纯文本路径定位方式。
  • 需配合浏览器环境运行,注意其对页面结构的依赖;建议在静态页面稳定后再执行相关操作。
  • agent-eyes 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Agent Eyes Skill

When to Apply

  • Apply this skill for UI tasks that need element-anchored precision (for example: “this button”, “当前这个区域”, breadcrumb path, DOM path, selected node).
  • Apply this skill when the user refers to “this element”, “当前选中的元素”, “这里”, “这个按钮”, “这个区域”, breadcrumb path, DOM path, or a visual target on the page.
  • Apply this skill when the task requires precise code modification and the target should be anchored to a selected element instead of guessed from text alone.
  • Apply this skill when the project may not yet have @agent-eyes/agent-eyes installed or may not yet have an AGENTS.md rule enforcing context-first behavior.
  • Do not apply this skill for tasks that can be completed from explicit file paths, code snippets, or clear textual requirements without selected-element context.

Apply Order

  1. If @agent-eyes/agent-eyes is missing, install it first.
  2. If installation was performed in this run, help the user finish minimal plugin configuration for their bundler.
  3. If AGENTS.md is missing or lacks the Agent Eyes rule, create or update it.
  4. If the task is element-anchored/ambiguous, request GET /context/selected before editing code.
  5. If the response is data: null, the agent MUST continue with the default workflow and skip selected-context injection only.
  6. The agent MUST NOT block execution or require element selection as a prerequisite; it may optionally suggest re-selection only when precision risk is high.

Quick Workflow

  1. Check whether @agent-eyes/agent-eyes is installed.
  2. If missing, help install and provide minimal setup guidance.
  3. If installed during this run, actively help configure plugin entry in bundler config files.
  4. Verify config looks effective (plugin imported + plugin applied in config).
  5. Check whether the project already has AGENTS.md.
  6. If missing, create it. If present, append or refine the Agent Eyes workflow rule.
  7. Resolve service base URL.
  8. Request selected-context endpoint only when the target is element-anchored or ambiguous.
  9. If no active selection exists, continue normal code analysis/edit flow and treat context as unavailable.
  10. Validate and normalize response fields.
  11. Build a compact context block for the next agent request.

Check Plugin Installation

  • Detect package manager from lock files:
  • pnpm-lock.yaml -> use pnpm
  • yarn.lock -> use yarn
  • package-lock.json -> use npm
  • Check if @agent-eyes/agent-eyes exists in dependencies:
  • Inspect root package.json (dependencies and devDependencies).
  • If not found, install with the detected package manager:
  • pnpm add -D @agent-eyes/agent-eyes
  • yarn add -D @agent-eyes/agent-eyes
  • npm i -D @agent-eyes/agent-eyes
  • When replying to users, provide install commands on demand:
  • Default: only show one command that matches detected package manager.
  • If user asks for alternatives, then include pnpm / yarn / npm variants.
  • After install, do not stop at package installation:
  • Identify the active bundler/framework from project files (vite.config.*, webpack.config.*, next.config.*, nuxt.config.*, etc.).
  • Help the user update the real config file in-place (or give an exact patch) to include codeInspectorPlugin(...).
  • Include minimal bundler + showSwitch + agent.acp.command fields in example config.
  • Confirm import + plugin registration both exist after edit.
  • If package.json cannot be found, ask user to confirm project root before installation.

Post-Install Configuration Requirement

  • Treat "install plugin" as incomplete until configuration is done.
  • If auto-edit is allowed, modify the detected config file directly and summarize changes.
  • If multiple candidate config files exist, prefer the one used by current scripts in package.json.
  • If bundler cannot be inferred, ask one short blocking question and provide 2-3 likely file candidates.
  • After config, instruct user to start/restart dev server and verify Agent Eyes switch appears.

Bundler Configuration Examples (On Demand)

  • If user asks for "how to configure", provide the example matching their actual bundler/framework.
  • Do not dump all examples by default. Return one best-match snippet first, plus alternatives only when requested.
  • Load examples from references/bundler-examples.md.
  • Prefer reading only the relevant section in that file to keep context small.
  • All snippets should include minimal Agent Eyes config:
  • bundler
  • showSwitch: true
  • agent.acp.command

Ensure AGENTS.md Exists

  • Look for AGENTS.md in the current project root first.
  • If it does not exist, create AGENTS.md with the Agent Eyes workflow template from references/agents-template.md.
  • If it exists, preserve user content and append a short Agent Eyes section rather than replacing the whole file.
  • The inserted rule must require:
  • checking @agent-eyes/agent-eyes installation
  • fetching GET /context/selected before element-anchored/ambiguous UI modification
  • when data: null, continue with default workflow; skip selected-context injection only
  • do not force re-selection; only suggest it when precision risk is high

Resolve Base URL

  • Prefer an explicit value from user/tool input.
  • If an explicit project path is provided, resolve its git root first, then read that git root .code-inspector/record.json.
  • If no explicit project path is provided, resolve the current workspace git root, then read that git root .code-inspector/record.json.
  • Match the project path against entries in record.json using longest-prefix project-directory matching.
  • Probe candidate ports with GET /context/selected and use the first reachable base URL.
  • Fallback to http://127.0.0.1:5678.
  • Keep path configurable; do not hardcode if caller provides a different endpoint.
  • The agent MUST NOT search the filesystem for .code-inspector/record.json using ad-hoc globbing such as rg --files, find, or similar discovery when the git-root path is already known.
  • The agent MUST NOT guess ports by scanning common ports like 5678 3000 5173 8080.
  • The agent MUST only probe ports that come from the matched .code-inspector/record.json, plus the single fallback 5678.
  • If using MCP is available, prefer MCP resolution over reimplementing the lookup manually in the agent response flow.

Use this exact project-directory matching logic:

import path from 'path';

function isPathInside(targetPath: string, candidateRoot: string) {
  const normalizedTarget = path.resolve(targetPath);
  const normalizedRoot = path.resolve(candidateRoot);
  return (
    normalizedTarget === normalizedRoot ||
    normalizedTarget.startsWith(normalizedRoot + path.sep)
  );
}

function resolvePreferredProjectEntry(
  recordEntries: string[],
  projectPath: string
) {
  const normalizedProjectPath = path.resolve(projectPath);
  const matches = recordEntries
    .filter((entryRoot) => isPathInside(normalizedProjectPath, entryRoot))
    .sort((a, b) => b.length - a.length);

  return matches[0] || '';
}

Execution order MUST be:

  1. Determine the project path from explicit user project path first; otherwise use the current workspace path.
  2. Resolve the git root from that path.
  3. Read only <gitRoot>/.code-inspector/record.json.
  4. Run resolvePreferredProjectEntry(Object.keys(recordJson), projectPath) to get the single matched project directory.
  5. Probe only the matched project directory port first, then other ports from the same record.json, then fallback 5678.

Request Context Endpoint

  • Prefer GET /context/selected for read-only context retrieval.
  • If API requires POST, send an empty JSON body {} unless caller specifies filters.
  • Set Accept: application/json.
  • Use a short timeout (3-5 seconds) and report endpoint + timeout on failure.
  • Treat data: null as "there is no current selection". Do not reuse stale context from earlier requests; continue with default workflow without context injection.
  • For endpoint details and payload schema, read references/context-api.md.

Normalize Response

  • Accept either data wrapper or flat object.
  • Prefer multi-selection fields first:
  • activeSelectionId
  • selections / contexts
  • data.active and data.selections
  • Normalize into this shape:
  • activeSelectionId: string
  • active: object | null
  • contexts: object[]
  • selections: object[] (same as contexts)
  • For each context item, normalize:
  • filePath: string
  • line: number
  • column: number
  • elementName: string
  • dom.tagName: string
  • dom.className: string
  • dom.textContent: string (truncate to 200 chars)
  • domPath: string[]
  • If domPath is an object array, map with label || name.
  • If multi-selection fields are missing, fallback to single-selection fields from data or root object.
  • If required fields are missing, return a clear error listing missing keys.

Build Prompt Block

Use this template for downstream agent requests:

There are {selectionCount} selected DOM contexts. Consider all of them together.

{activePrefix}Selection #{index}
Source: {filePath}:{line}:{column}
Element: <{elementName} ...>
DOM: {tagName}, className: {className}, text: {textContent}
Path: {domPathJoined}

Request Example

curl -sS "${BASE_URL}/context/selected" \
  -H "Accept: application/json"

Failure Handling

  • If request fails, provide:
  • attempted URL
  • status code or network error
  • one concrete retry action (check server port, endpoint path, CORS, or auth header)
  • If the endpoint returns data: null, do not block the workflow; continue with default workflow and skip selected-context injection.
  • If context is stale, re-request immediately before sending code-modification prompt.

Notes

  • Keep this skill focused on plugin readiness + context retrieval + normalization.
  • Do not mix this skill with full code-edit workflows unless the user asks.
  • Prefer making the AGENTS.md rule persistent so future agent turns follow it even if this skill is not re-triggered.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.93%
按下载量换算33

Claude

28.4%
按下载量换算26

Cursor

18.46%
按下载量换算17

Gemini CLI

8.91%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills