Skip to content

Quickstart

Needs uv. Steps 1 to 3 use the published package; step 4 uses the synthetic studies in the repository.

1. Install and check the environment

uv tool install pharmaskills
pharmaskills doctor
pharmaskills skills list

pipx install pharmaskills, npx pharmaskills and the Docker image work too; see Install.

doctor reports Python, the CDISC CORE engine, the controlled terminology cache, network access and which agents are detected on the machine. A WARN for the terminology cache or network does not stop anything that works offline.

2. Install the skills into your agent

pharmaskills skills install --agent claude-code

Agents: claude-code, codex, cursor, gemini-cli, opencode. Add --skill sdtm-mapper to install one skill only. Skills work without the tools package in a degraded, template-only mode that is clearly marked unverified; see Install.

3. Run a deterministic tool

Sample size for a two-arm trial, difference 0.5 SD, 90 percent power, 5 percent two-sided alpha:

pharmaskills stats sample-size --design two-means --delta 0.5 --sd 1 --power 0.9 --alpha 0.05

The committed example output reports 86 per arm (172 in total). Every tool command accepts --json for machine-readable output.

4. Run the SDTM mapper on a synthetic study

git clone https://github.com/aiagentpro/pharmaskills
cd pharmaskills
pharmaskills sdtm run synthetic/studies/PSK-001 \
  --spec synthetic/studies/PSK-001/gold/spec.yaml \
  --ct-file tests/fixtures/ct/sdtm_terminology_subset.txt --no-model

This builds the datasets, validates them, writes Define-XML 2.1, a reviewer's guide draft and a traceability matrix, and writes run_manifest.json. The validation report names the engine that ran. Read how to interpret it.

5. Ask your agent

With the skills installed, ask in your agent, for example:

Map the raw EDC exports in ./study to SDTM and show me the mappings that need review.

Draft the safety section of the CSR from the TLFs in ./tlf and trace every number.

The agent loads the matching skill, calls the deterministic tools, and reports what passed and failed. Review everything: outputs are drafts.

Next