Skip to content

ZenUml/conf-app / .claude/skills/client-health

client-health

Verified

Rank 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`.

FileKindSize
SKILL.mdskill md4.6 KB
scripts/health_score.pyscript17.7 KB
scripts/percentile.pyscript1.3 KB
scripts/test_health_score.pyscript22.0 KB
scripts/test_percentile.pyscript1.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()
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall