oracle/netsuite-suitecloud-sdkSee repository29 files

Netsuite Sdf Safe Guide

Comprehensive NetSuite SDF best practices based on the SAFE Guide (12 principles + appendices). Generates Object XML for all 14 script types, enforces governance limits, security patterns, and defensive coding. Includes N/cache, N/query, concurrency limits, OAuth 2.0 guidance, legacy TBA guardrails, CustomTool runtime patterns, REST Web Services (2026.1 features), and 140+ documented pitfalls. Essential for SuiteApp and Account Customization development.

Specification
Skill ID
oracle/netsuite-suitecloud-sdk/netsuite-sdf-safe-guide
Publisher
oracle
Repository
netsuite-suitecloud-sdk
Installs
0
Files
29
License
See repository
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

oracle/netsuite-suitecloud-sdk/netsuite-sdf-safe-guideInstalls these files
  • SKILL.md
  • quick-reference.md
  • references/01-understand-netsuite-features.md
  • references/02-governance-usage-units.md
  • references/03-performance-optimization.md
  • references/04-multi-suiteapp-environment.md
  • references/05-security-privacy.md
  • references/06-testing-suiteapps.md
  • references/07-managed-distribution.md
  • references/08-maintenance.md
  • references/09-agreements-licensing.md
  • references/10-open-source-third-party.md
  • references/11-security-best-practices.md
  • references/12-uif-spa-best-practices.md
  • references/appendices/appendix-application-xml.md
  • references/appendices/appendix-concurrency-cheatsheet.md
  • references/appendices/appendix-customtool-runtime.md
  • references/appendices/appendix-manifest-features.md
  • references/appendices/appendix-ncache-sample.md
  • references/appendices/appendix-ndataset-formulas.md
  • references/appendices/appendix-ndataset-record-types.md
  • references/appendices/appendix-nquery-joins.md
  • references/appendices/appendix-perf-queries.md
  • references/appendices/appendix-perf-timing.md
  • references/appendices/appendix-soap-rest-migration.md
  • references/appendices/appendix-suitetalk-rest.md
  • references/appendices/appendix-uif-component-patterns.md
  • references/examples-catalog.md
  • references/safe-guide-index.md

What this skill tells the agent

NetSuite SDF Safe Guide

Description

Comprehensive guide for NetSuite SuiteCloud Development Framework (SDF) projects, incorporating the SAFE Guide (SuiteApp Architecture Framework for Excellence) principles. This skill provides:

  • SAFE Guide Integration: 12 principles covering features, governance, performance, multi-SuiteApp environments, security, testing, distribution, maintenance, licensing, open-source compliance, secure coding, and UIF SPA best practices
  • Object XML Generation: Automatically creates deployment XML files for all 14 SuiteScript types
  • Best Practices Enforcement: Ensures correct deployment configurations, permissions, and status values
  • Common Pitfalls Documentation: 140+ documented pitfalls with solutions learned from real deployments
  • Performance Guidance: N/cache patterns, N/query with SuiteQL, avoiding N+1 queries, batch operations, Map/Reduce optimization
  • Architecture Patterns: Suitelet-as-API pattern, popup communication with postMessage, module-level initialization
  • Defensive Coding: Patterns for scripts to coexist with other scripts, workflows, and SuiteApps
  • Governance & Limits: Usage unit limits by script type, concurrency limits, API costs, time limits
  • Security: OWASP principles, input validation, secure coding practices
  • Appendices: Concurrency limits, N/query joins, N/cache samples, and other static reference material

How to Use This Skill

Manual Invocation (Slash Command)

Invoke this skill at any time by typing:

/netsuite-sdf-safe-guide

Or use natural language triggers:

  • "Generate objects" – Scan SuiteScripts folder and create missing Object XML files.
  • "Create object for this script" – Generate Object XML for the current/specified file.
  • "Check my deployment XML" – Review and validate existing Object XML files.
  • "Review my SuiteScript" – Review code for best practices, pitfalls, and governance issues.

Optional Coding Assistant Activation Example

For NetSuite SuiteCloud Development Framework (SDF) projects, supported coding assistants may preload this skill from project settings.

Here is an example for Claude, which is one of the supported coding assistants: Step 1: Create or edit .claude/settings.local.json in your SDF project root:

{
  "permissions": {
    "allow": [
      "Skill(netsuite-sdf-safe-guide)"
    ]
  }
}

Step 2 (Optional): Add additional related skills and permissions:

{
  "permissions": {
    "allow": [
      "Skill(netsuite-sdf-safe-guide)",
      "Skill(netsuite-suitescript-learning)",
      "Bash(suitecloud project:deploy:*)"
    ]
  }
}

