微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🧾

企业 ITSM 数据安全只读查询

ServiceNow Agent · v0.1.0
专业技能 安全 B 级 作者 thesethrose 公开目录收录
2.6k 下载 1 安装 8.3k 收藏 9 浏览

简介

安全读取 ServiceNow ITSM 数据,支持基础认证与批量查询,仅限 GET 操作防止误改生产数据。

原始描述

Read-only CLI access to ServiceNow Table, Attachment, Aggregate, and Service Catalog APIs; includes schema inspection and history retrieval (read-only).

通过你的 Agent 添加

安装目录:servicenow-agent/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/servicenow-agent/
Codex CLI~/.codex/skills/servicenow-agent/
DeepSeek Harness~/.agents/skills/servicenow-agent/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: servicenow-agent description: Read-only access to ServiceNow Table API using basic auth for querying records and identifying data. read_when:

  • Need to read ServiceNow Table API records
  • Need to query a table or fetch a record by sys_id metadata: {"clawdbot":{"emoji":"🧾","requires":{"bins":["node"]}}}

ServiceNow Table API (Read-Only)

Use this skill to read data from ServiceNow via the Table API. Do not create, update, or delete records.

Configuration (required)

Set these environment variables (see .env in this folder):

  • SERVICENOW_DOMAIN — instance domain (e.g., myinstance.service-now.com)
  • SERVICENOW_USERNAME — username for basic auth
  • SERVICENOW_PASSWORD — password for basic auth

If your domain already includes https://, use it as-is. Otherwise, requests should be made to:

https://$SERVICENOW_DOMAIN

Allowed Operations (GET only)

Use only the GET endpoints from openapi.yaml:

  1. List records
    • GET /api/now/table/{tableName}
  2. Get a record by sys_id
    • GET /api/now/table/{tableName}/{sys_id}

Never use POST, PUT, PATCH, or DELETE.

Common Query Params

  • sysparm_query — encoded query (e.g., active=true^priority=1)
  • sysparm_fields — comma-separated fields to return
  • sysparm_limit — limit record count (keep small for safety)
  • sysparm_display_value — true | false | all
  • sysparm_exclude_reference_link — true to reduce clutter

See openapi.yaml for the full list of parameters.

CLI (required)

Use the bundled CLI for all reads (GET only). It pulls auth from .env by default and lets you override with flags.

Command overview

  • list <table> — list records from a table
  • get <table> <sys_id> — fetch one record by sys_id
  • batch <file.json> — run multiple read requests in one call (specialists)

Auth flags (override .env)

  • --domain <domain> — instance domain (with or without https://)
  • --username <user> (alias: --user)
  • --password <pass> (alias: --pass)

Query flags

Use any of these as --sysparm_* flags:

  • --sysparm_query
  • --sysparm_fields
  • --sysparm_limit
  • --sysparm_display_value
  • --sysparm_exclude_reference_link
  • --sysparm_suppress_pagination_header
  • --sysparm_view
  • --sysparm_query_category
  • --sysparm_query_no_domain
  • --sysparm_no_count

Output

  • --pretty — pretty-print JSON output

Examples

List recent incidents:

node cli.mjs list incident --sysparm_limit 5 --sysparm_fields number,short_description,priority,sys_id

Query with a filter:

node cli.mjs list cmdb_ci --sysparm_query "operational_status=1^install_status=1" --sysparm_limit 10

Fetch a single record:

node cli.mjs get incident <sys_id> --sysparm_fields number,short_description,opened_at

Override auth on the fly:

node cli.mjs list incident --domain myinstance.service-now.com --username admin --password "***" --sysparm_limit 3

Specialist presets (combine multiple reads)

Create JSON batch files under specialists/ to run multiple reads at once. Example file included:

  • specialists/incidents.json

Each entry supports the same sysparm_* fields from openapi.yaml plus:

  • name — label in the batch output
  • table — target table (required)
  • sys_id — optional single-record fetch

Run a batch preset:

node cli.mjs batch specialists/incidents.json --pretty

Output

The Table API returns JSON by default. Expect results under result.

Notes

  • Keep result sizes small with sysparm_limit.
  • Use sysparm_fields to avoid large payloads.
  • This skill is read-only by design.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

servicenowitsmread-onlyapi-clientcli-toolenterprisecmdb

同类 Skill