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
npx skills add Insilico-org/plsi --skill extend -a claude-codeWhat 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 searchand write its tests.
How to install extend
1Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a claude-code2Manually: put the files in place
~/.claude/skills/extend/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/extend/
1Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a codex2Manually: put the files in place
.agents/skills/extend/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a cursor2Manually: put the files in place
.cursor/skills/extend/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Insilico-org/plsi skills/engineer/extend2Manually: put the files in place
.github/skills/extend/SKILL.md1Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a gemini-cli2Platform CLI
gemini skills install https://github.com/Insilico-org/plsi --path skills/engineer/extendManually: put the files in place
.devin/skills/extend/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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