# Common

> Cross-product infrastructure for HealthSim — persistence (cohort save/load), identity correlation (SSN-based cross-product linking), and DuckDB database operations. Use when saving/loading cohorts, linking entities across products, or querying the database directly.

- **Type:** Skill
- **Install:** `agentstack add skill-mark64oswald-healthsim-workspace-common`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [mark64oswald](https://agentstack.voostack.com/s/mark64oswald)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [mark64oswald](https://github.com/mark64oswald)
- **Source:** https://github.com/mark64oswald/healthsim-workspace/tree/main/skills/common

## Install

```sh
agentstack add skill-mark64oswald-healthsim-workspace-common
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Common Skills - Master Reference

Cross-product infrastructure skills that enable persistence, identity correlation, and database operations across all HealthSim products.

## Quick Start

```
# Save your current work
Save this cohort as "demo-patients"

# Load previous work
Load the cohort named "demo-patients"

# Find related entities
Find the member record for patient MRN-12345

# Query the database
Show me all cohorts created in the last week
```

## Core Capabilities

### State Management
Persist generated data across sessions with cohort save/load operations. Supports auto-persist for token-efficient batch generation.

**Triggers**: save, load, persist, resume, snapshot, restore
**Details**: [state-management.md](state-management.md)

### Identity Correlation
Link entities across products using SSN as the universal correlator. Track the same person as patient, member, rx member, and trial subject.

**Triggers**: find member, link patient, correlate, same person, cross-reference
**Details**: [identity-correlation.md](identity-correlation.md)

### DuckDB Operations
Direct database access for advanced queries, schema exploration, and reference data access.

**Triggers**: query, SQL, schema, database, show tables
**Details**: [duckdb-skill.md](duckdb-skill.md)

## Cross-Product Architecture

Common skills enable data flow between products:

```
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  PatientSim │    │  MemberSim  │    │ RxMemberSim │
│   (MRN)     │    │   (MBI)     │    │  (RxID)     │
└──────┬──────┘    └──────┬──────┘    └──────┬──────┘
       │                  │                  │
       └────────┬─────────┴─────────┬────────┘
                │                   │
         ┌──────▼───────┐   ┌───────▼──────┐
         │  Identity    │   │    State     │
         │ Correlation  │   │  Management  │
         │   (SSN)      │   │  (Cohorts)   │
         └──────────────┘   └──────────────┘
                │                   │
                └─────────┬─────────┘
                          │
                   ┌──────▼──────┐
                   │   DuckDB    │
                   │  Database   │
                   └─────────────┘
```

## Database Schema

Common skills work with these core tables:

| Table | Purpose | Key Columns |
|-------|---------|-------------|
| cohorts | Saved cohort metadata | cohort_id, name, created_at |
| persons | Core person identity | person_id, ssn, demographics |
| patients | PatientSim entities | patient_id, mrn, person_id |
| members | MemberSim entities | member_id, mbi, person_id |
| rx_members | RxMemberSim entities | rx_member_id, rx_id, person_id |

## Related Skills

- [Generation Skills](../generation/SKILL.md) - Profile and journey building
- [PopulationSim](../populationsim/SKILL.md) - Reference data and population targeting
- [NetworkSim](../networksim/SKILL.md) - Provider network modeling

---

*Part of HealthSim Workspace Infrastructure*

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [mark64oswald](https://github.com/mark64oswald)
- **Source:** [mark64oswald/healthsim-workspace](https://github.com/mark64oswald/healthsim-workspace)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-mark64oswald-healthsim-workspace-common
- Seller: https://agentstack.voostack.com/s/mark64oswald
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
