关于 smart-assessment
面向 ServiceNow 管理员和评估设计者的评估配置技能,支持构建问卷、设置评分与条件逻辑,并分析结果。它还介绍基于历史数据生成 AI 辅助回答建议的配置。
主要功能
- 01设计多种题型的评估问卷
- 02配置分类权重和评分模型
- 03按回答显示或隐藏问题
- 04基于历史数据建议回答
- 05汇总评估分数并进行基准分析
适用场景
- 01创建 GRC 合规风险评估
- 02构建供应商评估问卷
- 03设计员工满意度调查
- 04开展部门安全或成熟度评估
MCP 相关
该技能使用 MCP 工具创建评估、分类和题目,更新指标,并查询结果与评估实例;也可通过后台脚本分析结果。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ happy-technologies-llc/ happy-platform-skills --skill smart-assessment安装后在 Claude Code 中输入/smart-assessment确认已加载。
详细介绍
智能评估配置
概述
此技能涵盖如何配置具备智能 AI 辅助功能的 ServiceNow 评估,包括:
- 设计包含多种指标类型(量表、布尔值、选项、文本)的评估问卷
- 配置评分模型和各类别的权重分配
- 构建条件逻辑,根据之前的回答显示或隐藏问题
- 设置 AI 辅助回答建议,根据历史数据预先填充答案
- 通过汇总评分和基准比较分析评估结果
- 将评估与 GRC 风险档案、HR 人才评审和供应商评估集成
适用场景:
- 为 GRC 合规性评估创建风险评估
- 为 TPRM 计划构建供应商评估问卷
- 设计员工敬业度或满意度调查
- 配置用于部门合规性检查的安全自评估
- 设置用于能力评估的成熟度模型评估
前提条件
- 角色:
assessment_admin、assessment_creator或admin - 插件:
com.snc.assessment(Assessment Designer),可选的 GRC 集成插件com.sn_grc - 访问权限: 对 asmt_metric、asmt_assessment、asmt_metric_result 表具有读写权限
- 知识: 了解评估设计原则、评分方法以及所评估的业务领域
关键评估表
| 表 | 用途 | 关键字段 |
|---|---|---|
asmt_metric | 评估问题/指标 | name、metric_type、category、order、weight、mandatory、condition、description、scale_definition |
asmt_assessment | 评估定义 | name、description、state、due_date、assessment_type、scoring_type、source_table、category |
asmt_metric_result | 单项回答/结果 | metric、assessment_instance、value、string_value、actual_value、scored_value、notes |
asmt_metric_type | 指标类型定义 | name、data_type、scale、choices、validation |
asmt_metric_category | 问题类别/分区 | name、assessment、order、weight、description |
asmt_assessment_instance | 评估实例(已分配) | assessment、user、state、due_date、score、percent_answered、taken_on |
asmt_assessment_instance_question | 每个问题的实例数据 | instance、metric、response、score、skipped |
操作步骤
步骤 1:设计评估结构
在创建之前,规划评估的类别、指标和评分方式。
评估设计框架:
| 组件 | 设计决策 | 选项 |
|---|---|---|
| 评估类型 | 评估什么? | 风险、合规性、满意度、成熟度、供应商 |
| 评分类型 | 如何计算结果? | 加权平均值、求和、最大值、自定义公式 |
| 量表 | 使用什么回答格式? | 1-5 李克特量表、1-10 数值、是/否、多项选择 |
| 类别 | 如何对问题分组? | 按领域、按控制系列、按主题领域 |
| 权重 | 各分区的重要性如何? | 权重相同、基于风险、自定义百分比 |
步骤 2:创建评估定义
使用 MCP(Claude Code/Desktop):
Tool: SN-Create-Record
Parameters:
table_name: asmt_assessment
fields:
name: "Vendor Security Assessment 2026"
description: "Annual security posture assessment for critical and high-tier vendors. Covers access control, data protection, incident response, and business continuity."
state: draft
assessment_type: vendor
scoring_type: weighted_average
source_table: core_company
anonymous: false
allow_retake: false
introduction: "This assessment evaluates your organization's security controls and practices. Please answer all questions accurately based on your current capabilities."
due_date: 2026-06-30
使用 REST API:
POST /api/now/table/asmt_assessment
Content-Type: application/json
{
"name": "Vendor Security Assessment 2026",
"description": "Annual security posture assessment for critical and high-tier vendors.",
"state": "draft",
"assessment_type": "vendor",
"scoring_type": "weighted_average",
"source_table": "core_company",
"due_date": "2026-06-30"
}
步骤 3:创建评估类别
将问题分组到逻辑分区并设置权重。
使用 MCP:
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric_category
fields:
name: "Access Control"
assessment: [assessment_sys_id]
order: 100
weight: 25
description: "Evaluate identity management, authentication, authorization, and access review practices"
创建其他类别:
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric_category
fields:
name: "Data Protection"
assessment: [assessment_sys_id]
order: 200
weight: 30
description: "Assess data classification, encryption, backup, and data handling procedures"
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric_category
fields:
name: "Incident Response"
assessment: [assessment_sys_id]
order: 300
weight: 25
description: "Review incident detection, response procedures, notification timelines, and recovery capabilities"
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric_category
fields:
name: "Business Continuity"
assessment: [assessment_sys_id]
order: 400
weight: 20
description: "Evaluate disaster recovery, redundancy, and operational resilience"
步骤 4:创建评估指标(问题)
为各个问题选择合适的指标类型。
量表指标(1-5 李克特量表):
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric
fields:
name: "Multi-factor authentication is enforced for all privileged access"
metric_type: scale
category: [access_control_category_sys_id]
order: 110
weight: 15
mandatory: true
scale_definition: "1=Not Implemented,2=Partially Implemented,3=Implemented but Not Enforced,4=Implemented and Enforced,5=Implemented, Enforced, and Audited"
description: "Rate the maturity of MFA implementation for privileged accounts including admin, root, and service accounts."
ai_suggestion_enabled: true
布尔值指标(是/否):
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric
fields:
name: "Does your organization maintain a documented incident response plan?"
metric_type: boolean
category: [incident_response_category_sys_id]
order: 310
weight: 10
mandatory: true
description: "A documented IRP should include roles, communication procedures, and escalation paths."
选项指标(多项选择):
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric
fields:
name: "What is your data encryption standard for data at rest?"
metric_type: choice
category: [data_protection_category_sys_id]
order: 210
weight: 12
mandatory: true
choices: "AES-256,AES-128,DES/3DES,No encryption,Other"
scored_choices: "AES-256=5,AES-128=4,DES/3DES=2,No encryption=0,Other=1"
文本指标(开放式):
Tool: SN-Create-Record
Parameters:
table_name: asmt_metric
fields:
name: "Describe your data breach notification process and timeline"
metric_type: text
category: [incident_response_category_sys_id]
order: 320
weight: 0
mandatory: false
description: "Include notification timeline, regulatory requirements, and communication channels."
max_length: 2000
步骤 5:配置条件逻辑
根据之前的回答显示或隐藏问题。
使用 MCP:
Tool: SN-Update-Record
Parameters:
table_name: asmt_metric
sys_id: [follow_up_question_sys_id]
data:
condition: "javascript: current.metric == '[parent_metric_sys_id]' && current.value < 3"
condition_description: "Show only if MFA maturity is rated below 3 (Implemented)"
步骤 6:启用 AI 辅助回答建议
配置智能建议,根据历史数据预先填充答案。
使用 MCP:
Tool: SN-Execute-Background-Script
Parameters:
script: |
// Enable AI suggestions for assessment metrics
var assessmentSysId = '[assessment_sys_id]';
var metric = new GlideRecord('asmt_metric');
metric.addQuery('category.assessment', assessmentSysId);
metric.addQuery('metric_type', 'IN', 'scale,choice,boolean');
metric.query();
var updated = 0;
while (metric.next()) {
// Check for historical responses to generate suggestions
var history = new GlideAggregate('asmt_metric_result');
history.addQuery('metric', metric.sys_id.toString());
history.addAggregate('COUNT');
history.addAggregate('AVG', 'actual_value');
history.query();
if (history.next()) {
var responseCount = parseInt(history.getAggregate('COUNT'));
var avgValue = parseFloat(history.getAggregate('AVG', 'actual_value')) || 0;
if (responseCount >= 5) {
metric.ai_suggestion_enabled = true;
metric.ai_suggestion_confidence = Math.min(responseCount / 50, 1.0);
metric.ai_suggested_value = Math.round(avgValue);
metric.update();
updated++;
}
}
}
gs.info('AI suggestions enabled for ' + updated + ' metrics based on historical response data.');
description: "Assessment: Enable AI response suggestions from historical data"
第 7 步:分析评估结果
生成评分摘要和基准数据。
使用 MCP:
Tool: SN-Execute-Background-Script
Parameters:
script: |
var assessmentName = 'Vendor Security Assessment 2026';
var analysis = {
assessment: assessmentName,
generated_date: new GlideDateTime().toString(),
summary: { total_instances: 0, completed: 0, in_progress: 0, not_started: 0, avg_score: 0 },
by_category: {},
score_distribution: { excellent: 0, good: 0, fair: 0, poor: 0 },
lowest_scoring_metrics: [],
highest_scoring_metrics: []
};
// Get assessment
var asmt = new GlideRecord('asmt_assessment');
asmt.addQuery('name', assessmentName);
asmt.query();
if (!asmt.next()) { gs.info('Assessment not found'); return; }
// Instance statistics
var inst = new GlideRecord('asmt_assessment_instance');
inst.addQuery('assessment', asmt.sys_id.toString());
inst.query();
var scores = [];
while (inst.next()) {
analysis.summary.total_instances++;
var state = inst.state.toString();
if (state == 'complete') { analysis.summary.completed++; scores.push(parseFloat(inst.score.toString()) || 0); }
else if (state == 'wip') analysis.summary.in_progress++;
else analysis.summary.not_started++;
}
if (scores.length > 0) {
var total = 0;
for (var i = 0; i < scores.length; i++) {
total += scores[i];
if (scores[i] >= 80) analysis.score_distribution.excellent++;
else if (scores[i] >= 60) analysis.score_distribution.good++;
else if (scores[i] >= 40) analysis.score_distribution.fair++;
else analysis.score_distribution.poor++;
}
analysis.summary.avg_score = Math.round(total / scores.length);
}
// Category scores
var cat = new GlideRecord('asmt_metric_category');
cat.addQuery('assessment', asmt.sys_id.toString());
cat.query();
while (cat.next()) {
var catResults = new GlideAggregate('asmt_metric_result');
catResults.addQuery('metric.category', cat.sys_id.toString());
catResults.addAggregate('AVG', 'actual_value');
catResults.query();
if (catResults.next()) {
analysis.by_category[cat.name.toString()] = {
avg_score: Math.round(parseFloat(catResults.getAggregate('AVG', 'actual_value')) || 0),
weight: cat.weight.toString() + '%'
};
}
}
gs.info('ASSESSMENT ANALYSIS:\n' + JSON.stringify(analysis, null, 2));
description: "Assessment: Analyze results with scoring and benchmarking"
工具用法
| 操作 | MCP 工具 | REST 端点 |
|---|---|---|
| 创建评估 | SN-Create-Record | POST /api/now/table/asmt_assessment |
| 创建类别 | SN-Create-Record | POST /api/now/table/asmt_metric_category |
| 创建指标 | SN-Create-Record | POST /api/now/table/asmt_metric |
| 查询结果 | SN-Query-Table | GET /api/now/table/asmt_metric_result |
| 查询实例 | SN-Query-Table | GET /api/now/table/asmt_assessment_instance |
| 更新指标 | SN-Update-Record | PATCH /api/now/table/asmt_metric |
| 结果分析 | SN-Execute-Background-Script | POST /api/now/table/sys_trigger |
| 架构发现 | SN-Discover-Table-Schema | GET /api/now/table/sys_dictionary |
最佳实践
- 问题清晰: 编写明确无歧义的问题,确保不同受访者都能一致作答
- 评分均衡: 校准评分尺度定义,使中间分数代表合理的基准,而非完美表现
- 必填与可选: 将核心合规问题设为必填;补充背景问题设为可选
- 类别权重: 根据组织风险优先级设置类别权重;每年根据风险偏好的变化进行更新
- AI 建议阈值: 仅在至少有 5 份历史答复时启用 AI 建议,以确保平均值可靠
- 条件逻辑效率: 使用条件逻辑缩短评估;仅在相关时显示后续问题
- 试点测试: 在广泛部署前,先让一小组人员测试评估,以找出令人困惑的问题
- 匿名性考量: 员工敬业度调查应匿名;供应商评估则不应匿名
- 版本管理: 创建新的评估版本,而不要在评估周期中途修改现有版本
故障排除
评估分数未计算
症状: 已完成的评估实例显示分数为 0 或 null
原因: 指标权重总和可能不正确,或评分类型配置有误
解决方案: 确认类别权重总和为 100%。检查每个类别中的单项指标是否已设置权重。确保评估中的 scoring_type 未设为 "none"。
条件问题始终隐藏
症状: 无论父级问题的回答是什么,后续问题都不会显示
原因: 条件脚本引用了错误的指标 sys_id,或使用了不正确的值比较方式
解决方案: 确认 condition 字段使用了正确的父级指标 sys_id。先用明确的值进行测试,再添加动态逻辑。
AI 建议显示过时数据
症状: 建议的答复反映的是旧评估周期,而非当前标准
原因: AI 建议使用了所有历史结果,包括过时的评估数据
解决方案: 计算建议时,按日期范围或评估版本筛选历史数据。标准发生变化时,更新 ai_suggested_value。
指标结果未关联到 GRC
症状: 评估结果未显示在 GRC 风险或合规模块中
原因: 评估的 source_table 可能与 GRC 配置文件表不匹配,或缺少集成映射
解决方案: 确认评估的 source_table 已设为 GRC 配置文件表(例如 sn_grc_profile)。检查评估与 GRC 模块之间是否存在集成业务规则。
示例
示例 1:NIST CSF 成熟度评估
场景: 制定与 NIST Cybersecurity Framework 对齐的网络安全成熟度评估
类别(加权):
- 识别(20%)- 资产管理、风险评估、治理
- 保护(25%)- 访问控制、意识培训、数据安全
- 检测(20%)- 异常、监控、检测流程
- 响应(20%)- 响应规划、沟通、分析
- 恢复(15%)- 恢复规划、改进、沟通
等级: 1=初始级,2=管理级,3=定义级,4=定量管理级,5=优化级
示例 2:员工敬业度调查
场景: 结合 AI 建议基准的季度脉搏调查
Tool: SN-Create-Record
Parameters:
table_name: asmt_assessment
fields:
name: "Q1 2026 Employee Engagement Pulse"
assessment_type: survey
scoring_type: weighted_average
source_table: sys_user
anonymous: true
allow_retake: false
due_date: 2026-03-31
结果分析: 平均得分为 3.8/5.0。最低类别:工作与生活平衡(3.2)。最高类别:团队协作(4.3)。AI 建议根据下降趋势,重点开展工作与生活平衡相关举措。
相关技能
grc/risk-assessment-summarization- 分析风险评估结果grc/tprm-issue-summarization- TPRM 评估和供应商评估hrsd/sentiment-analysis- 结合情绪数据完善评估admin/workflow-creation- 自动化评估分发和后续跟进reporting/executive-dashboard- 构建评估结果仪表板