Token导航 LogoToken导航

Agent Skill · 待分类

arcgis-ai-components(arcgis ai 组件)

arcgis-ai-components 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

arcgis-ai-components 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在待分类类的 11,209 个 Skill 里排第 8,041。

总安装 326周安装 14GitHub Stars 13下载 114核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill arcgis-ai-components

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

为 Web 地图添加自然语言交互能力,让用户通过聊天方式查询空间数据。适用于需要智能问答、自动标注或交互式地图探索的应用场景。作为 5.0 版本新增组件,目前处于 Beta 阶段,API 未来可能存在变更。推荐通过 CDN 方式加载以减少构建复杂度,但需关注版本升级带来的影响。

arcgis-ai-components 属于待分类类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/arcgis-ai-components

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

arcgis-ai-components 怎么安装?

在终端执行 npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill ar…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

arcgis-ai-components 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

arcgis-ai-components 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill arcgis-ai-components 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

arcgis-ai-components 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

arcgis-ai-components 用的人多吗?

公开数据是累计安装 326 次,近一周安装 14 次,下载 114 次,GitHub 13 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

arcgis-ai-components 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
arcgis-ai-components

arcgis ai 组件 · 本页

32613执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

ArcGIS AI Components

Use this skill when adding AI assistant capabilities to a web map, enabling users to interact with map data through natural language chat. This is a new package in 5.0 (@arcgis/ai-components) with no 4.x equivalent.

Beta: AI Components are in beta as of 5.0. APIs may change in future releases.

Import Patterns

CDN (Recommended for AI Components)

AI components auto-register when loaded via the SDK CDN:

<!-- Load ArcGIS Maps SDK (includes ai-components registration) -->
<script type="module" src="https://js.arcgis.com/5.0/"></script>

Direct ESM Imports (Build Tools)

import "@arcgis/ai-components/components/arcgis-assistant";
import "@arcgis/ai-components/components/arcgis-assistant-navigation-agent";
import "@arcgis/ai-components/components/arcgis-assistant-data-exploration-agent";
import "@arcgis/ai-components/components/arcgis-assistant-help-agent";
import "@arcgis/ai-components/components/arcgis-assistant-agent";

Utility Functions

import {
  invokeTextPrompt,
  invokeStructuredPrompt,
  invokeToolPrompt,
  sendTraceMessage,
  getEmbeddings,
  cosineSimilarity,
} from "@arcgis/ai-components/utils";

Core Architecture

The AI assistant uses a component + agent architecture:

  • arcgis-assistant - The chat UI container. Manages conversation, routes user messages to registered agents, and displays responses.
  • Agent components - Slotted children of the assistant. Each agent handles a specific domain (navigation, data exploration, help). The assistant orchestrates which agent handles each query.
arcgis-assistant
  ├── arcgis-assistant-navigation-agent      (pan, zoom, go to locations)
  ├── arcgis-assistant-data-exploration-agent (query data, statistics, charts)
  ├── arcgis-assistant-help-agent            (answer questions about the map/agents)
  └── arcgis-assistant-agent                 (custom agent wrapper)

Basic Setup

Minimal Example (CDN)

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>AI Assistant</title>
    <script type="module" src="https://js.arcgis.com/5.0/"></script>
    <style>
      html,
      body {
        height: 100%;
        margin: 0;
      }
    </style>
  </head>
  <body>
    <calcite-shell>
      <arcgis-map id="my-map" item-id="c13bffcad4a244a99062e915e9bc1dc3">
        <arcgis-zoom slot="top-left"></arcgis-zoom>
      </arcgis-map>
      <calcite-shell-panel slot="panel-end" width="l">
        <calcite-panel>
          <arcgis-assistant
            reference-element="#my-map"
            heading="Map Assistant"
            description="Ask questions about the data on this map."
            entry-message="Hello! I can help you explore this map."
          >
            <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent>
            <arcgis-assistant-data-exploration-agent></arcgis-assistant-data-exploration-agent>
            <arcgis-assistant-help-agent></arcgis-assistant-help-agent>
          </arcgis-assistant>
        </calcite-panel>
      </calcite-shell-panel>
    </calcite-shell>
  </body>
</html>

arcgis-assistant Component

Properties

PropertyAttributeTypeDefaultDescription
referenceElementreference-element`string \HTMLArcgisMapElement`-Required. CSS selector or element reference to an arcgis-map. Provides map context to agents.
headingheadingstring-Title displayed at the top of the assistant panel
descriptiondescriptionstring-Subtitle text describing the assistant's capabilities
entryMessageentry-messagestring-Welcome message shown before the user starts chatting
suggestedPrompts-string[]-Array of suggested prompts displayed as clickable chips (set via JS only)
keepSuggestedPromptskeep-suggested-promptsbooleanfalseKeep suggested prompts visible after the user submits a message
feedbackEnabledfeedback-enabledbooleanfalseShow thumbs up/down feedback buttons on assistant messages
logEnabledlog-enabledbooleanfalseShow agent execution logs (tool calls, reasoning steps)
copyEnabledcopy-enabledbooleanfalseAllow users to copy assistant message content
messages-ChatMessage[][]The conversation history (read/write)

