happy-technologies-llc/happy-platform-skills/application-scope
Claude Code and agent skill by happy-technologies-llc/happy-platform-skills
- community
Checking that the SKILL.md file is still in the repository.
Manage scoped application development including setting application context and update set alignment
Install
npx vskill@latest install happy-technologies-llc/happy-platform-skills/application-scopeSKILL.md
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:
adminorapplication_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:
Expected Response:
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:
Important: The tool switches scope through the UI application picker and reads the picker back in the same session. It reports success, with the previous scope, only when the change took effect; otherwise it returns an error. Pass global as app_sys_id to return to the Global scope.
Verification:
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:
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:
Step 4: Set Current Update Set
Align the update set with the application scope.
Using MCP tools:
The tool also uses the UI picker and verifies the change in the same session; the response names the previous update set. If the change cannot be verified, no success is reported and the tool writes a fix script to ./scripts for manual execution in Scripts - Background. It has no scheduled-job fallback.
Verification:
Expected Response:
Step 5: Verify Scope and Update Set Alignment
Confirm both scope and update set are properly set before development.
Full verification query:
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)
| Tool | Purpose | |
|---|---|---|
SN-Set-Current-Application | Set active application scope | |
SN-Set-Update-Set | Set active update set | |
SN-Get-Current-Update-Set | Verify current update set | |
SN-Query-Table | Query applications and update sets | |
SN-Create-Record | Create new update sets |
REST API (ChatGPT/Other)
| Endpoint | Method | Purpose | |
|---|---|---|---|
/api/now/table/sys_app | GET | List applications | |
/api/now/table/sys_update_set | GET | List update sets | |
/api/now/table/sys_update_set | POST | Create 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)
| Tool | Purpose | |
|---|---|---|
Bash | Execute curl commands for REST operations | |
Read | Read 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
| Benefit | Description | |
|---|---|---|
| Namespace Isolation | Tables, scripts, and UI elements prefixed with scope (e.g., x_myco_app_*) | |
| Upgrade Protection | Scoped artifacts are isolated from platform upgrades | |
| Dependency Management | Clear dependencies between applications | |
| Access Control | Application-level access restrictions | |
| Portability | Easy export/import via update sets or store |
Scoped Application Restrictions
| Restriction | Impact | Workaround | |
|---|---|---|---|
| Limited GlideRecord access | Cannot query all global tables by default | Request cross-scope access via Application Properties | |
| Restricted APIs | Some GlideSystem APIs unavailable | Use allowed APIs or request elevation | |
| UI limitations | Cannot modify global UI elements | Create scoped UI components | |
| Script Include visibility | Must explicitly expose for cross-scope | Set accessible_from: all_application_scopes |
Cross-Scope Access
To allow a scoped application to access global or other scoped tables:
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
applicationfield 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:
- Set application scope using
SN-Set-Current-Application - Verify scope is active by querying sys_user_preference
- 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:
- Verify update set
applicationfield matches current scope - Confirm update set state is "in progress"
- 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:
- Verify user has
adminorapplication_creatorrole - Confirm app_sys_id is correct and application exists
- 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:
- Create sys_scope_privilege record granting access
- Or modify script include to use
GlideRecordSecurewith elevated privileges - 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:
- Update the update set's
applicationfield:
- 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:
Example 2: Create New Update Set for Application
Create a properly aligned update set:
Example 3: Create New Scoped Application
Create a new scoped application from scratch:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/admin/application-scope/SKILL.md
Popularity
- Repository stars
- 29
- Repository forks
- 11
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/happy-technologies-llc/happy-platform-skills/application-scope)