With skill preloading configured, an assistant will automatically apply SDF best practices when you:

  • Work on any NetSuite SDF project (SuiteApps or Account Customization projects).
  • Create or modify SuiteScript files (all 14 script types including Suitelets, RESTlets, User Event Scripts, etc.).
  • Work with Object XML files, custom records, custom fields, or other SDF objects.
  • Configure deployment settings, manifest.xml, or deploy.xml.
  • Ask questions about NetSuite SDF development.
  • Encounter deployment errors or script issues.

Intended Audience

This skill is designed for Technical Architects, Developers, and System Administrators working with NetSuite SuiteScript and the SuiteCloud Development Framework (SDF). It is a practical companion to expert guidance and hands-on experience, not a replacement for the official NetSuite documentation. The focus is SuiteScript 2.1 with callouts to 2.0/1.0 only where meaningful differences exist.


When to Use This Skill

Proactive Invocation (Recommended)

This skill should be invoked automatically when:

  • The user is working on a NetSuite SDF project.
  • The user creates or modifies SuiteScript files.
  • The user asks questions about SDF deployment, script types, or NetSuite development.
  • The user encounters deployment errors or script issues.

Manual Invocation

  • Commands: "generate objects", "create object for this script", "check my deployment XML".
  • Questions: "What's wrong with my RESTlet?", "Why won't my script deploy?", "How do I add a button?".
  • Best practices: "Review my SuiteScript", "Is this the right approach?", "What's the pattern for...".

Object Generation Mode

When the user says "generate objects" without specifying a file:

  1. Scan the entire /SuiteScripts/ folder (including subfolders) for all .js files.
  2. For each .js file found:
  • Check if it has a valid @NScriptType annotation.
  • Check if an object XML file already exists for it.
  • If no object exists and it has a valid script type, generate the object.
  1. Skip files that:
  • Already have corresponding object XML files.
  • Don't have a valid @NScriptType annotation.
  • Are schema files (*_schema.json).
  1. Provide a summary of all files processed.

Single File Processing

Only process a single file when:

  • The user explicitly specifies a file path.
  • The user says "for this script" or "for this file" (use the currently open file in the IDE).
  • The user references a specific script by name.

Best Practices Review Mode

When reviewing code or answering questions:

  • Reference the Common Pitfalls section for known issues.
  • Apply logging configuration guidelines.
  • Recommend architecture patterns (Suitelet-as-API, postMessage, etc.).
  • Check for N+1 query problems and suggest batch operations.

Supported Script Types

#Script Type@NScriptType ValueDescription
1BundleInstallationScriptBundleInstallationScriptScripts that run during bundle installation/update/uninstall
2ClientScriptClientScriptClient-side scripts for forms
3CustomToolCustomToolCustom tools with RPC schemas for AI agents
4MapReduceScriptMapReduceScriptServer-side scripts for processing large datasets
5MassUpdateScriptMassUpdateScriptScripts for bulk record updates
6PortletPortletDashboard portlets for displaying custom content
7RestletRestletRESTful web services
8ScheduledScriptScheduledScriptScripts that run on a schedule
9SDFInstallationScriptSDFInstallationScriptScripts that run during SDF project deployment
10SpaServerScriptSpaServerScriptServer-side initialization for Single Page Applications
11SpaClientScriptSpaClientScriptClient-side rendering for Single Page Applications
12SuiteletSuiteletCustom pages and forms
13UserEventScriptUserEventScriptServer-side scripts triggered by record events
14WorkflowActionScriptWorkflowActionScriptCustom actions for workflows

Process Flow

CRITICAL: Filename Normalization Rules

All filenames MUST be normalized before generating script IDs:

  1. Convert to Lowercase: GetCampaign.js → getcampaign.js
  2. Replace Hyphens: ue-customer-validation.js → ue_customer_validation.js
  3. Maximum Length: 40 characters total (including .xml extension for object files)
  4. Validation: Script ID must exactly match normalized filename

Normalization Examples:

Original FilenameNormalized FilenameScript TypeScript ID (max 40)
GetCampaignPreflight.jsgetcampaignpreflight.jsCustomToolcusttoolset_getcampaignpreflight (33 chars)
UE-Customer-Validation.jsue_customer_validation.jsUserEventScriptcustomscript_ue_customer_validation (36 chars)
Client-Script-Extended.jsclient_script_extended.jsClientScriptcustomscript_client_script_extended (36 chars)

Use this skill in a project

Open any RiverX project, search the Skills panel for oracle/netsuite-suitecloud-sdk/netsuite-sdf-safe-guide, and install it in one click.

Use this skill