Logo App Generation

App Generation

Tổ chức
Happy-Technologies-LLC
app-generation

Generate ServiceNow scoped applications from requirements including tables, forms, ACLs, and business logic

Tổng quan

Nhà phát hànhHappy-Technologies-LLC
Kho mãhappy-platform-skills
Tên kỹ năngapp-generation
Sao
41
Bản fork
14
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Happy-Technologies-LLC công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI App Generation trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/genai/app-generation
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Happy-Technologies-LLC/happy-platform-skills.git /tmp/happy-platform-skills
mkdir -p .claude/skills
cp -r /tmp/happy-platform-skills/skills/genai/app-generation .claude/skills/app-generation
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật App Generation trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp App Generation ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng App Generation với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

ServiceNow Scoped Application Generation

Overview

This skill covers generating complete ServiceNow scoped applications from requirements, including:

  • Creating application scope and metadata
  • Defining custom tables with fields, indexes, and relationships
  • Generating forms, lists, and UI configurations
  • Creating ACL rules for role-based access control
  • Building business rules, client scripts, and script includes
  • Setting up application navigation and modules
  • Configuring application properties and system settings

When to use: When building a new custom application from scratch, prototyping a solution from business requirements, or automating the creation of standardized application templates.

Prerequisites

  • Roles: admin, maint (for table creation), or application_creator
  • Access: sys_scope, sys_app, sys_db_object, sys_dictionary, sys_security_acl, sys_script tables
  • Knowledge: ServiceNow application model, scoped applications, data modeling, ACL architecture
  • Plugins: No additional plugins required; Studio (com.glide.studio) recommended
  • Related Skills: Complete development/code-assist for script generation patterns

Procedure

Step 1: Understand the Application Architecture

sys_scope (Application Scope)
├── sys_app (Application Record)
├── sys_db_object (Tables)
│   └── sys_dictionary (Fields/Columns)
├── sys_ui_form (Forms)
│   └── sys_ui_form_section (Form Sections)
├── sys_ui_list (List Views)
├── sys_security_acl (ACL Rules)
├── sys_script (Business Rules)
├── sys_script_client (Client Scripts)
├── sys_script_include (Script Includes)
├── sys_app_module (Navigation Modules)
└── sys_properties (Application Properties)

Key Tables:

TablePurpose
sys_scopeApplication scope definition and namespace
sys_appApplication metadata and version info
sys_metadataBase record for all application artifacts
sys_db_objectTable definitions
sys_dictionaryField/column definitions for tables
sys_security_aclAccess control rules

Step 2: Create the Application Scope

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_scope
  data:
    name: "Asset Tracking Pro"
    scope: "x_happy_asset_trk"
    short_description: "Custom asset tracking and lifecycle management application"
    version: "1.0.0"
    vendor: "Happy Technologies LLC"
    vendor_prefix: "x_happy"
    active: true
    licensable: false
    js_level: "helsinki_es6"

REST Alternative:

bash
curl -u "$SN_USER:$SN_PASS" \
  "$SN_INSTANCE/api/now/table/sys_scope" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -X POST \
  -d '{
    "name": "Asset Tracking Pro",
    "scope": "x_happy_asset_trk",
    "short_description": "Custom asset tracking and lifecycle management application",
    "version": "1.0.0",
    "vendor": "Happy Technologies LLC",
    "active": true
  }'

Step 3: Create Application Tables

Create the primary table:

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_db_object
  data:
    name: "x_happy_asset_trk_asset"
    label: "Tracked Asset"
    super_class: task
    is_extendable: true
    create_access: true
    read_access: true
    update_access: true
    delete_access: true
    sys_scope: [scope_sys_id]

REST Alternative:

bash
curl -u "$SN_USER:$SN_PASS" \
  "$SN_INSTANCE/api/now/table/sys_db_object" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{
    "name": "x_happy_asset_trk_asset",
    "label": "Tracked Asset",
    "super_class": "task",
    "is_extendable": true,
    "sys_scope": "[scope_sys_id]"
  }'

Create a supporting table:

