ZenUml/conf-app / .claude/skills/client-health
client-health
VerifiedRank active ZenUML Lite tenants on two independent 0-100 scores — Opportunity (upsell candidate) and Risk (disengagement) — to decide which clients to focus on. Use whenever the user asks "which clients should we focus on", "who's a good upsell candidate", "which tenants are at risk of churning", "health score", or wants a ranked list of Lite tenants by engagement strength or fragility. Scope: Lite only, active tenants only (macro_viewed > 0 in the scoring window). For a SINGLE named tenant's paid status/profile use the `tenant` skill instead; for lifetime revenue/renewals/overdue payers use `marketplace`.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.6 KB |
| scripts/health_score.py | script | 17.7 KB |
| scripts/percentile.py | script | 1.3 KB |
| scripts/test_health_score.py | script | 22.0 KB |
| scripts/test_percentile.py | script | 1.8 KB |
scripts/percentile.py
View on GitHub#!/usr/bin/env python3
"""percentile.py — percentile-rank primitive for client-health scoring.
percentile_rank(value, fleet_values, direction) ranks `value` against
`fleet_values` on a 0-100 scale using average-rank tie handling: a value
tied with N others is placed at the midpoint of the span those N values
occupy, rather than arbitrarily ordering ties.
`direction="higher_is_better"` (default) ranks ascending — the largest
raw value gets the highest percentile. `direction="lower_is_better"`
flips this — the smallest raw value gets the highest percentile. Both
Opportunity and Risk scores are built from this one function; only the
signal set and direction differ (see the design doc).
"""
def percentile_rank(value, fleet_values, direction="higher_is_better"):
if direction not in ("higher_is_better", "lower_is_better"):
raise ValueError(f"unknown direction {direction!r}; expected "
"'higher_is_better' or 'lower_is_better'")
values = list(fleet_values)
n = len(values)
if n == 0:
return 0.0
if direction == "higher_is_better":
below = sum(1 for v in values if v < value)
else:
below = sum(1 for v in values if v > value)
equal = sum(1 for v in values if v == value)
rank = below + equal / 2.0
return round(100.0 * rank / n, 2)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |