Command Palette

Search for a command to run...

Назад к скиллам
скилл № 02256

package-contract

Use this skill when a node package being written needs server-side Python, such as a heavy transform or a library with no browser equivalent. It gives the one…

БесплатноБез исполняемых скриптов
urban-toolkitот urban-toolkit★ 37 звёзд на GitHub

Установить package-contract в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Backend contract

Server-side compute follows ONE backend contract (the package backend sandbox, never code loaded into Curio itself). When a template genuinely needs server-side Python (heavy transforms, libraries with no browser equivalent), declare it, never improvise it:

  • Manifest: a top-level backend object, {"entry": "backend/.py", "handlers": [{"name": "<a name matching {{backend.handler_pattern}}>", "timeoutClass": {{backend.timeout_classes}}}]} ({{backend.default_timeout_class}} when left out), plus the '{{backend.server_code_permission}}' permission in permissions (add '{{backend.server_network_permission}}' if and only if the code reaches the network; both are shown to the user at review). A template whose Run invokes a handler declares backendHandler: "".
  • The entry file (shipped under backend/ in files) exposes def handle(payload), or a module-level HANDLERS dict mapping each declared name to a callable. A node run delivers payload {"content": <the node's editor text>, "input": }; return a JSON-serializable result. The build's probe phase loads the entry and resolves every handler before the draft can reach review: an import error or missing callable blocks it. Import declared python dependencies INSIDE your handler function (lazily), never at module level: they install at Apply into the package's isolated overlay and do NOT exist when the probe loads your entry, so a module-level import of a declared dependency fails the probe by construction.
  • The worker is a per-invocation sandboxed process: pure Python plus the manifest's declared python dependencies, payloads up to {{backend.payload_mib}} MiB, results up to {{backend.result_mib}} MiB. The policy scan BLOCKS subprocess/multiprocessing/ctypes and pty, os.(system|popen|exec|spawn|fork), eval/exec/compile/import/importlib, resident-service frameworks (flask, fastapi, django, blueprints, socket servers), and network imports without '{{backend.server_network_permission}}': the sandbox is on-demand, one request per worker. A persistent directory of up to {{backend.data_dir_mib}} MiB rides the {{backend.data_dir_env}} env var; no secrets, credentials, or dataset store exist in the worker.
  • A need beyond this contract (a resident service, a background job, an API key) is a FINDING naming the Curio activation lifecycle or the deferred secret mediation, never smuggled code.

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • evals/evals.json
  • evals/truth.json

FAQ

Что делает скилл package-contract?

Use this skill when a node package being written needs server-side Python, such as a heavy transform or a library with no browser equivalent. It gives the one backend contract a package follows: the manifest's backend entry, handlers, timeout classes and permissions, the payload a handler gets, the lazy imports of declared dependencies, the sandbox's limits, and what to report as a finding instead of writing it.

Как установить скилл package-contract?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл package-contract запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить package-contract с