Methods

MethodReturnsDescription
clearChatHistory()voidClears the conversation and resets the assistant
submitMessage(message)voidProgrammatically submit a user message to the assistant
componentOnReady()Promise<this>Resolves when the component is fully loaded

Events

EventDetailDescription
arcgisSubmit{message: string}Fired when the user submits a message
arcgisReady-Fired when the assistant is initialized and ready
arcgisFeedbackAssistantMessageFired when the user provides feedback on a message
arcgisErrorErrorFired when an error occurs during agent execution
arcgisInterrupt-Fired when the user interrupts an in-progress response
arcgisInterruptCancel-Fired when an interrupt is cancelled
arcgisInterruptSubmit-Fired when a new message is submitted while interrupting
arcgisCancel-Fired when processing is cancelled

Built-in Agents

arcgis-assistant-navigation-agent

Handles map navigation requests: panning, zooming, going to specific locations or features.

<arcgis-assistant reference-element="#my-map">
  <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent>
</arcgis-assistant>

User prompt examples: "Zoom to New York City", "Go to the largest feature", "Pan north"

Properties:

PropertyAttributeTypeDescription
referenceElementreference-element`string \HTMLArcgisMapElement`Override the map reference (inherits from parent assistant if not set)

arcgis-assistant-data-exploration-agent

Queries and analyzes layer data: statistics, filters, feature counts, and data summaries.

<arcgis-assistant reference-element="#my-map">
  <arcgis-assistant-data-exploration-agent></arcgis-assistant-data-exploration-agent>
</arcgis-assistant>

User prompt examples: "What is the total population?", "Show me the top 5 features by area", "How many features have value > 100?"

Properties:

PropertyAttributeTypeDescription
referenceElementreference-element`string \HTMLArcgisMapElement`Override the map reference

arcgis-assistant-help-agent

Answers questions about the map, its layers, metadata, and the capabilities of other registered agents.

<arcgis-assistant reference-element="#my-map">
  <arcgis-assistant-help-agent></arcgis-assistant-help-agent>
</arcgis-assistant>

User prompt examples: "What layers are on this map?", "What can you help me with?", "Describe the data"

Properties:

PropertyAttributeTypeDescription
referenceElementreference-element`string \HTMLArcgisMapElement`Override the map reference

Configuring the Assistant

Setting Suggested Prompts (JavaScript)

const assistant = document.querySelector("arcgis-assistant");
assistant.suggestedPrompts = [
  "What is the total change in wheat production from 2017 to 2022?",
  "Go to the county that produced the most wheat in 2022.",
  "How many counties produced less wheat in 2022 than in 2017?",
];

Enabling Developer Features

<arcgis-assistant
  reference-element="#my-map"
  log-enabled
  copy-enabled
  feedback-enabled
  heading="Data Explorer"
  description="Ask questions about the map data."
  entry-message="Welcome! Try asking about the data."
>
  <!-- agents -->
</arcgis-assistant>

Listening for Events

const assistant = document.querySelector("arcgis-assistant");

assistant.addEventListener("arcgisSubmit", (event) => {
  console.log("User submitted:", event.detail.message);
});

assistant.addEventListener("arcgisFeedback", (event) => {
  const { feedback } = event.detail;
  console.log("Feedback:", feedback); // { positive: true } or { positive: false }
});

assistant.addEventListener("arcgisError", (event) => {
  console.error("Assistant error:", event.detail);
});

Programmatic Message Submission

const assistant = document.querySelector("arcgis-assistant");
await assistant.componentOnReady();

// Submit a message as if the user typed it
assistant.submitMessage("Show me the top 10 features by population");

Custom Agents

Use arcgis-assistant-agent to register a custom agent with the assistant.

Defining a Custom Agent

import { invokeTextPrompt } from "@arcgis/ai-components/utils";

const assistant = document.querySelector("arcgis-assistant");
const customAgent = document.querySelector("arcgis-assistant-agent");

customAgent.agentRegistration = {
  name: "weather-agent",
  description:
    "Answers questions about current weather conditions at map locations.",
  systemPrompt:
    "You are a weather assistant. Use the provided tools to get weather data.",
  tools: [
    {
      name: "getWeather",
      description: "Get current weather for a location",
      parameters: {
        type: "object",
        properties: {
          latitude: { type: "number", description: "Latitude" },
          longitude: { type: "number", description: "Longitude" },
        },
        required: ["latitude", "longitude"],
      },
      execute: async ({ latitude, longitude }) => {
        const response = await fetch(
          `https://api.weather.gov/points/${latitude},${longitude}`,
        );
        const data = await response.json();
        return JSON.stringify(data.properties);
      },
    },
  ],
};
<arcgis-assistant reference-element="#my-map">
  <arcgis-assistant-agent></arcgis-assistant-agent>
  <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent>
</arcgis-assistant>

Utility Functions for Custom Agents

FunctionDescription
invokeTextPrompt(options)Send a text prompt to the LLM and get a text response
invokeStructuredPrompt(options)Send a prompt and get a structured (JSON) response
invokeToolPrompt(options)Send a prompt with tool definitions for function calling
sendTraceMessage(data)Send trace/debug messages to the assistant log
getEmbeddings(texts)Generate text embeddings for semantic search
cosineSimilarity(a, b)Compute cosine similarity between two embedding vectors

