agentleFS
terravicterravic/population-health-skill/SKILL.md

population-health-skill

Skill0 starsChanged 4 months agoApache-2.0View on GitHub

Interactive conversational Population Health Skill using A2UI v0.8. Features a continuous US Risk Heat Map, cohort drill-down comparisons, deterministic fact-checking, and actionable pricing and clinical intervention generation for Gemini Enterprise App, Spark, and Antigravity.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All data is 100% self-contained and local (in-memory SQLite + synthetic JSON).

    line 24
  2. Distinctive:

    When the user asks to view the dashboard, analyze cohorts, view charts/maps, or generate interventions:

    line 98
  3. Very specific:

    When interacting with a specialized harness equipped with an A2UI v0.8 client-side parser, emit structured <a2ui-json> message envelopes:

    line 111
  4. Distinctive:

    Run the interactive CLI demonstration:

    line 150

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Population Health Skill

This skill implements an interactive, conversational "Looker-style" executive dashboard based on the Google Health Population Health framework. It uses A2UI v0.8 (Agent-to-User Interface) to render interactive UI cards, a USA Risk Heat Map, dynamic cohort comparisons, and automated clinical/pricing intervention generators.

All data is 100% self-contained and local (in-memory SQLite + synthetic JSON). No cloud dependencies, GCP credentials, BigQuery datasets, or external APIs are required.


1. Overview & Capabilities

  • Surface 1: Executive Overview & US Risk Heat Map (executive-dashboard): Looker-style multi-tile dashboard displaying population baseline KPIs, high-resolution US environmental risk map, and top regional hot spots.
  • Surface 2: Cohort Comparison Card (cohort-comparison): Side-by-side metric comparison tiles highlighting the actuarial paradox (e.g., Florida age 40–50 cohort having 53% higher claims costs despite 15% lower clinical HCC risk scores).
  • Surface 3: Actionable Interventions Card (actionable-interventions): Dual-persona intervention recommendations (Actuarial Pricing renewal loadings and Clinical Operations proactive respiratory care) with 100% deterministic fact-checking and AutoRater scorecards.
  • Surface 4: Actuarial Data Scientist Staging & Approval Card (actuarial-hitl-approval): PQA/PEA candidate proxy validation (r=0.33, r=0.31) with interactive Human-in-the-Loop (HITL) approval buttons.

2. When to Use This Skill

Activate this skill when the user:

  1. Asks for a population health executive overview, Looker dashboard, or national health risk map.
  2. Requests an actuarial cohort drill-down (e.g., "Show me Florida hot spots", "Analyze respiratory patients in high pollution ZIPs", "Compare California cohort to baseline").
  3. Asks to generate actionable interventions for pricing/underwriting or clinical operations.
  4. Inquires about non-clinical drivers of healthcare cost not captured by CMS-HCC (environmental AQI, pollen, transit barriers, food deserts).
  5. Requests proxy enrichment, PQA intake, or actuarial validation for new non-clinical features.

3. Core Engine Architecture

engines/
├── mock_database.py     # In-memory SQLite runtime view V_combined (5,000 members)
├── mock_pqa.py          # Problem-to-Proxy Quality Assessment & Intake logic
├── mock_pea.py          # Proxy Enrichment Engine (S1-S3 correlation & staging)
├── mock_nl2sql.py       # Safe NL2SQL resolver & delta calculator
├── mock_pie.py          # Population Insights Engine & deterministic fact-checker
└── map_generator.py     # High-res US Choropleth & regional hot-spot visual renderer

Python Programmatic Usage

from engines.mock_database import get_database
from engines.mock_nl2sql import get_nl2sql_engine
from engines.mock_pie import get_pie_engine
from engines.mock_pea import get_pea_engine
from ui.templates_dashboard import render_dashboard_a2ui
from ui.templates_cohort import render_cohort_a2ui
from ui.templates_interventions import render_interventions_a2ui
from ui.templates_hitl_approval import render_hitl_approval_a2ui

# 1. Generate Executive Overview
dash_a2ui_json = render_dashboard_a2ui()

