Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问clear审计通过

catalog-items目录项

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,357

周安装

56

GitHub Stars

63

下载量

444
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:catalog-items(目录项)
来源仓库:https://github.com/groeimetai/snow-flow
仓库路径:skills/catalog-items
安装命令:
npx skills add https://github.com/groeimetai/snow-flow --skill catalog-items
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/groeimetai/snow-flow --skill catalog-items

简介

用于 ServiceNow 服务目录开发,构建可请求的服务项与变量表单。

  • 支持分类容器、订单向导与变量集等组件结构定义。
  • 每个 Catalog Item 可绑定变量与变量集,实现灵活配置。
  • 适用于 IT 服务自助门户与企业内部流程自动化场景。
  • catalog-items 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Service Catalog Development for ServiceNow

The Service Catalog allows users to request services and items through a self-service portal.

Catalog Components

ComponentPurposeExample
CatalogContainer for categoriesIT Service Catalog
CategoryGroup of itemsHardware, Software
ItemRequestable serviceNew Laptop Request
VariableForm field on itemLaptop Model dropdown
Variable SetReusable variable groupUser Details
ProducerCreates records directlyReport an Incident
Order GuideMulti-item wizardNew Employee Setup

Catalog Item Structure

Catalog Item: Request New Laptop
├── Variables
│   ├── laptop_model (Reference: cmdb_model)
│   ├── reason (Multi-line text)
│   └── urgency (Choice: Low, Medium, High)
├── Variable Sets
│   └── Delivery Information (Address, Contact)
├── Catalog Client Scripts
│   ├── onLoad: Set defaults
│   └── onChange: Update price
├── Workflows/Flows
│   └── Laptop Approval Flow
└── Fulfillment
    └── Creates Task for IT

Variable Types

TypeUse CaseExample
Single Line TextShort inputEmployee ID
Multi Line TextLong inputBusiness Justification
Select BoxSingle choicePriority
Check BoxYes/NoExpress Delivery
ReferenceLink to tableRequested For
DateDate pickerNeeded By Date
Lookup Select BoxFiltered referenceModel by Category
List CollectorMultiple selectionsCC Recipients
Container Start/EndVisual groupingHardware Options
MacroCustom widgetCost Calculator

Creating Catalog Variables

Basic Variable

// Via MCP
snow_create_catalog_variable({
  catalog_item: "laptop_request",
  name: "laptop_model",
  type: "reference",
  reference: "cmdb_model",
  reference_qual: "category=computer",
  mandatory: true,
  order: 100,
})

Variable with Dynamic Default

// Variable: requested_for
// Type: Reference (sys_user)
// Default value (script):
javascript: gs.getUserID()

Variable with Reference Qualifier

// Variable: assignment_group
// Type: Reference (sys_user_group)
// Reference Qualifier:

// Simple:
active=true^type=it

// Dynamic (Script):
javascript: 'active=true^manager=' + gs.getUserID()

// Advanced (using current variables):
javascript: 'u_department=' + current.variables.department

Catalog Client Scripts

Set Defaults onLoad

function onLoad() {
  // Set default values
  g_form.setValue("urgency", "low")

  // Hide admin-only fields
  if (!g_user.hasRole("catalog_admin")) {
    g_form.setDisplay("cost_center", false)
  }

  // Set default date to tomorrow
  var tomorrow = new GlideDateTime()
  tomorrow.addDays(1)
  g_form.setValue("needed_by", tomorrow.getDate().getValue())
}

Dynamic Pricing onChange

function onChange(control, oldValue, newValue, isLoading) {
  if (isLoading) return

  // Get price from selected model
  var ga = new GlideAjax("CatalogUtils")
  ga.addParam("sysparm_name", "getModelPrice")
  ga.addParam("sysparm_model", newValue)
  ga.getXMLAnswer(function (price) {
    g_form.setValue("item_price", price)
    updateTotal()
  })
}

function updateTotal() {
  var price = parseFloat(g_form.getValue("item_price")) || 0
  var quantity = parseInt(g_form.getValue("quantity")) || 1
  g_form.setValue("total_cost", (price * quantity).toFixed(2))
}

Validation onSubmit

function onSubmit() {
  // Validate business justification for high-cost items
  var cost = parseFloat(g_form.getValue("total_cost"))
  var justification = g_form.getValue("business_justification")

  if (cost > 1000 && !justification) {
    g_form.showFieldMsg("business_justification", "Required for items over $1000", "error")
    return false
  }

  // Validate date is in future
  var neededBy = g_form.getValue("needed_by")
  var today = new GlideDateTime().getDate().getValue()
  if (neededBy < today) {
    g_form.showFieldMsg("needed_by", "Date must be in the future", "error")
    return false
  }

  return true
}

