شعار 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 أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها randommonicle على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Spawn From Declared State في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ 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؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق 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 مجانية؟

نعم. نشرها randommonicle على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