Skip to content
Back to skills

Metrics

ASecurity

Inspect MacroMetrics KV cache for a domain and space. Usage: /metrics <domain> [space] Returns stored metrics data with diagnostic information (status, freshness, available spaces). Triggers on "check metrics", "metrics for domain", "inspect KV cache", "metrics data", "is metrics data available", "why no metrics".

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 12, 2026
devopsgoapi

Works with

  • api

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add ZenUml/conf-app --skill metrics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Metrics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Metrics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zenuml-metrics/badge)](https://www.skillsdirectory.com/skills/zenuml-metrics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: metrics
description: >
  Inspect MacroMetrics KV cache for a domain and space.
  Usage: /metrics <domain> [space]
  Returns stored metrics data with diagnostic information (status, freshness, available spaces).
  Triggers on "check metrics", "metrics for domain", "inspect KV cache", "metrics data",
  "is metrics data available", "why no metrics".
---

# Metrics Inspector

Inspect the MacroMetrics KV cache to see what data is stored and diagnose issues.

## Arguments

Usage: `/metrics <domain> [space]`

- **domain** (required): The Confluence cloud domain, e.g. `zenuml.atlassian.net`
- **space** (optional): A specific space key, e.g. `ZEN`. If omitted, lists all spaces for the domain.

## Environments

| Name | Base URL |
|------|----------|
| Production (full) | `https://conf-full.zenuml.com` |
| Production (lite) | `https://conf-lite.zenuml.com` |
| Staging (full) | `https://conf-stg-full.zenuml.com` |
| Staging (lite) | `https://conf-stg-lite.zenuml.com` |

Append `/admin/metrics-inspect?domain=<domain>&space=<space>` to the base URL.

**Always name the product**, using `&addonKey=`:

| product | param |
|---|---|
| Lite | `&addonKey=com.zenuml.confluence-addon-lite` |
| Full | `&addonKey=com.zenuml.confluence-addon` |

This selects the KV key `metrics:<domain>:<productType>`. The base URL does **not** select it — every Pages project reads the same namespace, so `conf-lite` with a Full addonKey returns Full data and vice versa. Only the param matters.

`&productType=<full|lite|diagramly|asyncapi>` is the clearer spelling and is accepted **only** once PR #397 reaches an environment. Against an environment still running the older handler it is ignored and silently falls back to Full — so prefer `addonKey`, which both handlers honour.

Omitting the product no longer defaults to Full (post-#397): the endpoint probes all four products and either resolves a single match (`productResolvedBy: "sole-match"`) or returns `status: "ambiguous_product"` listing each product's `spaceCount` and `newestUpdate`. A product the tenant holds no license for is residue from a past writer bug, not a second install — 458 of 767 domains carry more than one key.

Note: use curl (not WebFetch's follow-through summarization) to get the raw JSON, e.g.
`curl -s "https://conf-lite.zenuml.com/admin/metrics-inspect?domain=<domain>&addonKey=com.zenuml.confluence-addon-lite"`

## Execution

1. Parse the arguments to extract `domain` and optional `space`.
2. Call the inspect endpoint using `WebFetch`:
   - If space is provided: `GET <base>/admin/metrics-inspect?domain=<domain>&addonKey=<key>&space=<space>`
   - If space is omitted: `GET <base>/admin/metrics-inspect?domain=<domain>&addonKey=<key>`
3. If the user did not specify a variant, determine it first — ask, or check which app the tenant has installed (e.g. `forge-installs` skill, or Mixpanel `product_type`) — then pass the matching `addonKey`. Do not default to Full: the products read different KV keys and their counts diverge. If you get `ambiguous_product`, resolve it against the tenant's actual Marketplace license rather than picking the larger number — the larger one is usually the fossil.

## Output Format

### Single space result

```
## Metrics: <domain> / <space>

Status: <status> (<age context>)

| Type     | Count |
|----------|-------|
| sequence | N     |
| graph    | N     |
| mermaid  | N     |
| openapi  | N     |
| plantuml | N     |
| unknown  | N     |
| total    | N     |

**Diagnosis:**
- KV Key: `<key>`
- KV Has Data: Yes/No
- Space Found: Yes/No
- Last Updated: <timestamp> (<age>)
- Available Spaces: <list>
- Stale Threshold: 24h

**Suggestion:** <if status is no_data or stale, explain likely cause>
```

### Domain-wide result (no space)

```
## Metrics: <domain> (all spaces)

| Space | Status | Total | Last Updated |
|-------|--------|-------|-------------|
| FOO   | ok     | 42    | 2h ago      |
| BAR   | stale  | 15    | 30h ago     |

**Diagnosis:**
- KV Key: `<key>`
- Total Spaces: N
```

### Suggestions by status

- `ok`: "Data is fresh and available."
- `stale`: "Data exists but has not been updated in over 24 hours. Metrics are reported on save — if no saves have happened recently, this is expected. If saves have occurred, check whether `reportMacroMetrics()` is being called (browser console: filter `[metrics`)."
- `no_data` (KV has data but space missing): "This domain has metrics for other spaces (<list>) but not for '<space>'. Metrics may never have been reported for this space — a user needs to save a macro in this space to trigger reporting."
- `no_data` (KV empty): "No metrics data exists for this domain at all. Either the app has never been installed on this site, or metrics reporting has never successfully completed."

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in devops →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.