Tool: SN-Create-Record
Parameters:
  table_name: sys_db_object
  data:
    name: "x_happy_asset_trk_asset_history"
    label: "Asset History"
    is_extendable: false
    sys_scope: [scope_sys_id]

Step 4: Add Fields to Tables

Add string field:

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_dictionary
  data:
    name: "x_happy_asset_trk_asset"
    element: "asset_tag"
    column_label: "Asset Tag"
    internal_type: "string"
    max_length: 40
    mandatory: true
    unique: true
    active: true
    read_only: false
    sys_scope: [scope_sys_id]

Add reference field:

Tool: SN-Create-Record
Parameters:
  table_name: sys_dictionary
  data:
    name: "x_happy_asset_trk_asset"
    element: "assigned_user"
    column_label: "Assigned User"
    internal_type: "reference"
    reference: "sys_user"
    max_length: 32
    mandatory: false
    active: true
    sys_scope: [scope_sys_id]

Add choice field:

Tool: SN-Create-Record
Parameters:
  table_name: sys_dictionary
  data:
    name: "x_happy_asset_trk_asset"
    element: "asset_status"
    column_label: "Asset Status"
    internal_type: "string"
    max_length: 40
    choice: 1
    mandatory: true
    default_value: "available"
    active: true
    sys_scope: [scope_sys_id]

Add choices for the choice field:

Tool: SN-Create-Record
Parameters:
  table_name: sys_choice
  data:
    name: "x_happy_asset_trk_asset"
    element: "asset_status"
    label: "Available"
    value: "available"
    sequence: 100
    inactive: false

Tool: SN-Create-Record
Parameters:
  table_name: sys_choice
  data:
    name: "x_happy_asset_trk_asset"
    element: "asset_status"
    label: "In Use"
    value: "in_use"
    sequence: 200
    inactive: false

Tool: SN-Create-Record
Parameters:
  table_name: sys_choice
  data:
    name: "x_happy_asset_trk_asset"
    element: "asset_status"
    label: "In Maintenance"
    value: "in_maintenance"
    sequence: 300
    inactive: false

Tool: SN-Create-Record
Parameters:
  table_name: sys_choice
  data:
    name: "x_happy_asset_trk_asset"
    element: "asset_status"
    label: "Retired"
    value: "retired"
    sequence: 400
    inactive: false

Add date field:

Tool: SN-Create-Record
Parameters:
  table_name: sys_dictionary
  data:
    name: "x_happy_asset_trk_asset"
    element: "purchase_date"
    column_label: "Purchase Date"
    internal_type: "glide_date"
    mandatory: false
    active: true
    sys_scope: [scope_sys_id]

Add currency field:

Tool: SN-Create-Record
Parameters:
  table_name: sys_dictionary
  data:
    name: "x_happy_asset_trk_asset"
    element: "purchase_cost"
    column_label: "Purchase Cost"
    internal_type: "currency"
    mandatory: false
    active: true
    sys_scope: [scope_sys_id]

Step 5: Create ACL Rules

Create table-level read ACL:

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_security_acl
  data:
    name: "x_happy_asset_trk_asset"
    operation: "read"
    type: "record"
    active: true
    admin_overrides: true
    advanced: false
    condition: ""
    sys_scope: [scope_sys_id]

Create role-based ACL:

Tool: SN-Create-Record
Parameters:
  table_name: sys_security_acl
  data:
    name: "x_happy_asset_trk_asset"
    operation: "write"
    type: "record"
    active: true
    admin_overrides: true
    sys_scope: [scope_sys_id]

Associate role with ACL:

Tool: SN-Create-Record
Parameters:
  table_name: sys_security_acl_role
  data:
    sys_security_acl: [acl_sys_id]
    sys_user_role: [role_sys_id]

Create custom application role:

Tool: SN-Create-Record
Parameters:
  table_name: sys_user_role
  data:
    name: "x_happy_asset_trk.manager"
    description: "Asset Tracking Manager - full CRUD access"
    assignable_by: [admin_role_sys_id]
    sys_scope: [scope_sys_id]

Tool: SN-Create-Record
Parameters:
  table_name: sys_user_role
  data:
    name: "x_happy_asset_trk.user"
    description: "Asset Tracking User - read and create access"
    assignable_by: [admin_role_sys_id]
    sys_scope: [scope_sys_id]

Step 6: Create Business Logic

Before insert business rule - auto-generate asset tag:

Tool: SN-Create-Record
Parameters:
  table_name: sys_script
  data:
    name: "Generate Asset Tag"
    collection: "x_happy_asset_trk_asset"
    when: "before"
    order: 100
    active: true
    action_insert: true
    sys_scope: [scope_sys_id]
    script: |
      (function executeRule(current, previous) {
        if (!current.asset_tag) {
          var prefix = 'AST';
          var ga = new GlideAggregate('x_happy_asset_trk_asset');
          ga.addAggregate('COUNT');
          ga.query();
          var count = 0;
          if (ga.next()) {
            count = parseInt(ga.getAggregate('COUNT'), 10);
          }
          current.asset_tag = prefix + '-' + gs.nowNoTZ().substring(0, 4) + '-' + String(count + 1).padStart(5, '0');
        }
      })(current, previous);

After update business rule - track status changes:

Tool: SN-Create-Record
Parameters:
  table_name: sys_script
  data:
    name: "Track Asset Status Change"
    collection: "x_happy_asset_trk_asset"
    when: "after"
    order: 200
    active: true
    action_update: true
    sys_scope: [scope_sys_id]
    script: |
      (function executeRule(current, previous) {
        if (current.asset_status.changes()) {
          var history = new GlideRecord('x_happy_asset_trk_asset_history');
          history.initialize();
          history.asset = current.sys_id;
          history.previous_status = previous.asset_status;
          history.new_status = current.asset_status;
          history.changed_by = gs.getUserID();
          history.changed_on = new GlideDateTime();
          history.insert();
        }
      })(current, previous);

Step 7: Create Application Navigation

Create application menu:

Tool: SN-Create-Record
Parameters:
  table_name: sys_app_application
  data:
    title: "Asset Tracking"
    hint: "Asset Tracking Pro application"
    device_type: "browser"
    category: "custom"
    active: true
    sys_scope: [scope_sys_id]

Create navigation modules:

Tool: SN-Create-Record
Parameters:
  table_name: sys_app_module
  data:
    title: "All Assets"
    application: [app_menu_sys_id]
    hint: "View all tracked assets"
    link_type: "LIST"
    name: "x_happy_asset_trk_asset"
    query: ""
    order: 100
    active: true
    sys_scope: [scope_sys_id]

Tool: SN-Create-Record
Parameters:
  table_name: sys_app_module
  data:
    title: "Create New Asset"
    application: [app_menu_sys_id]
    hint: "Create a new tracked asset"
    link_type: "NEW"
    name: "x_happy_asset_trk_asset"
    order: 200
    active: true
    sys_scope: [scope_sys_id]

Tool: SN-Create-Record
Parameters:
  table_name: sys_app_module
  data:
    title: "My Assigned Assets"
    application: [app_menu_sys_id]
    hint: "Assets assigned to me"
    link_type: "LIST"
    name: "x_happy_asset_trk_asset"
    query: "assigned_user=javascript:gs.getUserID()"
    order: 300
    active: true
    sys_scope: [scope_sys_id]

Step 8: Validate Application

Check all application artifacts:

MCP Approach:

Tool: SN-Query-Table
Parameters:
  table_name: sys_metadata
  query: sys_scope=[scope_sys_id]
  fields: sys_id,sys_class_name,sys_name
  limit: 200

REST Alternative:

bash
curl -u "$SN_USER:$SN_PASS" \
  "$SN_INSTANCE/api/now/table/sys_metadata?sysparm_query=sys_scope=[scope_sys_id]&sysparm_fields=sys_id,sys_class_name,sys_name&sysparm_limit=200" \
  -H "Accept: application/json"

Tool Usage

ActionMCP ToolREST Endpoint
Create app scopeSN-Create-RecordPOST /api/now/table/sys_scope
Create tableSN-Create-RecordPOST /api/now/table/sys_db_object
Add fieldsSN-Create-RecordPOST /api/now/table/sys_dictionary
Create ACLsSN-Create-RecordPOST /api/now/table/sys_security_acl
Create business rulesSN-Create-RecordPOST /api/now/table/sys_script
Create navigationSN-Create-RecordPOST /api/now/table/sys_app_module
Query metadataSN-Query-TableGET /api/now/table/sys_metadata
Validate appSN-Query-TableGET /api/now/table/sys_scope

