Performance Analytics logo

Performance Analytics

Organization
serac-labs
performance-analytics

Build ServiceNow Performance Analytics — pa_indicators (count/sum/avg/percentage), pa_breakdowns, pa_thresholds with severity colors, pa_widgets, and pa_dashboards for KPI tracking.

Overview

Publisherserac-labs
Repositoryserac
Skill nameperformance-analytics
Stars
78
Forks
26
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by serac-labs on GitHub. Read the source before you install it.

Installation

Install the Performance Analytics AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serac-labs/serac.git /tmp/serac
mkdir -p .claude/skills
cp -r /tmp/serac/packages/skills/performance-analytics .claude/skills/performance-analytics
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Performance Analytics in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Performance Analytics on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Performance Analytics is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Performance Analytics for ServiceNow

Performance Analytics (PA) provides advanced reporting and KPI tracking capabilities for measuring and improving business processes.

PA Architecture

Component Hierarchy

PA Dashboard
├── Widgets
│   ├── Scorecard Widget
│   ├── Time Series Chart
│   ├── Breakdown Pie Chart
│   └── Single Score
├── Indicators
│   ├── Number of Open Incidents
│   ├── Average Resolution Time
│   └── SLA Compliance Rate
├── Breakdowns
│   ├── By Priority
│   ├── By Assignment Group
│   └── By Category
└── Thresholds
    ├── Critical: > 100
    └── Warning: > 50

Key Tables

TablePurpose
pa_indicatorsKPI definitions
pa_indicator_breakdownsIndicator-breakdown links
pa_breakdownsBreakdown definitions
pa_thresholdsThreshold rules
pa_widgetsDashboard widgets
pa_dashboardsDashboard containers

Indicators

Indicator Types

TypeAggregationExample
CountCOUNT(*)Number of incidents
SumSUM(field)Total cost
AverageAVG(field)Avg resolution time
Percentage(A/B)*100SLA compliance %
DurationTime calculationAvg time to resolve

Creating Count Indicator (ES5)

javascript
// Create "Open Incidents" indicator
var indicator = new GlideRecord("pa_indicators")
indicator.initialize()
indicator.setValue("name", "Open Incidents")
indicator.setValue("description", "Number of currently open incidents")

// Source configuration
indicator.setValue("cube", "pa_cubes_incident") // or table-based
indicator.setValue("facts_table", "incident")
indicator.setValue("conditions", "active=true")

// Aggregation
indicator.setValue("aggregate", "COUNT") // COUNT, SUM, AVG

// Display settings
indicator.setValue("direction", 2) // 1=Up is good, 2=Down is good
indicator.setValue("unit", "Incidents")
indicator.setValue("precision", 0) // Decimal places

// Scoring
indicator.setValue("frequency", "daily")

indicator.insert()

Creating Average Indicator (ES5)

javascript
// Create "Average Resolution Time" indicator
var indicator = new GlideRecord("pa_indicators")
indicator.initialize()
indicator.setValue("name", "Avg Resolution Time")
indicator.setValue("description", "Average time to resolve incidents")

indicator.setValue("facts_table", "incident")
indicator.setValue("conditions", "state=6") // Resolved

// Aggregation on duration
indicator.setValue("aggregate", "AVG")
indicator.setValue("field", "calendar_duration") // Duration field

// Time unit
indicator.setValue("unit", "Hours")
indicator.setValue("unit_conversion", 3600) // Seconds to hours

indicator.setValue("direction", 2) // Lower is better
indicator.setValue("frequency", "daily")

indicator.insert()

Creating Percentage Indicator (ES5)

javascript
// Create "SLA Compliance" percentage indicator
var indicator = new GlideRecord("pa_indicators")
indicator.initialize()
indicator.setValue("name", "SLA Compliance Rate")
indicator.setValue("description", "Percentage of incidents meeting SLA")

indicator.setValue("facts_table", "task_sla")
indicator.setValue("conditions", "task.sys_class_name=incident")

