Логотип Spawn From Declared State

Spawn From Declared State

Сообщество
randommonicle
spawn-from-declared-state

A child agent or process inherits whatever its launcher happens to be carrying — settings, hooks, CLAUDE.md, auto-memory, API tokens, MCP servers, and the parent's lifetime — unless the launch declares otherwise. Launch headless agents from an explicit settings source, tool list and environment allowlist; check what the child actually loaded before its output can reach a reader; start anything that must outlive the session from the OS rather than from a session; and tie anything that must not outlive it to its parent's life. Triggers when spawning a headless agent, subprocess, overlay, dev server or watch loop, when writing a launcher or wrapper script, when an agent's output reaches an audience or a third party, and when a long-running helper is started from a session. Does not fire on in-process subagents the harness scopes for you (commission-the-roster owns the roster), or on proving a stop took effect (measure-per-route rule 7).

Обзор

Издательrandommonicle
Репозиторийclaude-skills
Название навыкаspawn-from-declared-state
Звёзды
27
Форки
3
Встроенные файлы
Только инструкции
ЛицензияApache-2.0
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Опубликовано на GitHub: randommonicle. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Spawn From Declared State в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/randommonicle/claude-skills/tree/main/spawn-from-declared-state
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/randommonicle/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/spawn-from-declared-state .claude/skills/spawn-from-declared-state
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Spawn From Declared State в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Spawn From Declared State, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Spawn From Declared State не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Spawn from declared state

A process started from a session is born holding everything the session holds. On this machine that is the operator's CLAUDE.md, their auto-memory, every skill the plugin installs, an OAuth token or ANTHROPIC_* key in the environment, the MCP servers the desktop app configured, and the parent's own lifetime. None of that is chosen. It arrives because nobody wrote down what the child should start from, and a launcher that names two things to remove still passes everything it did not think of.

The cost is not usually a crash. It is a private instruction read out to an audience, a token handed to a process that had no business holding one, a helper killed by an unrelated app update, or a watch loop that outlives everything that knew about it.

The rules

  1. Declare the settings source, do not subtract from the parent's. A child's configuration is named at launch, not inherited and then trimmed. On the Claude CLI the switches that do this, verified on this machine 2026-11-05 with claude --help, are --settings <file-or-json> for an explicit source, --restricted to ignore user, project and local settings files, --strict-mcp-config to use only the MCP servers --mcp-config names, and --bare for minimal mode, which skips hooks, LSP, plugin sync, attribution, auto-memory and CLAUDE.md auto-discovery and sets CLAUDE_CODE_SIMPLE=1. Re-verify with claude --help before relying on any of them: these are the vendor's flags, not the library's, and they move.
  2. An environment is an allowlist, not the launcher's minus two names. Build the child's environment from the variables it needs. A denylist cannot know about the credential that was added to the parent last week, and an inherited ANTHROPIC_* or OAuth token is a capability the child was never meant to be granted.
  3. Check what the child actually loaded, before its output can reach anyone. The launch flags state an intention; the first run reports the fact. Read the session's own account of its memory and instruction sources and fail the run if it loaded anything the launch did not name. A narrating agent, a streamed overlay or any third-party-facing output gets this check before the first token is shown, not after.
  4. Lifetime is declared in both directions. Anything that must outlive the session is started by the OS — a scheduled task or service — never from a session that an app update can close. Anything that must not outlive the session ties itself to its parent's life and is reaped when the parent goes. Neither direction is the default, and both halves fail silently: the first when a desktop update takes the helper down with it, the second when orphaned loops keep running against a heartbeat long after their monitor is gone.
  5. An unreviewed launcher is the whole attack surface. The flags above only hold if every path that spawns the child uses them. One hand-run command, one wrapper that predates the rule, and the child is back to inheriting. Grep for every spawn site when the rule changes (blast-radius-grep), and treat the wrapper as the thing under test, not the agent.

Why these and not a checklist of variables

The five incidents behind this skill differ in which thing leaked — skills, instructions, memory, a token, a process's life — and agree on the shape: the launcher named what it wanted and said nothing about what it was carrying. A list of variables to unset ages badly and was already incomplete each time. Declaring the start state does not.

Provenance

Rimagent 2026-09-26 (a headless claude -p ran the operator's SessionStart hook and loaded 131 skills), 2026-10-02 (the same step loaded the operator's CLAUDE.md and auto-memory into an agent narrating to a stream overlay), 2026-10-14 (a show started from a desktop session would inherit the app's ANTHROPIC_* and CLAUDE_CODE_* variables and an OAuth token), 2026-10-15 (a desktop-app update killed OBS and the overlay because a session had started them), 2026-10-04 (the inverse: 95 orphaned watch loops outlived the monitors that started them and kept an operator heartbeat alive). docs/SKILL_PROPOSALS_2026-11-01.md, Tier 1 item 3, admitted by Ben 2026-11-05.

Adjacent, and deliberately not duplicated: commission-the-roster covers least privilege at creation for an API-created routine or agent (commission-the-roster/SKILL.md:311); measure-per-route rule 7 covers proving a stop took effect (measure-per-route/SKILL.md:34). Neither covers what a spawned child inherits.

Correction to the proposal. Tier 1 item 3 specified the environment variables CLAUDE_CODE_DISABLE_AUTO_MEMORY and CLAUDE_CODE_DISABLE_CLAUDE_MDS. Neither name appears in this repository or in claude --help on this machine as of 2026-11-05; the documented switch covering both is --bare. Rule 1 states the flags that were verified rather than the names the proposal carried.

Часто задаваемые вопросы

Что делает навык ИИ Spawn From Declared State?

A child agent or process inherits whatever its launcher happens to be carrying — settings, hooks, CLAUDE.md, auto-memory, API tokens, MCP servers, and the parent's lifetime — unless the launch declares otherwise. Launch headless agents from an explicit settings source, tool list and environment allowlist; check what the child actually loaded before its output can reach a reader; start anything that must outlive the session from the OS rather than from a session; and tie anything that must not outlive it to its parent's life. Triggers when spawning a headless agent, subprocess, overlay, dev...

Зачем использовать Spawn From Declared State в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Spawn From Declared State — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Spawn From Declared State в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/randommonicle/claude-skills/tree/main/spawn-from-declared-state. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Spawn From Declared State?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Spawn From Declared State?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Spawn From Declared State: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Spawn From Declared State?

Да. Навык опубликован на GitHub автором randommonicle по лицензии Apache-2.0. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