# 2. Resolve Florida Cohort Drilldown
nl2sql = get_nl2sql_engine()
cohort_res = nl2sql.resolve_cohort("Florida members age 40 to 50", state="FL", age_min=40, age_max=50)
cohort_a2ui_json = cohort_res["a2ui_payload"]

# 3. Generate Fact-Checked Interventions
pie = get_pie_engine()
intv_res = pie.generate_interventions(cohort_summary=cohort_res["summary"], state="FL", age_min=40, age_max=50)
intv_a2ui_json = intv_res["a2ui_payload"]

# 4. Run Actuarial Staging & HITL Approval
pea = get_pea_engine()
enrich_res = pea.run_enrichment_pipeline("Identify non-clinical drivers of cost")
hitl_a2ui_json = enrich_res["a2ui_payload"]

4. UI Rendering Directives (Canvas Native & A2UI)

Mode A: Gemini Enterprise App / Spark Canvas (Primary Native UI)

In Gemini Enterprise App & Spark, interactive UI elements, maps, and Chart.js graphs render directly inside the Canvas panel (sandboxed iframe).

When the user asks to view the dashboard, analyze cohorts, view charts/maps, or generate interventions:

  1. Provide a concise executive text summary in chat.
  2. Emit the self-contained HTML/JS/CSS document inside a standard html ... code block (generated via ui.canvas_app.generate_canvas_html() or loaded from ui/population_health_canvas.html).
  3. Gemini Enterprise will automatically detect the HTML document, open the Canvas side panel, and mount the live interactive Looker-style web application!

The Canvas application provides:

  • Embedded Visual Assets: Base64 pre-rendered USA Environmental Risk Map and Regional Hot Spots.
  • Interactive Chart.js Visualizations: 12-month longitudinal seasonal trend line graph, state-by-state cost comparison bar chart, and age gradient divergence paradox curve.
  • Client-Side Filter Engine: Live slicing across 15 states, age brackets (18–39, 40–50, 51–64, 65+), chronic condition focus (COPD, Diabetes), and risk tiers.
  • Dual-Persona Interventions & HITL Staging: Live fact-checking badges and interactive proxy approval buttons.
  • Theme Control: Instant Light / Slate Dark theme toggle.

Mode B: A2UI v0.8 Declarative Envelopes (A2UI Harnesses Only)

When interacting with a specialized harness equipped with an A2UI v0.8 client-side parser, emit structured <a2ui-json> message envelopes:

<a2ui-json>
[
  { "beginRendering": { "surfaceId": "executive-dashboard", "root": "dash_root" } },
  { "surfaceUpdate": { "surfaceId": "executive-dashboard", "components": [ ... ] } },
  { "dataModelUpdate": { "surfaceId": "executive-dashboard", "path": "/", "contents": [] } }
]
</a2ui-json>

5. End-to-End User Journeys (CUJs)

CUJ 1: Executive Dashboard & Geospatial Exploration

  1. User: "Open the executive population health overview."
    • Agent: Emits the interactive Canvas HTML application (opening the dashboard with KPI summary, US Heat Map, and hot-spot buttons in Canvas) alongside a concise executive chat summary.
  2. User: "Drill down on the Florida hot spot (age 40-50)."
    • Agent: Explains the Actuarial Paradox in chat and updates/switches the Canvas view to the Cohort Deep-Dive Surface.
  3. User: "Generate tailored interventions."
    • Agent: Runs PIE engine, performs deterministic fact-checking, and displays the dual-persona pricing & clinical recommendations.

CUJ 2: Actuarial Data Enrichment (Setup Phase)

  1. User: "Help me find non-clinical ZIP-level drivers of cost not captured by HCC."
    • Agent: Runs PQA intake and PEA S1–S3 correlation checks ($r = 0.33, 0.31$, $R^2$ gain $+11.4%$), opening the Actuarial Staging Surface in Canvas.
  2. User: Clicks [Approve & Commit Proxies] in Canvas.
    • Agent: Commits proxy features to in-memory V_combined runtime view and updates baseline stats.

6. Verification & Automated Testing

Execute the automated test suite:

python3 test_scenarios.py

Run the interactive CLI demonstration:

python3 run_demo.py --cuj all

Launch the local web preview server (port 8088):

python3 serve_web_preview.py

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.