// Formula-based percentage
indicator.setValue("aggregate", "FORMULA")
indicator.setValue("formula", "(COUNT(has_breached=false) / COUNT(*)) * 100")

indicator.setValue("unit", "%")
indicator.setValue("direction", 1) // Higher is better
indicator.setValue("precision", 1)

indicator.insert()

Breakdowns

Common Breakdowns

BreakdownFieldUse Case
PrioritypriorityIncidents by P1/P2/P3
CategorycategoryIncidents by type
Groupassignment_groupTeam performance
LocationlocationGeographic analysis
Timeopened_atTrend analysis

Creating Breakdown (ES5)

javascript
// Create "Priority" breakdown
var breakdown = new GlideRecord("pa_breakdowns")
breakdown.initialize()
breakdown.setValue("name", "Priority")
breakdown.setValue("description", "Breakdown by incident priority")

breakdown.setValue("facts_table", "incident")
breakdown.setValue("dimension_field", "priority")

// Sorting
breakdown.setValue("sort_field", "priority")
breakdown.setValue("sort_order", "ASC")

// Element mapping (optional)
breakdown.setValue("use_element_mapping", true)

breakdown.insert()

Linking Breakdown to Indicator (ES5)

javascript
// Link breakdown to indicator
var link = new GlideRecord("pa_indicator_breakdowns")
link.initialize()
link.setValue("indicator", indicatorSysId)
link.setValue("breakdown", breakdownSysId)
link.setValue("active", true)
link.insert()

Thresholds

Creating Thresholds (ES5)

javascript
// Create threshold for Open Incidents
var threshold = new GlideRecord("pa_thresholds")
threshold.initialize()
threshold.setValue("indicator", indicatorSysId)
threshold.setValue("name", "Critical Level")

// Threshold conditions
threshold.setValue("operator", ">=") // >=, <=, =, >, <
threshold.setValue("value", 100)

// Visual styling
threshold.setValue("color", "red")
threshold.setValue("icon", "exclamation-circle")

// Notification
threshold.setValue("notification_user", adminSysId)
threshold.setValue("notification_script", thresholdScript)

threshold.insert()

// Add warning threshold
var warning = new GlideRecord("pa_thresholds")
warning.initialize()
warning.setValue("indicator", indicatorSysId)
warning.setValue("name", "Warning Level")
warning.setValue("operator", ">=")
warning.setValue("value", 50)
warning.setValue("color", "orange")
warning.insert()

Widgets

Widget Types

TypeUse CaseShows
Single ScoreCurrent value"127 Open Incidents"
ScorecardValue + trendCurrent + sparkline
Time SeriesTrend over timeLine/bar chart
BreakdownBy dimensionPie/bar chart
ComparisonMultiple indicatorsSide-by-side

Creating Widget (ES5)

javascript
// Create scorecard widget
var widget = new GlideRecord("pa_widgets")
widget.initialize()
widget.setValue("name", "Open Incidents Scorecard")
widget.setValue("type", "scorecard")

// Indicator
widget.setValue("indicator", indicatorSysId)

// Time range
widget.setValue("time_range", "last_30_days")
widget.setValue("show_trend", true)
widget.setValue("compare_to", "previous_period")

// Display
widget.setValue("show_breakdown", true)
widget.setValue("breakdown", priorityBreakdownSysId)
widget.setValue("chart_type", "bar")

widget.insert()

Dashboards

Creating Dashboard (ES5)

javascript
// Create PA Dashboard
var dashboard = new GlideRecord("pa_dashboards")
dashboard.initialize()
dashboard.setValue("name", "Incident Management Dashboard")
dashboard.setValue("description", "Key metrics for incident management")

// Layout
dashboard.setValue("layout", "2-column")

// Access control
dashboard.setValue("public", true)
dashboard.setValue("owner", gs.getUserID())

var dashboardSysId = dashboard.insert()

// Add widgets to dashboard
function addWidgetToDashboard(dashboardId, widgetId, row, column) {
  var placement = new GlideRecord("pa_dashboard_widgets")
  placement.initialize()
  placement.setValue("dashboard", dashboardId)
  placement.setValue("widget", widgetId)
  placement.setValue("row", row)
  placement.setValue("column", column)
  placement.insert()
}

addWidgetToDashboard(dashboardSysId, openIncWidget, 0, 0)
addWidgetToDashboard(dashboardSysId, avgTimeWidget, 0, 1)
addWidgetToDashboard(dashboardSysId, slaWidget, 1, 0)

Data Collection

Manual Score Collection (ES5)

javascript
// Collect scores for an indicator
var job = new PAScoreCollector()
job.collectIndicatorScores(indicatorSysId)

Scheduled Collection

javascript
// PA uses scheduled jobs for data collection
// Default: Daily at midnight
// Configure via: Performance Analytics > Data Collection > Jobs

MCP Tool Integration

Available PA Tools

ToolPurpose
snow_pa_create (action='indicator')Create indicator
snow_pa_create (action='breakdown')Create breakdown
snow_pa_create (action='threshold')Create threshold
snow_pa_create (action='widget')Create widget
snow_pa_operate (action='get_scores')Retrieve scores
snow_pa_operate (action='collect_data')Trigger collection
snow_pa_discover (action='indicators')Find indicators

Example Workflow

javascript
// 1. Create indicator
var indicatorResult = await snow_pa_create({
  action: "indicator",
  name: "Open P1 Incidents",
  table: "incident",
  conditions: "active=true^priority=1",
  aggregate: "COUNT",
})
var indicatorId = indicatorResult.sys_id

// 2. Create breakdown
var breakdownResult = await snow_pa_create({
  action: "breakdown",
  name: "By Assignment Group",
  table: "incident",
  field: "assignment_group",
})
var breakdownId = breakdownResult.sys_id

// 3. Attach the breakdown to the indicator
//    (add_breakdown creates the breakdown + the indicator link in one step)
await snow_pa_indicator_manage({
  action: "add_breakdown",
  sys_id: indicatorId,
  breakdown_name: "By Assignment Group",
  breakdown_table: "incident",
  breakdown_field: "assignment_group",
})

// 4. Create threshold
await snow_pa_create({
  action: "threshold",
  indicator: indicatorId,
  type: "critical",
  operator: ">=",
  value: 10,
})

// 5. Create widget
await snow_pa_create({
  action: "widget",
  name: "P1 Incidents Scorecard",
  type: "scorecard",
  indicator: indicatorId,
  breakdown: breakdownId,
})

// 6. Get current scores
var scores = await snow_pa_operate({
  action: "get_scores",
  indicator_sys_id: indicatorId,
  time_range: "last_30_days",
})

Best Practices

  1. Direction Matters - Set correctly (up/down is good)
  2. Meaningful Thresholds - Based on business requirements
  3. Consistent Frequency - Match data volatility
  4. Use Breakdowns - Enable drill-down analysis
  5. Dashboard Purpose - One focus per dashboard
  6. Trend Analysis - Always show comparison
  7. Performance - Limit active indicators
  8. Documentation - Clear indicator descriptions

Frequently asked questions

What does the Performance Analytics AI skill do?

Build ServiceNow Performance Analytics — pa_indicators (count/sum/avg/percentage), pa_breakdowns, pa_thresholds with severity colors, pa_widgets, and pa_dashboards for KPI tracking.

Why use Performance Analytics on TypingMind?

Because you install it once and use it with any model. Performance Analytics is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Performance Analytics in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/serac-labs/serac/tree/main/packages/skills/performance-analytics. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Performance Analytics?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Performance Analytics?

As many as you like. As long as a model supports skills, you can use Performance Analytics with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Performance Analytics AI skill free?

Yes. It is published on GitHub by serac-labs under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