Logo de Spawn From Declared State

Spawn From Declared State

Communauté
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).

Présentation

Éditeurrandommonicle
Dépôtclaude-skills
Nom de la compétencespawn-from-declared-state
Étoiles
27
Forks
3
Fichiers inclus
Instructions uniquement
LicenceApache-2.0
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont en simple Markdown, et non en code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Tout dans les instructions

    Tout ce dont le modèle a besoin se trouve dans les instructions : aucun fichier supplémentaire à synchroniser.

  • Open source

    Publiée par randommonicle sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Spawn From Declared State dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Collez l’URL du dossier de la compétence indiquée ci-dessous, puis confirmez.
    https://github.com/randommonicle/claude-skills/tree/main/spawn-from-declared-state
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter → Via URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

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
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Spawn From Declared State dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Spawn From Declared State dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, Spawn From Declared State n’est pas lié au modèle pour lequel cette compétence a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

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.

Foire aux questions

À quoi sert la compétence IA 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...

Pourquoi utiliser Spawn From Declared State sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Spawn From Declared State se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Spawn From Declared State dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/randommonicle/claude-skills/tree/main/spawn-from-declared-state. TypingMind lit le fichier SKILL.md et l’installe sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Spawn From Declared State ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Spawn From Declared State ?

Autant que vous le souhaitez. Tant qu’un modèle prend en charge les compétences, vous pouvez utiliser Spawn From Declared State avec lui : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Spawn From Declared State est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par randommonicle sous licence Apache-2.0. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, modèles de documents ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