Skip to main content
skill CX Codex

extend — Claude Code skill for PLSI extensions

extend is a Claude Code skill for adding operations to PLSI that maps and single formulas cannot handle. It comes into play when PLSI needs to read a new file format, run a more involved calculation, or search another evidence source.

MIT ★ 93 updated 2026-11-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Insilico-org/plsi --skill extend -a claude-code
Open on GitHub

What extend does

extend guides a PLSI engineer through building a separate package with an importer, a derived-value calculator, or an evidence search source. The package lives outside the PLSI repository and includes plsi_extension.yaml, main.py, and tests using synthetic data. Map and formula gaps belong with the PLSI owner via result, not in an extension.

The skill puts tests before implementation, then installs the package with plsi ext install --dir my_ext and checks it with plsi ext list. Installation runs tests in a minimal environment without keys and blocks disallowed imports or patches to PLSI. Extensions run with the user's permissions, so installation requires explicit approval that names the code's source. Installed versions cannot be edited; changes require a version bump and another install.

What it helps with

  • import a file format PLSI cannot read
  • calculate a derived value beyond a single formula
  • add a source to PLSI evidence search
  • test an extension with synthetic data

Example prompts for the agent

  • Create an importer for export.file, a format PLSI cannot read.
  • Add a PLSI extension that derives a value from coordinates.
  • Connect a new source to plsi evidence search and write its tests.

How to install extend

1Skills CLI (Vercel)

npx skills add Insilico-org/plsi --skill extend -a claude-code

2Manually: put the files in place

~/.claude/skills/extend/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/extend/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about extend

How do I install extend in Claude Code?

Run npx skills add Insilico-org/plsi --skill extend -a claude-code. The skill file is placed at ~/.claude/skills/extend/SKILL.md.

What does extend do?

It explains how to add a PLSI importer, derived-value calculator, or evidence search source. It covers package structure, tests, and installation.

What approval is needed to install a PLSI extension?

The extension runs with the user's permissions. Installation requires explicit approval naming the code's source; the install checks are guard rails, not a sandbox.

Source text

SKILL.md · MIT
---
name: extend
description: Use as PLSI Engineer when PLSI asks for something the user needs that no map or formula can do - an input format it cannot read, a computation that is not one formula, or a source of evidence it cannot search - so a tested code extension adds the operation.
---

# PLSI extend

Extensions ADD operations; they never replace the core (gates, deid, scoring, the event log).

## When to use

Pick the lowest tier that closes the gap; a map or formula gap goes back in your `result` for PLSI to hand to its
owner:

| Gap | Tier | Skill |
|---|---|---|
| A new area to describe (coordinates, codes) | map | PLSI Data Processor, `processor/add-map` |
| A value computable by one formula | formula | PLSI Data Processor, `processor/add-score` |
| An input format, a non-formula computation, a new evidence source | extension | this skill |

## Steps

1. Name the gap in one line and the extension kind: `importer` (a file format -> observations), `deriver` (a derived
   value from coordinates) or `evidence_source` (search results for `plsi evidence search`).

2. Create the package in the workspace, outside the plsi repo:

   ```
   my_ext/
     plsi_extension.yaml   # id, version (semver), kind, entrypoint main:run, summary, monotone (derivers)
     main.py               # def run(...)
     tests/test_main.py    # tests with synthetic data only
   ```

   Entry points:
   - importer: `def run(data: bytes) -> list[dict]`, items are ObservationInput dicts (`contracts/ObservationInput.schema.json`); `origin` is filled in. Lifestyle items: stable habit name in `original_text`, quantity/frequency in `dose`.
   - deriver: `def run(inputs: dict[str, float], *, age: float | None, sex: str) -> float` (inputs keyed by coordinate id, canonical units). Set `monotone: true` only if the result moves one way in every input.
   - evidence_source: `def run(query: str, limit: int) -> list[dict]` with `title`, `url`, and `kind` + `id` when the item is a pmid, doi, nct, label or evipedia id.

3. Write the tests first, then the code, then install. An extension is full-trust code that runs with the user's
   permissions: install only after the user's explicit approval that names its source (written here, or the URL or
   author it came from). `install` runs the tests with a minimal environment (no keys) and refuses imports outside the
   kind's layer or any patching of plsi; fix every violation it lists. These checks are guard rails, not a sandbox.

   ```bash
   plsi ext install --dir my_ext
   plsi ext list
   ```

4. Use it:

   ```bash
   plsi ingest --instance <instance> --ext my_importer --input export.file --dry-run
   plsi evidence search --source ext:my_source --query "<query>"
   ```

   For a deriver, put the coordinate `derive: {engine: extension, model: <extension id>, inputs: [...]}` in your
   `result`; PLSI hands it to PLSI Health Consultant (`consultant/assess`), who adds it to a user map and projects.

5. Iterate: change the code, bump `version`, install again (installed versions are immutable). `plsi ext test --id <id>`
   re-runs the tests; `plsi ext disable --id <id>` switches an extension off.

## Rules

- Network calls go through `plsi.net` (timeouts, redaction); keys come from `plsi.keys.require("ENV_NAME")`. No secrets in code.
- No personal data in extension code or tests; use synthetic values.
- Derivers are deterministic. Values they produce record `extension:<id>@<version>` in provenance.
- Evidence-source results are leads: verify every ref with `plsi evidence verify` before citing it.
- When an extension has been used in a scored prediction, propose sharing it in your `result` (code only, never user data); PLSI asks.

© Insilico-org · MIT · Insilico-org/plsi

Similar skills

All skills for Backend and APIs →

From the same set85

The whole set →
explain A Claude Code skill for turning research findings into competing, testable explanations. It activates when plsi research next selects explain. CX Codex +1 ★ 93repo stars diet This Claude Code skill builds a nutrition plan around health goals, medical conditions, allergies, and food preferences. It activates for requests about diet, weight, or eating with high cholesterol or glucose. CX Codex +1 ★ 93repo stars history The history Claude Code skill records health events from a personal story, a conversation, or another bot’s notes. It updates relevant PLSI maps and returns past events alongside the current state. CX Codex +1 ★ 93repo stars substances The substances Claude Code skill builds plans to quit or reduce smoking, vaping, or alcohol use. It checks for risks from stopping without supervision and sets a stepwise schedule. CX Codex +1 ★ 93repo stars nudge The nudge Claude Code skill manages reminders between plan check-ins. It schedules messages about follow-up visits, measurement windows and the first days of a plan. CX Codex +1 ★ 93repo stars add-score add-score — a Claude Code skill that adds a new derived measure to a PLSI map. It activates when a request needs a score or equation the existing maps do not compute. CX Codex +1 ★ 93repo stars forget The forget Claude Code skill removes PLSI records tied to one person. It runs when PLSI relays a request to erase the user’s data or that of someone they added. CX Codex +1 ★ 93repo stars mothership This Claude Code skill checks Mothership access and reads its public catalog and findings ledger. It prepares research notes or registry contributions for review by the Data Controller. CX Codex +1 ★ 93repo stars

Project sponsors

Companies that keep this analytics open