Token导航 LogoToken导航

Agent Skill · 研究检索

discovery-patterns(发现模式)

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

discovery-patterns 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 40,251。

总安装 1,309周安装 54GitHub Stars 63下载 428核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/groeimetai/snow-flow --skill discovery-patterns

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

discovery-patterns 解析 ServiceNow CMDB 自动发现机制,提供网络扫描与资产识别规则配置参考。适用于 IT 运维人员理解配置项(CI)整理逻辑与数据入库流程。包含 MID Server 架构说明与关键数据表定义,可用于故障排查与性能调优。

输出为技术文档而非操作指南,实际部署需配合具体实例环境参数调整。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/discovery-patterns

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/groeimetai/snow-flow --skill discovery-pattern…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

discovery-patterns 怎么安装?

在终端执行 npx skills add https://github.com/groeimetai/snow-flow --skill discovery-patterns。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

discovery-patterns 支持哪些 AI 工具?

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

discovery-patterns 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

discovery-patterns 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

discovery-patterns 用的人多吗?

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

discovery-patterns 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
discovery-patterns

发现模式 · 本页

1,30963需要联网MIT有提醒

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

SKILL.md 原文

Discovery Patterns for ServiceNow

Discovery automatically populates the CMDB by scanning networks and systems.

Discovery Architecture

Discovery Schedule
    ↓
MID Server
    ↓
Probes (collect data)
    ↓
Sensors (process data)
    ↓
Identification Rules (match/create CIs)
    ↓
CMDB Population

Key Tables

TablePurpose
discovery_scheduleDiscovery schedules
discovery_credentialsDiscovery credentials
discovery_rangeIP ranges to scan
cmdb_identification_ruleCI identification
ecc_agentMID Server records
discovery_statusDiscovery run status

Discovery Schedules (ES5)

Create Discovery Schedule

// Create discovery schedule (ES5 ONLY!)
var schedule = new GlideRecord("discovery_schedule")
schedule.initialize()

// Basic info
schedule.setValue("name", "Data Center Discovery")
schedule.setValue("description", "Weekly discovery of data center infrastructure")

// Type
schedule.setValue("discover", "IP") // IP, CI, Cloud Resources

// Schedule
schedule.setValue("run_type", "weekly")
schedule.setValue("run_dayofweek", "sunday")
schedule.setValue("run_time", "02:00:00")

// MID Server
schedule.setValue("mid_server", getMIDServerSysId("DataCenterMID"))

// Enable
schedule.setValue("active", true)

var scheduleSysId = schedule.insert()

// Add IP range
addDiscoveryRange(scheduleSysId, "10.0.0.0", "10.0.255.255", "Data Center Network")

Add Discovery Range

// Add IP range to discovery schedule (ES5 ONLY!)
function addDiscoveryRange(scheduleSysId, startIP, endIP, name) {
  var range = new GlideRecord("discovery_range")
  range.initialize()
  range.setValue("schedule", scheduleSysId)
  range.setValue("name", name)
  range.setValue("type", "range")
  range.setValue("range_start", startIP)
  range.setValue("range_end", endIP)
  range.setValue("active", true)
  return range.insert()
}

// Add CIDR range
function addDiscoveryCIDR(scheduleSysId, cidr, name) {
  var range = new GlideRecord("discovery_range")
  range.initialize()
  range.setValue("schedule", scheduleSysId)
  range.setValue("name", name)
  range.setValue("type", "cidr")
  range.setValue("range", cidr) // e.g., '10.0.0.0/24'
  range.setValue("active", true)
  return range.insert()
}

Discovery Credentials (ES5)

Create Credentials

// Create Windows credential (ES5 ONLY!)
var cred = new GlideRecord("discovery_credentials")
cred.initialize()
cred.setValue("name", "Windows Domain Admin")
cred.setValue("type", "windows")
cred.setValue("user_name", "domain\\admin")
cred.setValue("password", "") // Set via secure method
cred.setValue("active", true)

// Credential order
cred.setValue("order", 100)

// Assign to credential affinity
cred.setValue("credential_alias", credentialAliasSysId)

cred.insert()

Credential Affinity

// Create credential affinity (map credentials to IP ranges) (ES5 ONLY!)
var affinity = new GlideRecord("dscy_credentials_affinity")
affinity.initialize()
affinity.setValue("credential", credentialSysId)
affinity.setValue("range", discoveryRangeSysId)
affinity.setValue("order", 100)
affinity.insert()

Custom Probes and Sensors (ES5)

Custom Probe

// Create custom probe script (ES5 ONLY!)
// Probes run on MID Server to collect data

// Table: discovery_probes_script
var probe = new GlideRecord("discovery_probes_script")
probe.initialize()
probe.setValue("name", "Custom Application Version")
probe.setValue("active", true)

// Probe script (runs on MID Server - ES5 ONLY!)
probe.setValue(
  "script",
  "var output = {};\n" +
    "\n" +
    "// Command to run\n" +
    'var cmd = "cat /opt/myapp/version.txt";\n' +
    "\n" +
    "try {\n" +
    "    var result = Packages.com.service_now.mid.probe.tpcon.OperatingSystemCommand.execute(cmd);\n" +
    "    output.app_version = result.getOutput().trim();\n" +
    "    output.success = true;\n" +
    "} catch (e) {\n" +
    "    output.success = false;\n" +
    "    output.error = e.message;\n" +
    "}\n" +
    "\n" +
    "output;",
)

probe.insert()

Custom Sensor

// Create custom sensor (ES5 ONLY!)
// Sensors run on ServiceNow instance to process probe results

// Table: discovery_sensors_script
var sensor = new GlideRecord("discovery_sensors_script")
sensor.initialize()
sensor.setValue("name", "Process Custom Application Version")
sensor.setValue("active", true)
sensor.setValue("probe", probeSysId)

// Sensor script (runs on instance - ES5 ONLY!)
sensor.setValue(
  "script",
  "(function process(result, source) {\n" +
    "    var output = JSON.parse(result.output);\n" +
    "    \n" +
    "    if (!output.success) {\n" +
    '        gs.warn("Custom app discovery failed: " + output.error);\n' +
    "        return;\n" +
    "    }\n" +
    "    \n" +
    "    // Find or create CI\n" +
    "    var ci = source.getDeviceRecord();\n" +
    "    if (ci) {\n" +
    "        ci.u_custom_app_version = output.app_version;\n" +
    "        ci.update();\n" +
    '        gs.info("Updated CI with app version: " + output.app_version);\n' +
    "    }\n" +
    "})(result, source);",
)

sensor.insert()

Identification Rules (ES5)

CI Identification Rule

// Create identification rule (ES5 ONLY!)
var rule = new GlideRecord("cmdb_identifier")
rule.initialize()

rule.setValue("name", "Server Identification")
rule.setValue("table", "cmdb_ci_server")
rule.setValue("active", true)

// Priority (lower = higher priority)
rule.setValue("order", 100)

// Identification entries (criteria)
rule.insert()

// Add identification criteria
var entry = new GlideRecord("cmdb_identifier_entry")
entry.initialize()
entry.setValue("identifier", rule.getUniqueValue())
entry.setValue("criterion_attributes", "serial_number") // Match by serial
entry.setValue("search_type", "equals")
entry.setValue("active", true)
entry.insert()

Custom Identification Script

// Identification script for complex matching (ES5 ONLY!)
// Table: cmdb_identifier_script

var script = new GlideRecord("cmdb_identifier_script")
script.initialize()
script.setValue("name", "Custom Server Match")
script.setValue("table", "cmdb_ci_server")
script.setValue("active", true)

script.setValue(
  "script",
  "(function identify(source) {\n" +
    '    var serial = source.getValue("serial_number");\n' +
    '    var hostname = source.getValue("name");\n' +
    "    \n" +
    "    // Try serial match first\n" +
    '    var gr = new GlideRecord("cmdb_ci_server");\n' +
    "    if (serial) {\n" +
    '        gr.addQuery("serial_number", serial);\n' +
    "        gr.query();\n" +
    "        if (gr.next()) {\n" +
    "            return gr.getUniqueValue();\n" +
    "        }\n" +
    "    }\n" +
    "    \n" +
    "    // Try hostname + IP match\n" +
    '    gr = new GlideRecord("cmdb_ci_server");\n' +
    '    gr.addQuery("name", hostname);\n' +
    '    gr.addQuery("ip_address", source.getValue("ip_address"));\n' +
    "    gr.query();\n" +
    "    if (gr.next()) {\n" +
    "        return gr.getUniqueValue();\n" +
    "    }\n" +
    "    \n" +
    "    // No match - return null to create new CI\n" +
    "    return null;\n" +
    "})(source);",
)

script.insert()

Discovery Status (ES5)

Monitor Discovery Status

// Check discovery run status (ES5 ONLY!)
function getDiscoveryStatus(scheduleSysId) {
  var status = new GlideRecord("discovery_status")
  status.addQuery("dscheduler", scheduleSysId)
  status.orderByDesc("sys_created_on")
  status.setLimit(1)
  status.query()

  if (status.next()) {
    return {
      state: status.state.getDisplayValue(),
      started: status.getValue("started"),
      completed: status.getValue("completed"),
      devices_found: status.getValue("devices_found"),
      devices_completed: status.getValue("devices_completed"),
      errors: status.getValue("error_count"),
    }
  }
  return null
}

Discovery Device Results

// Get discovered devices from a run (ES5 ONLY!)
function getDiscoveredDevices(statusSysId) {
  var devices = []

  var device = new GlideRecord("discovery_device_history")
  device.addQuery("status", statusSysId)
  device.query()

  while (device.next()) {
    devices.push({
      ip_address: device.getValue("source"),
      ci: device.cmdb_ci.getDisplayValue(),
      ci_class: device.getValue("ci_type"),
      state: device.state.getDisplayValue(),
      issues: device.getValue("issue_count"),
    })
  }

  return devices
}

MCP Tool Integration

Available Tools

ToolPurpose
snow_query_tableQuery discovery tables
snow_find_artifactFind discovery configs
snow_execute_script_with_outputTest discovery scripts
snow_cmdb_searchSearch discovered CIs

Example Workflow

// 1. Query active schedules
await snow_query_table({
  table: "discovery_schedule",
  query: "active=true",
  fields: "name,discover,run_type,mid_server",
})

// 2. Check recent discovery status
await snow_execute_script_with_output({
  script: `
        var status = getDiscoveryStatus('schedule_sys_id');
        gs.info(JSON.stringify(status));
    `,
})

// 3. Find discovery errors
await snow_query_table({
  table: "discovery_log",
  query: "level=error^sys_created_on>=javascript:gs.daysAgo(1)",
  fields: "message,source,sys_created_on",
})

Best Practices

  1. Credential Security - Use credential vault
  2. Schedule Off-Peak - Minimize network impact
  3. Range Management - Organize by network segment
  4. MID Server - Proper placement and sizing
  5. Identification - Clear matching criteria
  6. Reconciliation - Regular CMDB validation
  7. Monitoring - Track discovery health
  8. ES5 Only - No modern JavaScript syntax

平台分布

Claude Code

27.71%
按下载量换算119

Gemini CLI

21.12%
按下载量换算90

Antigravity

17.1%
按下载量换算73

windsurf

12.55%
按下载量换算54

Codex

7.47%
按下载量换算32

OpenCode

3.61%
按下载量换算15

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills