extend — скилл для Claude Code: расширения PLSI
Скилл extend для Claude Code помогает инженеру PLSI добавить операцию, которую нельзя описать картой или одной формулой. Он включается, когда PLSI не читает нужный формат, не выполняет расчёт или не ищет источник данных.
MIT ★ 93 обновлён 2026-11-15
npx skills add Insilico-org/plsi --skill extend -a claude-codeЧто делает extend
extend описывает, как создать для PLSI отдельный пакет расширения: импортёр файла, вычислитель производного значения или источник результатов поиска. Пакет размещают вне репозитория PLSI; в нём нужны plsi_extension.yaml, main.py и тесты на синтетических данных. Карты и формулы к расширениям не относятся: такие пробелы передают владельцу через result.
Сначала пишут тесты, затем код и устанавливают пакет командами plsi ext install --dir my_ext и plsi ext list. Установщик запускает тесты в минимальном окружении без ключей и отклоняет запрещённые импорты и изменения PLSI. Код расширения получает полные права пользователя, поэтому установка требует его явного одобрения с указанием источника. Установленные версии неизменяемы: для правок повышают version и устанавливают пакет заново.
Какие задачи решает
- добавить импорт неизвестного PLSI формата
- вычислить производное значение вне одной формулы
- подключить новый источник результатов для поиска доказательств
- проверить расширение на синтетических данных
Примеры запросов агенту
- Создай импортёр для файла
export.file, который PLSI не читает. - Добавь расширение PLSI для вычисления значения по координатам.
- Подключи новый источник для
plsi evidence searchи напиши тесты.
Как установить extend
1Через Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a claude-code2Вручную: положить файлы
~/.claude/skills/extend/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/extend/
1Через Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a codex2Вручную: положить файлы
.agents/skills/extend/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a cursor2Вручную: положить файлы
.cursor/skills/extend/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Insilico-org/plsi skills/engineer/extend2Вручную: положить файлы
.github/skills/extend/SKILL.md1Через Skills CLI (Vercel)
npx skills add Insilico-org/plsi --skill extend -a gemini-cli2Командой платформы
gemini skills install https://github.com/Insilico-org/plsi --path skills/engineer/extendВручную: положить файлы
.devin/skills/extend/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об extend
Как установить extend в Claude Code?
Выполни npx skills add Insilico-org/plsi --skill extend -a claude-code. Файл скилла появится по пути ~/.claude/skills/extend/SKILL.md.
Что делает extend?
Скилл объясняет, как добавить в PLSI импортёр, вычислитель производного значения или источник поиска доказательств. Он описывает структуру пакета, тестирование и установку.
Как безопасно установить расширение PLSI?
Расширение выполняется с правами пользователя. Перед установкой нужно получить его явное одобрение, указав источник кода; проверки установщика служат защитными ограничителями, а не песочницей.
Исходный текст
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