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★ 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), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…