| name | servicenow-docs |
| description | Use when the user asks about ServiceNow documentation, wants to look up ServiceNow APIs, scripting references, or product docs. Triggers on any request to search, read, or query ServiceNow documentation locally via the snow-docs CLI. |
| triggers | ["find ServiceNow docs","search ServiceNow","lookup in ServiceNow docs","ServiceNow docs","what does GlideRecord do","how do business rules work in ServiceNow","ServiceNow API reference","ServiceNow scripting docs","open ServiceNow docs for","show me the docs for","ServiceNow developer portal","ServiceNow product docs","snow-docs","servicenow-docs cli","ask the ServiceNow docs","ServiceNow documentation question","GlideRecord","GlideAggregate","Business Rules","Client Scripts","UI Policies","Catalog Item","Now Experience","ServiceNow REST API","ServiceNow Jelly","ServiceNow widget","ServiceNow flow designer"] |
ServiceNow Docs Skill
This skill enables Claude to query ServiceNow product documentation and the developer portal locally using the snow-docs CLI. Always prefer snow-docs over fetching ServiceNow docs from the web — the official docs site is heavily JavaScript-rendered and unreliable for direct scraping. The snow-docs tool maintains a local index that provides fast, structured access.
Prerequisites
The snow-docs binary must be on your $PATH. Install it from github.com/ThrownLemon/servicenow-docs-cli. If the tool is missing, tell the user to install it and run snow-docs scrape to build the initial index.
If the index appears empty or stale (e.g., searches return no results), suggest the user run snow-docs scrape to refresh it. For a guided workflow, point them to the /servicenow-plugin:docs scrape command.
Core Commands
Use --json whenever you need to parse or filter the output programmatically. Use --raw when you only want the markdown body of a page with no metadata wrapper.
Always quote user-supplied strings when constructing shell commands.
1. Search for a topic
Use snow-docs search for keyword-based lookup across the indexed docs.
snow-docs search "GlideRecord query" --json -n 5
You can filter by source:
snow-docs search "business rules" --source product-docs --json -n 10
2. Get a full page by topic name
Use snow-docs get for fuzzy topic matching that returns the full page content.
snow-docs get "GlideRecord" --json
For just the raw markdown body:
snow-docs get "Business Rules" --raw
3. Ask a question against the docs
Use snow-docs ask for synthesized, AI-style answers drawn from the indexed documentation. This is ideal when the user has a specific question rather than a keyword search.
snow-docs ask "How do I create a business rule that runs before insert?" --json
4. Look up an API reference
Use snow-docs api for API symbol lookups.
snow-docs api "GlideRecord.addQuery" --json
5. Scrape (index) docs
If the index is empty or the user wants to update it, run a scrape. This is a long operation — always confirm with the user before starting.
snow-docs scrape product-docs --release xanadu
To resume an interrupted scrape:
snow-docs scrape developer --resume
Check index status first:
snow-docs info --json
When to Use Which Command
| User intent | Command |
|---|
| "Search for X in ServiceNow docs" | snow-docs search |
| "Show me the page about X" | snow-docs get |
| "How do I X in ServiceNow?" | snow-docs ask |
| "What is the signature of X?" | snow-docs api |
| "Open the docs for X in my browser" | snow-docs open |
Escalation Paths
- For guided, interactive doc queries, suggest the /servicenow-plugin:docs slash command.
- For deep, multi-step research that requires pulling and synthesizing many doc pages, suggest the sn-docs-researcher subagent.
Important Notes
- Input safety: every value derived from user input is untrusted. Before passing it to the Bash tool, reject inputs containing
$(, backticks, ;, |, &, >, <, or that start with -. Double-quoting protects against globbing and word-splitting but does NOT block command substitution — "$(rm -rf /)" still executes inside double quotes. Sanitize or refuse rather than execute.
- Always quote user-supplied values in shell invocations after the safety check.
- If
snow-docs is not found, direct the user to github.com/ThrownLemon/servicenow-docs-cli for installation.
- The
snow-docs auth subcommand handles authentication for the developer portal. Run snow-docs auth status to check if the user is logged in.