Variable Sets

Creating Reusable Variable Sets

Variable Set: User Contact Information
├── contact_name (Single Line Text)
├── contact_email (Email)
├── contact_phone (Single Line Text)
└── preferred_contact (Choice: Email, Phone, Either)

Use in multiple catalog items:
- New Laptop Request
- Software Installation
- Network Access Request

Accessing Variable Set Values

// In workflow or script
var ritm = current // sc_req_item

// Access variable from variable set
var contactEmail = ritm.variables.contact_email
var preferredContact = ritm.variables.preferred_contact

Catalog Workflows/Flows

Approval Pattern

Flow Trigger: sc_req_item created
├── If: Total cost > $5000
│   └── Request Approval: Department Manager
│   └── If: Rejected
│       └── Update: RITM state = Closed Incomplete
├── If: Total cost > $25000
│   └── Request Approval: VP
├── Create: Catalog Task for Fulfillment
└── Wait: Task completion

Fulfillment Script

// In catalog item's "Execution Plan" or workflow

var ritm = current // sc_req_item

// Create an incident from catalog request
var inc = new GlideRecord("incident")
inc.initialize()
inc.setValue("short_description", ritm.short_description)
inc.setValue("description", ritm.description)
inc.setValue("caller_id", ritm.request.requested_for)
inc.setValue("category", ritm.variables.category)
inc.setValue("priority", ritm.variables.urgency)
inc.insert()

// Link incident to request
ritm.setValue("u_fulfillment_record", inc.getUniqueValue())
ritm.update()

Record Producers

Creating Incidents via Catalog

// Record Producer: Report an Issue
// Table: incident
// Script:

// Map variables to incident fields
current.short_description = producer.short_description
current.description = producer.description
current.caller_id = gs.getUserID()
current.category = producer.category
current.subcategory = producer.subcategory
current.priority = producer.urgency == "urgent" ? "2" : "3"

// Set assignment based on category
if (producer.category == "network") {
  current.assignment_group.setDisplayValue("Network Support")
} else {
  current.assignment_group.setDisplayValue("Service Desk")
}

Order Guides

Multi-Step Request Wizard

Order Guide: New Employee Onboarding
├── Step 1: Employee Information
│   └── Variable Set: Employee Details
├── Step 2: Hardware Selection
│   ├── Catalog Item: Laptop
│   ├── Catalog Item: Monitor
│   └── Catalog Item: Peripherals
├── Step 3: Software Requests
│   └── Rule: Show software based on department
├── Step 4: Access Requests
│   └── Cascade Variable: Copy employee info
└── Submit: Creates multiple RITMs

Order Guide Rule

// Rule: Show software items based on department
function rule(item, guide_variables) {
  var dept = guide_variables.department

  // Show engineering software only for Engineering
  if (item.name == "Engineering Software Suite") {
    return dept == "engineering"
  }

  // Show finance software only for Finance
  if (item.name == "Financial Tools") {
    return dept == "finance"
  }

  return true // Show all other items
}

Pricing & Approvals

Dynamic Pricing

// Catalog Item Script (Pricing)
// Runs when item is added to cart

var basePrice = parseFloat(current.price) || 0
var quantity = parseInt(current.variables.quantity) || 1
var expedited = current.variables.expedited == "true"

var total = basePrice * quantity
if (expedited) {
  total *= 1.5 // 50% rush fee
}

current.recurring_price = 0
current.price = total

Approval Rules

Approval Definition: High-Value Purchases
Condition: total_cost > 5000
Approver: requested_for.manager
Wait for: Approval
Rejection action: Cancel request

Best Practices

  1. Variable Naming - Use descriptive, lowercase names (no spaces)
  2. Variable Sets - Reuse common variable groups
  3. Reference Qualifiers - Filter to relevant records only
  4. Client Scripts - Minimize server calls (use GlideAjax sparingly)
  5. Fulfillment - Create tasks, don't complete directly
  6. Testing - Test as different user roles
  7. Mobile - Test catalog items on mobile/tablet
  8. Documentation - Add help text to variables

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.8%
按下载量换算119

Antigravity

23.96%
按下载量换算106

Gemini CLI

18.58%
按下载量换算82

windsurf

11.34%
按下载量换算50

Codex

7.58%
按下载量换算34

OpenCode

3.29%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills