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/test_percentile.py
View on GitHub#!/usr/bin/env python3
"""Unit tests for percentile.py's percentile_rank. No network, no credentials.
Run from the repo root:
python3 .claude/skills/client-health/scripts/test_percentile.py
or:
python3 -m unittest discover -s .claude/skills/client-health/scripts
"""
import os, sys, unittest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import percentile # noqa: E402
class PercentileRank(unittest.TestCase):
def test_higher_is_better_middle_value(self):
# [1,2,3,4,5], value=3: 2 below, 1 equal -> rank 2.5/5 = 50.0
self.assertEqual(percentile.percentile_rank(3, [1, 2, 3, 4, 5]), 50.0)
def test_higher_is_better_top_value(self):
# [1,2,3,4,5], value=5: 4 below, 1 equal -> rank 4.5/5 = 90.0
self.assertEqual(percentile.percentile_rank(5, [1, 2, 3, 4, 5]), 90.0)
def test_higher_is_better_bottom_value(self):
# [1,2,3,4,5], value=1: 0 below, 1 equal -> rank 0.5/5 = 10.0
self.assertEqual(percentile.percentile_rank(1, [1, 2, 3, 4, 5]), 10.0)
def test_lower_is_better_inverts_the_ranking(self):
# same fleet, value=1, but 1 is now the BEST value -> should rank high
self.assertEqual(
percentile.percentile_rank(1, [1, 2, 3, 4, 5], direction="lower_is_better"),
90.0,
)
def test_ties_get_average_rank(self):
# [1,1,1,4,5], value=1: 0 below, 3 equal -> rank 1.5/5 = 30.0
self.assertEqual(percentile.percentile_rank(1, [1, 1, 1, 4, 5]), 30.0)
def test_empty_fleet_returns_zero(self):
self.assertEqual(percentile.percentile_rank(3, []), 0.0)
def test_unknown_direction_raises(self):
with self.assertRaises(ValueError):
percentile.percentile_rank(3, [1, 2, 3], direction="sideways")
if __name__ == "__main__":
unittest.main()
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 |