Read-only CLI access to ServiceNow Table, Attachment, Aggregate, and Service Catalog APIs; includes schema inspection and history retrieval (read-only).
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install servicenow-agent或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install servicenow-agent⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/servicenow-agent/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: servicenow-agent description: Read-only CLI access to ServiceNow Table, Attachment, Aggregate, and Service Catalog APIs; includes schema inspection and history retrieval (read-only). read_when: - Need to read ServiceNow Table API records - Need to query a table or fetch a record by sys_id - Need to download attachment content or metadata - Need aggregate statistics or service catalog variables metadata: {"clawdbot":{"emoji":"🧾","requires":{"bins":["node"]}}} ---
Use this skill to read data from ServiceNow via the Table API. Do not create or update or delete records.
Set these environment variables in the .env file in this folder.
If your domain already includes https:// then use it as is. Otherwise requests should be made to:
https://$SERVICENOW_DOMAIN
Use only the GET endpoints from these files.
Never use POST or PUT or PATCH or DELETE.
See openapi.yaml for the full list of parameters.
Use the bundled CLI for all reads. It pulls auth from .env by default. You can override with flags.
Use any of these as --sysparm_* flags.
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
Attachment metadata and file download.
node cli.mjs attach list --sysparm_query "table_name=incident" --sysparm_limit 5
node cli.mjs attach file <sys_id> --out /tmp/attachment.bin
Aggregate stats.
node cli.mjs stats incident --sysparm_query "active=true^priority=1" --sysparm_count true
Service Catalog read only GETs.
node cli.mjs sc catalogs --sysparm_text "laptop" --sysparm_limit 5
node cli.mjs sc items --sysparm_text "mac" --sysparm_limit 5
node cli.mjs sc item <sys_id>
node cli.mjs sc item-variables <sys_id>
Use this if you are unsure of a field name.
node cli.mjs schema incident
Use this to read the full conversation instead of just the current state.
node cli.mjs history incident <sys_id>
Create JSON batch files under specialists/ to run multiple reads at once.
Each entry supports sysparm_* fields plus these items.
Run a batch preset.
node cli.mjs batch specialists/incidents.json --pretty
The Table API returns JSON by default. Results appear under result.
--sysparm_text terms or increase --sysparm_limit.sysparm_display_value is enabled by default for table reads to return human-friendly values (e.g., user names instead of sys_ids). If you need raw system ids, pass --sysparm_display_value false.--sysparm_limit small for agent-initiated queries to avoid large payloads and timeouts. Prefer stats for counts or aggregates instead of downloading many rows.attach list/attach get; use attach file --out to download binary content for local analysis.schema) avoids guessing field names and is the recommended first step before reading unknown tables.history) fetches journal entries (comments/work_notes) from sys_journal_field and is useful to read the full conversation thread for a ticket.--pretty to make JSON outputs readable for human review and to help the agent summarize long results.I recommend these specialist JSON presets under specialists/ to speed up common read workflows. They are safe (read-only) and demonstrate how to combine related reads.
1) specialists/inspect_incident_schema.json — schema inspection for incident:
[
{
"name": "schema-incident",
"table": "sys_dictionary",
"sysparm_query": "name=incident^elementISNOTEMPTY",
"sysparm_fields": "element,column_label,internal_type,reference",
"sysparm_limit": 500
}
]
2) specialists/incident_history_template.json — history template (replace with the target sys_id before running):
...
安装 ServiceNow Agent 后,可以对 AI 说这些话来触发它
Help me get started with ServiceNow Agent
Explains what ServiceNow Agent does, walks through the setup, and runs a quick demo based on your current project
Use ServiceNow Agent to read-only CLI access to ServiceNow Table, Attachment, Aggregate, an...
Invokes ServiceNow Agent with the right parameters and returns the result directly in the conversation
What can I do with ServiceNow Agent in my developer & devops workflow?
Lists the top use cases for ServiceNow Agent, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/servicenow-agent/ 目录(个人级,所有项目可用),或 .claude/skills/servicenow-agent/(项目级)。重启 AI 客户端后,用 /servicenow-agent 主动调用,或让 AI 根据上下文自动发现并使用。
ServiceNow Agent 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
ServiceNow Agent 可免费安装使用。请查阅仓库了解许可证信息。
Read-only CLI access to ServiceNow Table, Attachment, Aggregate, and Service Catalog APIs; includes schema inspection and history retrieval (read-only).
ServiceNow Agent 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using ServiceNow Agent
Identifies repetitive steps in your workflow and sets up ServiceNow Agent to handle them automatically