Best Practices

  • Use scoped applications: Always create applications within a scope for portability and isolation
  • Follow naming conventions: Prefix all artifacts with the scope namespace (e.g., x_vendor_app)
  • Design tables around task: Extend the task table for workflow-enabled entities
  • Create roles early: Define application roles before creating ACLs to ensure consistent access control
  • Use application properties: Store configurable values in sys_properties rather than hard-coding
  • Build incrementally: Create tables and fields first, then ACLs, then business logic, then UI
  • Document as you build: Add descriptions to every table, field, ACL, and script
  • Test in developer instance: Always prototype in a personal developer instance before production
  • Plan for upgrades: Avoid modifying baseline tables; extend or create custom tables instead
  • Include data cleanup scripts: Plan for application removal with cleanup procedures

Troubleshooting

Table Creation Fails

Symptom: Error creating sys_db_object record Causes:

  1. Missing maint role
  2. Table name does not match scope prefix
  3. Table name already exists Solution:
Tool: SN-Query-Table
Parameters:
  table_name: sys_db_object
  query: name=x_happy_asset_trk_asset
  fields: sys_id,name,label,sys_scope

ACLs Not Enforcing

Symptom: Users can access records despite ACL rules Causes:

  1. ACL not active
  2. Higher-priority ACL granting access
  3. User has admin role (admin_overrides = true) Solution: Check ACL evaluation order:
Tool: SN-Query-Table
Parameters:
  table_name: sys_security_acl
  query: name=x_happy_asset_trk_asset^active=true
  fields: sys_id,name,operation,type,admin_overrides,condition
  limit: 20

Scope Access Errors

Symptom: "Scope access denied" when running scripts Cause: Cross-scope access not configured Solution: Check scope access settings:

Tool: SN-Query-Table
Parameters:
  table_name: sys_scope_privilege
  query: source_scope=[scope_sys_id]
  fields: sys_id,source_scope,target_scope,type,operation,status
  limit: 20

Fields Not Appearing on Form

Symptom: Created fields not visible on the form Cause: Fields exist in dictionary but not added to form layout Solution: Create form section entries or use the form designer. Verify field existence:

Tool: SN-Query-Table
Parameters:
  table_name: sys_dictionary
  query: name=x_happy_asset_trk_asset^active=true
  fields: element,column_label,internal_type,mandatory
  limit: 50

Examples

Example: Complete Visitor Management Application

# 1. Create scope
Tool: SN-Create-Record
Parameters:
  table_name: sys_scope
  data:
    name: "Visitor Management"
    scope: "x_happy_visitor"
    version: "1.0.0"
    vendor: "Happy Technologies LLC"

# 2. Create visitor table extending task
Tool: SN-Create-Record
Parameters:
  table_name: sys_db_object
  data:
    name: "x_happy_visitor_visit"
    label: "Visitor Request"
    super_class: task

# 3. Add fields: visitor_name, company, host, visit_date, badge_number
# 4. Create ACLs for receptionist and host roles
# 5. Create business rule to auto-assign badge numbers
# 6. Create client script for date validation
# 7. Create navigation modules
# 8. Validate all artifacts via sys_metadata

Related Skills

  • genai/app-summary - Analyze and summarize existing applications
  • development/code-assist - AI-assisted code generation for scripts
  • development/code-review - Review generated code for quality
  • security/acl-management - Detailed ACL configuration
  • admin/update-set-management - Package application for deployment

Câu hỏi thường gặp

Kỹ năng AI App Generation làm được gì?

Generate ServiceNow scoped applications from requirements including tables, forms, ACLs, and business logic

Vì sao nên dùng App Generation trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. App Generation là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài App Generation trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/genai/app-generation. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng App Generation?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng App Generation với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng App Generation với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI App Generation có miễn phí không?

Có. Kỹ năng này được Happy-Technologies-LLC phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