Web Map Requirements for AI Agents

For agents to work effectively with a web map:

  1. Layer metadata - Layers must have good metadata (descriptions, field aliases, tags).
  2. Embeddings - The web map should have embeddings stored as an item resource. See the Web map setup guide for details.
  3. User requirements:

- Signed-in named user of an ArcGIS Online organization (no trial/public accounts) - User must have access to the web map and its layers - AI assistants must be enabled in the organization settings - Beta apps must not be blocked in the organization settings - The user must have the role privilege to use AI assistants

Layout Patterns

Side Panel Layout (Recommended)

<calcite-shell>
  <arcgis-map id="map" item-id="YOUR_WEBMAP_ID">
    <arcgis-zoom slot="top-left"></arcgis-zoom>
    <arcgis-expand slot="top-left">
      <arcgis-legend></arcgis-legend>
    </arcgis-expand>
  </arcgis-map>
  <calcite-shell-panel slot="panel-end" width="l">
    <calcite-panel>
      <arcgis-assistant
        reference-element="#map"
        heading="Map Assistant"
        entry-message="Ask me anything about this map."
      >
        <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent>
        <arcgis-assistant-data-exploration-agent></arcgis-assistant-data-exploration-agent>
        <arcgis-assistant-help-agent></arcgis-assistant-help-agent>
      </arcgis-assistant>
    </calcite-panel>
  </calcite-shell-panel>
</calcite-shell>

Expand Widget Layout

<arcgis-map id="map" item-id="YOUR_WEBMAP_ID">
  <arcgis-zoom slot="top-left"></arcgis-zoom>
  <arcgis-expand slot="top-right">
    <arcgis-assistant
      reference-element="#map"
      heading="Assistant"
      entry-message="How can I help?"
    >
      <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent>
      <arcgis-assistant-data-exploration-agent></arcgis-assistant-data-exploration-agent>
      <arcgis-assistant-help-agent></arcgis-assistant-help-agent>
    </arcgis-assistant>
  </arcgis-expand>
</arcgis-map>

Common Pitfalls

  1. Missing reference-element: The assistant requires a reference to an arcgis-map element to provide context to agents. <!-- Anti-pattern: no reference-element --> <arcgis-assistant heading="Assistant"> <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent> </arcgis-assistant> <arcgis-map id="map" item-id="abc123"></arcgis-map> <!-- Correct: point to the map element --> <arcgis-assistant reference-element="#map" heading="Assistant"> <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent> </arcgis-assistant> <arcgis-map id="map" item-id="abc123"></arcgis-map> Impact: Agents have no map context and cannot execute navigation or data queries. They will fail silently or return errors.
  2. No agents registered: The assistant itself has no built-in intelligence - you must slot at least one agent component. <!-- Anti-pattern: assistant with no agents --> <arcgis-assistant reference-element="#map" heading="Assistant"> </arcgis-assistant> <!-- Correct: register agents as children --> <arcgis-assistant reference-element="#map" heading="Assistant"> <arcgis-assistant-navigation-agent></arcgis-assistant-navigation-agent> <arcgis-assistant-data-exploration-agent></arcgis-assistant-data-exploration-agent> <arcgis-assistant-help-agent></arcgis-assistant-help-agent> </arcgis-assistant> Impact: The user can type messages but they are never processed. No responses are generated.
  3. Unauthenticated users: AI components require a signed-in ArcGIS Online named user with AI assistant privileges. Anonymous or public users cannot use the assistant. Impact: The assistant panel may render but agent calls fail with authentication errors. Always check authentication status before showing the assistant UI.
  4. Poor layer metadata: Agents rely on layer descriptions, field aliases, and embeddings to understand the map data. Layers with missing metadata produce poor or irrelevant responses. Impact: The data exploration agent may misidentify fields or give inaccurate summaries.
  5. suggestedPrompts set as HTML attribute: The suggestedPrompts property accepts an array and can only be set via JavaScript, not as an HTML attribute. <!-- Anti-pattern: HTML attribute (won't work) --> <arcgis-assistant suggested-prompts="What is the total?"></arcgis-assistant> // Correct: set via JavaScript const assistant = document.querySelector("arcgis-assistant"); assistant.suggestedPrompts = ["What is the total population?", "Go to the largest city",]; Impact: Suggested prompts are silently ignored when set as an HTML attribute string.

Reference Samples

  • ai-assistant - AI Assistant component with navigation, data exploration, and help agents

Related Skills

  • See arcgis-core-maps for setting up the map that the assistant references.
  • See arcgis-widgets-ui for Calcite layout components (calcite-shell, calcite-shell-panel).
  • See arcgis-interaction for non-AI approaches to map interaction (popups, hit tests).

平台分布

Codex

36.37%
按下载量换算41

Claude

28.04%
按下载量换算32

Cursor

18.74%
按下载量换算21

Gemini CLI

10.11%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill arcgis-ai-components 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills