Manages scope and update sets for ServiceNow custom application development.

Install

mkdir -p .claude/skills/application-scope && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11542" && unzip -o skill.zip -d .claude/skills/application-scope && rm skill.zip

Installs to .claude/skills/application-scope

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Manage scoped application development including setting application context and update set alignment
100 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Set the current application scope in ServiceNow
  • Identify target applications for development
  • Verify or create application update sets
  • Align the update set with the application scope
  • Verify scope and update set alignment before development
  • Manage scoped application development

How it works

The skill manages ServiceNow application scope and update set alignment by identifying target applications, setting the current scope, and verifying or creating update sets to ensure proper artifact capture.

Inputs & outputs

You give it
a request to manage scoped application development in ServiceNow
You get back
properly scoped application artifacts with correct update set capture and namespace isolation

When to use application-scope

  • Setting current app scope in ServiceNow
  • Aligning development records with update sets
  • Managing namespace isolation for apps

About this skill

Application Scope Management

Overview

Scoped application development in ServiceNow requires careful management of application context and update set alignment. This skill covers setting the current application scope, understanding scoped vs global considerations, and ensuring update sets are properly aligned with application development.

  • What problem does it solve? Prevents records from being created in wrong application scopes and ensures proper update set capture for scoped applications
  • Who should use this skill? ServiceNow developers building custom scoped applications
  • What are the expected outcomes? Properly scoped application artifacts with correct update set capture and namespace isolation

Prerequisites

  • Required ServiceNow roles: admin or application_creator
  • An existing scoped application or permission to create one
  • Understanding of ServiceNow application scopes and namespaces
  • Related skills: admin/update-set-management (must understand update sets first)

Procedure

Step 1: Identify Target Application

First, find the application you want to work in.

Using MCP tools:

Tool: SN-Query-Table
Parameters:
  table_name: sys_app
  query: scope!=global^active=true
  fields: sys_id,name,scope,version,vendor
  limit: 50

Expected Response:

{
  "result": [
    {
      "sys_id": "abc123def456...",
      "name": "My Custom Application",
      "scope": "x_myco_custom_app",
      "version": "1.0.0",
      "vendor": "My Company"
    }
  ]
}

Decision Points:

  • If application exists → Proceed to Step 2
  • If application not found → Create new application (see Example 3)
  • If choosing between multiple apps → Verify scope prefix matches intended namespace

Step 2: Set Current Application Scope

Set the application context for all subsequent operations.

Using MCP tools:

Tool: SN-Set-Current-Application
Parameters:
  app_sys_id: abc123def456...

Important: This is an automated operation using the sys_trigger mechanism. It executes in approximately 1-2 seconds.

Verification:

Tool: SN-Query-Table
Parameters:
  table_name: sys_user_preference
  query: user=javascript:gs.getUserID()^name=apps.current_app
  fields: value

Step 3: Verify or Create Application Update Set

Scoped applications should have their own update sets to maintain clean separation.

Query existing update sets for the application:

Tool: SN-Query-Table
Parameters:
  table_name: sys_update_set
  query: application=abc123def456...^state=in progress
  fields: sys_id,name,state,application
  limit: 10

Decision Points:

  • If suitable update set exists → Use existing (Step 4)
  • If no update set or all completed → Create new update set

Create application-specific update set:

Tool: SN-Create-Record
Parameters:
  table_name: sys_update_set
  data:
    name: "My Custom App - Feature Development v1.1"
    application: abc123def456...
    state: in progress
    description: "Development update set for new features"

Step 4: Set Current Update Set

Align the update set with the application scope.

Using MCP tools:

Tool: SN-Set-Update-Set
Parameters:
  update_set_sys_id: xyz789ghi012...

Verification:

Tool: SN-Get-Current-Update-Set
Parameters: (none required)

Expected Response:

{
  "name": "My Custom App - Feature Development v1.1",
  "sys_id": "xyz789ghi012...",
  "state": "in progress",
  "application": "abc123def456..."
}

Step 5: Verify Scope and Update Set Alignment

Confirm both scope and update set are properly set before development.

Full verification query:

Tool: SN-Query-Table
Parameters:
  table_name: sys_update_set
  query: sys_id=xyz789ghi012...
  fields: sys_id,name,application.name,application.scope

Alignment Checklist:

  • Application scope matches intended app
  • Update set application field references correct app
  • Update set state is "in progress"
  • User has write access to the scope

Tool Usage

MCP Tools (Claude Code/Desktop)

ToolPurpose
SN-Set-Current-ApplicationSet active application scope
SN-Set-Update-SetSet active update set
SN-Get-Current-Update-SetVerify current update set
SN-Query-TableQuery applications and update sets
SN-Create-RecordCreate new update sets

REST API (ChatGPT/Other)

EndpointMethodPurpose
/api/now/table/sys_appGETList applications
/api/now/table/sys_update_setGETList update sets
/api/now/table/sys_update_setPOSTCreate update set

Note: Setting current application via REST API requires background script execution or session manipulation, which is complex. MCP tools handle this automatically.

Native Tools (Claude Code)

ToolPurpose
BashExecute curl commands for REST operations
ReadRead application configuration files

Scoped vs Global Considerations

When to Use Scoped Applications

Use Scoped Applications When:

  • Building reusable, distributable applications
  • Developing features that need namespace isolation
  • Creating applications for the ServiceNow Store
  • Building tenant-specific customizations in multi-tenant scenarios
  • Implementing features that should survive upgrades cleanly

Use Global Scope When:

  • Making small, one-off customizations
  • Modifying out-of-box ServiceNow features
  • Creating integrations that need broad table access
  • Prototyping before committing to scoped architecture

Scoped Application Benefits

BenefitDescription
Namespace IsolationTables, scripts, and UI elements prefixed with scope (e.g., x_myco_app_*)
Upgrade ProtectionScoped artifacts are isolated from platform upgrades
Dependency ManagementClear dependencies between applications
Access ControlApplication-level access restrictions
PortabilityEasy export/import via update sets or store

Scoped Application Restrictions

RestrictionImpactWorkaround
Limited GlideRecord accessCannot query all global tables by defaultRequest cross-scope access via Application Properties
Restricted APIsSome GlideSystem APIs unavailableUse allowed APIs or request elevation
UI limitationsCannot modify global UI elementsCreate scoped UI components
Script Include visibilityMust explicitly expose for cross-scopeSet accessible_from: all_application_scopes

Cross-Scope Access

To allow a scoped application to access global or other scoped tables:

Tool: SN-Create-Record
Parameters:
  table_name: sys_scope_privilege
  data:
    application: abc123def456...
    table: incident
    operation: read_write
    status: allowed

Best Practices

  • Set Scope BEFORE Update Set: Always set application scope first, then set the update set. This ensures the update set is associated with the correct application.
  • One Update Set Per Feature: Create separate update sets for distinct features or sprints to enable granular deployments
  • Naming Convention: Use consistent naming: {App Name} - {Feature/Sprint} - {Version} (e.g., "My App - User Portal v1.2")
  • Verify Before Development: Run the full verification procedure (Steps 1-5) at the start of each development session
  • Application-Aligned Update Sets: Always create update sets with the application field set to your scoped app's sys_id
  • Scope Prefix Consistency: Maintain consistent scope prefixes across related applications (e.g., x_myco_*)

Troubleshooting

Common Issue 1: Records Created in Wrong Scope

Symptom: New records appear in Global scope instead of intended application Cause: Application scope not set before record creation Solution:

  1. Set application scope using SN-Set-Current-Application
  2. Verify scope is active by querying sys_user_preference
  3. Delete incorrectly scoped records and recreate

Common Issue 2: Update Set Not Capturing Records

Symptom: Changes not appearing in update set Cause: Update set not aligned with application scope or update set not active Solution:

  1. Verify update set application field matches current scope
  2. Confirm update set state is "in progress"
  3. Check that the table being modified is captured in update sets (some tables excluded)

Common Issue 3: Cannot Set Application Scope

Symptom: SN-Set-Current-Application fails or has no effect Cause: Insufficient permissions or application not found Solution:

  1. Verify user has admin or application_creator role
  2. Confirm app_sys_id is correct and application exists
  3. Check application is active (not retired)

Common Issue 4: Cross-Scope Access Denied

Symptom: GlideRecord queries return no results or throw errors Cause: Scoped application lacks permission to access target table Solution:

  1. Create sys_scope_privilege record granting access
  2. Or modify script include to use GlideRecordSecure with elevated privileges
  3. Request cross-scope access in Application Properties

Common Issue 5: Update Set Associated with Wrong Application

Symptom: Update set exists but linked to Global or different app Cause: Update set created before setting application scope Solution:

  1. Update the update set's application field:
Tool: SN-Update-Record
Parameters:
  table_name: sys_update_set
  sys_id: xyz789ghi012...
  data:
    application: abc123def456...
  1. Move existing records to new application-aligned update set if needed

Examples

Example 1: Standard Development Session Setup

Complete setup for starting a scoped development session:

# Step 1: Find application
Tool: SN-Query-Table
Parameters:
  table_name: sys_app
  query: scope=x_myco_custom_app
  f

---

*Content truncated.*

When not to use it

  • When the task involves managing update sets in detail
  • When the task involves switching instances for scoped development
  • When the task involves deploying scoped applications across instances

Prerequisites

Required ServiceNow roles: admin or application_creatorAn existing scoped application or permission to create oneUnderstanding of ServiceNow application scopes and namespacesRelated skills: admin/update-set-management (must understand update sets first)

Limitations

  • The skill focuses on managing application context and update set alignment.
  • The skill requires specific ServiceNow roles.
  • The skill requires an understanding of ServiceNow application scopes and namespaces.

How it compares

This skill automates the critical steps of setting application scope and aligning update sets in ServiceNow, preventing common errors and ensuring proper isolation, which is more reliable than manual configuration.

Compared to similar skills

application-scope side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
application-scope (this skill)06moReviewIntermediate
command-development169moReviewIntermediate
skill-forge119moReviewIntermediate
codex-skill125moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

command-development

anthropics

This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.

16133

skill-forge

WilliamSaysX

Automated skill creation workshop with intelligent source detection, smart path management, and end-to-end workflow automation. This skill should be used when users want to create a new skill or convert external resources (GitHub repositories, online documentation, or local directories) into a skill. Automatically fetches, organizes, and packages skills with proactive cleanup management.

11115

codex-skill

feiskyer

Use when user asks to leverage codex, gpt-5, or gpt-5.1 to implement something (usually implement a plan or feature designed by Claude). Provides non-interactive automation mode for hands-off task execution without approval prompts.

12110

agent-factory

alirezarezvani

Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

8109

subagent-driven-development

davila7

Use when executing implementation plans with independent tasks in the current session

1493

peekaboo

openclaw

Capture and automate macOS UI with the Peekaboo CLI.

1486

Search skills

Search the agent skills registry