skills/admin/instance-management/SKILL.md
Manage multiple ServiceNow instances including switching between dev/test/prod environments
npx skillsauth add happy-technologies-llc/happy-servicenow-skills instance-managementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Multi-instance management is essential for ServiceNow development workflows that span development, testing, and production environments. This skill covers safely switching between instances, verifying current context, and following best practices for environment-specific operations.
admin or itil (varies by operation)config/servicenow-instances.jsonadmin/update-set-management (for update set operations after switching)First, identify all configured instances and their current status.
Using MCP tools:
Tool: SN-List-Instances
Parameters: (none required)
Expected Response:
{
"instances": [
{
"name": "dev",
"url": "https://dev12345.service-now.com",
"default": true,
"status": "connected"
},
{
"name": "test",
"url": "https://test12345.service-now.com",
"default": false,
"status": "available"
},
{
"name": "prod",
"url": "https://prod12345.service-now.com",
"default": false,
"status": "available"
}
]
}
Before making any changes, confirm which instance is currently active.
Using MCP tools:
Tool: SN-Get-Current-Instance
Parameters: (none required)
Decision Points:
Route operations to a specific instance by including the instance parameter.
Using MCP tools (per-operation targeting):
Tool: SN-Query-Table
Parameters:
table_name: sys_properties
query: name=glide.installation.name
fields: name,value
instance: dev
Important: The instance parameter must be included on EVERY operation that should target a specific instance. There is no persistent "current instance" state that persists across operations.
Confirm the operation executed on the correct instance by checking instance-specific identifiers.
Using MCP tools:
Tool: SN-Query-Table
Parameters:
table_name: sys_properties
query: name=instance_name^ORname=glide.installation.name
fields: name,value
instance: dev
Verification Checklist:
Once verified, perform your intended operations with the instance parameter.
Example: Query incidents on production:
Tool: SN-Query-Table
Parameters:
table_name: incident
query: active=true^priority=1
fields: number,short_description,state,assigned_to
limit: 10
instance: prod
Example: Create record on development:
Tool: SN-Create-Record
Parameters:
table_name: sys_properties
data:
name: x_custom.feature_flag
value: enabled
instance: dev
| Tool | Purpose | Instance Parameter |
|------|---------|-------------------|
| SN-List-Instances | List all configured instances | N/A |
| SN-Get-Current-Instance | Get default instance info | N/A |
| SN-Query-Table | Query records on specific instance | Required for non-default |
| SN-Create-Record | Create records on specific instance | Required for non-default |
| SN-Update-Record | Update records on specific instance | Required for non-default |
| SN-Execute-Background-Script | Run scripts on specific instance | Required for non-default |
| Endpoint | Method | Purpose |
|----------|--------|---------|
| {instance_url}/api/now/table/sys_properties | GET | Query instance properties |
| {instance_url}/api/now/table/incident | GET | Query incidents |
Note: For REST API, target different instances by using different base URLs in your requests.
| Tool | Purpose |
|------|---------|
| Bash | Execute curl commands with instance-specific URLs |
| Read | Read instance configuration files |
Located at config/servicenow-instances.json:
{
"instances": [
{
"name": "dev",
"url": "https://dev12345.service-now.com",
"username": "admin",
"password": "${DEV_SN_PASSWORD}",
"default": true
},
{
"name": "test",
"url": "https://test12345.service-now.com",
"username": "integration_user",
"password": "${TEST_SN_PASSWORD}",
"default": false
},
{
"name": "prod",
"url": "https://prod12345.service-now.com",
"username": "integration_user",
"password": "${PROD_SN_PASSWORD}",
"default": false
}
]
}
Store credentials securely using environment variables:
# Development
export DEV_SN_PASSWORD="dev_password_here"
# Test
export TEST_SN_PASSWORD="test_password_here"
# Production (use restricted access)
export PROD_SN_PASSWORD="prod_password_here"
instance parameter explicitly rather than relying on defaults for critical operationsSymptom: Operations fail with "Unable to connect to instance" Cause: Network issues, incorrect URL, or firewall restrictions Solution:
curl -u username:password https://instance.service-now.com/api/now/table/sys_properties?sysparm_limit=1Symptom: 401 Unauthorized errors Cause: Invalid credentials or locked account Solution:
Symptom: Operation succeeded but on wrong instance
Cause: Missing or incorrect instance parameter
Solution:
instance parameterSymptom: 403 Forbidden on one instance but not others Cause: Different ACL configurations or role assignments per instance Solution:
Query production incidents without risk of modification:
# Step 1: Verify targeting production
Tool: SN-Query-Table
Parameters:
table_name: sys_properties
query: name=instance_name
fields: value
instance: prod
# Step 2: Query incidents (read-only operation)
Tool: SN-Query-Table
Parameters:
table_name: incident
query: active=true^priority=1^state!=6
fields: number,short_description,state,assigned_to,sys_updated_on
limit: 25
instance: prod
Compare record counts across environments:
# Query dev instance
Tool: SN-Query-Table
Parameters:
table_name: incident
query: active=true
fields: sys_id
limit: 1
instance: dev
# Query test instance (parallel call)
Tool: SN-Query-Table
Parameters:
table_name: incident
query: active=true
fields: sys_id
limit: 1
instance: test
Verify connectivity to all instances:
# Check dev
Tool: SN-Query-Table
Parameters:
table_name: sys_properties
query: name=glide.installation.name
fields: value
instance: dev
# Check test (parallel)
Tool: SN-Query-Table
Parameters:
table_name: sys_properties
query: name=glide.installation.name
fields: value
instance: test
# Check prod (parallel)
Tool: SN-Query-Table
Parameters:
table_name: sys_properties
query: name=glide.installation.name
fields: value
instance: prod
Set update set on specific instance:
# First, set application scope on dev
Tool: SN-Set-Current-Application
Parameters:
app_sys_id: abc123def456...
instance: dev
# Then, set update set on dev
Tool: SN-Set-Update-Set
Parameters:
update_set_sys_id: xyz789ghi012...
instance: dev
# Verify update set is active
Tool: SN-Get-Current-Update-Set
Parameters:
instance: dev
admin/update-set-management - Managing update sets (often done after instance switching)admin/application-scope - Setting application scope for scoped developmentadmin/deployment-workflow - Deploying changes across instancesadmin/batch-operations - Performing bulk operations on specific instancestesting
Manage supplier onboarding, qualification, performance monitoring, and offboarding with auditable lifecycle controls
tools
Identify emerging risks, prioritize intake signals, and route candidates into formal GRC risk assessment workflows
documentation
Screen inbound documents for completeness, policy risk, and routing readiness before extraction or case workflows
testing
Generate concise task summaries with status, timeline, blockers, SLA risk, and recommended next actions