[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1V2XMG2756RS4BR6PZVB2":3,"skill-same:01M7F1V2XMG2756RS4BR6PZVB2":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7F1V2XMG2756RS4BR6PZVB2","agent-orchestration",null,"Initialize, configure, and safely exercise the MedRAX LangGraph agent with a selected tool registry, prompt sections, OpenAI-compatible chat model, checkpointed threads, and tool-call logs.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fagent-orchestration\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: agent-orchestration\ndescription: \"Initialize, configure, and safely exercise the MedRAX LangGraph\n  agent with a selected tool registry, prompt sections, OpenAI-compatible chat\n  model, checkpointed threads, and tool-call logs.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: Apache 2.0\n---\n\n# MedRAX agent orchestration\n\nUse this skill when a Researcher needs the MedRAX control plane rather than the\nimplementation details of a particular chest-X-ray model. It covers building an\n`Agent`, selecting tools without accidentally loading optional weights, choosing\nan OpenAI-compatible endpoint, loading the medical system prompt, invoking a\ncheckpointed thread, and inspecting tool-call logs.\n\nDo not use this skill to explain a model's input\u002Foutput semantics. Route those\nquestions to `chest-xray-analysis`. Route DICOM and visualization work to\n`image-data-utilities`, UI\u002Fdemo launch to `web-interface`, and benchmark cases\nor metrics to `benchmark-evaluation`.\n\n## Operating contract\n\n- Work from an installed MedRAX package and a caller-owned prompt file. The\n  bundled `resources\u002Fsystem_prompts.txt` is a portable template; do not require\n  a source checkout or hard-coded checkout path.\n- Keep model-weight directories, temporary files, logs, and credentials outside\n  the skill tree. Never put API keys in code or prompt files.\n- Treat medical output as decision support, not a diagnosis. Preserve tool\n  results and uncertainty for the caller to review.\n- Before constructing the real agent, run the bundled safe checker when the\n  environment or dependency set is uncertain:\n  `python scripts\u002Fcheck_medrax_import.py --project-root .`.\n  It parses signatures and performs only lightweight imports; it does not create\n  a `ChatOpenAI`, initialize a tool, download weights, or make a network call.\n\n## Standard initialization\n\n1. Confirm an accessible prompt file containing `[MEDICAL_ASSISTANT]` (or choose\n   another explicit section) and a writable `temp_dir` if a selected utility\n   needs temporary files.\n2. Choose a small `tools_to_use` list. The exact registry in\n   `main.initialize_agent` is documented in [api-reference.md](references\u002Fapi-reference.md).\n   Start with `ImageVisualizerTool` and `DicomProcessorTool` for orchestration\n   smoke tests; add model-backed tools only after their own sibling skill and\n   backend are ready.\n3. Build `openai_kwargs` from the process environment. Pass `api_key` and,\n   when needed, `base_url`; never print either value. A local OpenAI-compatible\n   service commonly uses `OPENAI_BASE_URL=http:\u002F\u002Flocalhost:11434\u002Fv1` and a\n   provider-specific placeholder key. See [workflows.md](references\u002Fworkflows.md).\n4. Call the adapted `scripts\u002Fmedrax_agent_factory.py` function\n   `build_agent(prompt_file, tools_to_use=..., model_dir=..., temp_dir=...,\n   device=..., model=..., temperature=..., top_p=..., openai_kwargs=...)`;\n   it returns `(agent, tools_dict)` and refuses an implicit all-tools selection.\n   When integrating with the original application, the equivalent\n   `main.initialize_agent` signature is recorded in [api-reference.md](references\u002Fapi-reference.md).\n5. Invoke the compiled graph with a message state and a stable configurable\n   thread identifier, for example:\n   `agent.workflow.invoke({\"messages\": [HumanMessage(content=\"...\")]},\n   {\"configurable\": {\"thread_id\": \"smoke-001\"}})`.\n   Keep the same `thread_id` to continue a conversation; use a new one for an\n   isolated run. Exact invocation and fake-model examples are in the workflow\n   reference.\n\n## Safety and selection rules\n\n- `tools_to_use=None` selects every registered tool. In this implementation,\n  an empty list is also replaced by every tool because selection uses\n  `tools_to_use or all_tools.keys()`; use a non-empty explicit list when\n  excluding model-backed tools.\n- Unknown names are silently ignored by `initialize_agent`. Compare\n  `set(requested) - set(tools_dict)` after initialization and fail closed in a\n  wrapper if any were omitted.\n- Do not select `LlavaMedTool`, `XRayPhraseGroundingTool`,\n  `ChestXRayGeneratorTool`, `XRayVQATool`, `ChestXRayReportGeneratorTool`, or\n  other weight-backed tools merely to test graph wiring. Their constructors may\n  download or load large models. The two utility tools are the safe default.\n- `Agent` binds every constructed tool through `model.bind_tools(tools)`. A\n  model that cannot bind LangChain tool schemas is not a compatible backend.\n- Use `MemorySaver()` as the in-memory checkpointer for a process-local test.\n  It is not a durable or multi-process store; do not present it as persistence.\n\n## Agent state machine and logs\n\n`Agent` stores `messages` as an append-only `AgentState` field. The compiled\nLangGraph starts at `process`, invokes the bound model, routes to `execute` if\nthe last response has tool calls, executes each call by registered name, then\nreturns to `process`. An unknown call name yields a `ToolMessage` containing\n`invalid tool, please retry`; it is not executed. A response with no tool calls\nends the graph.\n\nWith `log_tools=True` (the `initialize_agent` default), `log_dir` defaults to\n`logs`; the agent creates that directory and writes timestamped\n`tool_calls_YYYYMMDD_HHMMSS.json` files containing `tool_call_id`, `name`,\n`args`, `content`, and an ISO timestamp. Set `log_tools=False` for a no-log\nsynthetic test. Ensure `log_dir` exists or its parent is writable; avoid\nsensitive arguments in logs and treat log files as sensitive operational data.\n\nFor API details, tool registry entries, prompt parsing, and failure recovery,\nuse the linked references rather than guessing parameter names. For a\nsource-independent construction path, import `build_agent` from\n`scripts\u002Fmedrax_agent_factory.py`; importing that module alone performs no model,\ntool, or network operation. Its command-line default only prints safe help.\n","# MedRAX agent orchestration\n\nUse this skill when a Researcher needs the MedRAX control plane rather than the\nimplementation details of a particular chest-X-ray model. It covers building an\n`Agent`, selecting tools without accidentally loading optional weights, choosing\nan OpenAI-compatible endpoint, loading the medical system prompt, invoking a\ncheckpointed thread, and inspecting tool-call logs.\n\nDo not use this skill to explain a model's input\u002Foutput semantics. Route those\nquestions to `chest-xray-analysis`. Route DICOM and visualization work to\n`image-data-utilities`, UI\u002Fdemo launch to `web-interface`, and benchmark cases\nor metrics to `benchmark-evaluation`.\n\n## Operating contract\n\n- Work from an installed MedRAX package and a caller-owned prompt file. The\n  bundled `resources\u002Fsystem_prompts.txt` is a portable template; do not require\n  a source checkout or hard-coded checkout path.\n- Keep model-weight directories, temporary files, logs, and credentials outside\n  the skill tree. Never put API keys in code or prompt files.\n- Treat medical output as decision support, not a diagnosis. Preserve tool\n  results and uncertainty for the caller to review.\n- Before constructing the real agent, run the bundled safe checker when the\n  environment or dependency set is uncertain:\n  `python scripts\u002Fcheck_medrax_import.py --project-root .`.\n  It parses signatures and performs only lightweight imports; it does not create\n  a `ChatOpenAI`, initialize a tool, download weights, or make a network call.\n\n## Standard initialization\n\n1. Confirm an accessible prompt file containing `[MEDICAL_ASSISTANT]` (or choose\n   another explicit section) and a writable `temp_dir` if a selected utility\n   needs temporary files.\n2. Choose a small `tools_to_use` list. The exact registry in\n   `main.initialize_agent` is documented in [api-reference.md](references\u002Fapi-reference.md).\n   Start with `ImageVisualizerTool` and `DicomProcessorTool` for orchestration\n   smoke tests; add model-backed tools only after their own sibling skill and\n   backend are ready.\n3. Build `openai_kwargs` from the process environment. Pass `api_key` and,\n   when needed, `base_url`; never print either value. A local OpenAI-compatible\n   service commonly uses `OPENAI_BASE_URL=http:\u002F\u002Flocalhost:11434\u002Fv1` and a\n   provider-specific placeholder key. See [workflows.md](references\u002Fworkflows.md).\n4. Call the adapted `scripts\u002Fmedrax_agent_factory.py` function\n   `build_agent(prompt_file, tools_to_use=..., model_dir=..., temp_dir=...,\n   device=..., model=..., temperature=..., top_p=..., openai_kwargs=...)`;\n   it returns `(agent, tools_dict)` and refuses an implicit all-tools selection.\n   When integrating with the original application, the equivalent\n   `main.initialize_agent` signature is recorded in [api-reference.md](references\u002Fapi-reference.md).\n5. Invoke the compiled graph with a message state and a stable configurable\n   thread identifier, for example:\n   `agent.workflow.invoke({\"messages\": [HumanMessage(content=\"...\")]},\n   {\"configurable\": {\"thread_id\": \"smoke-001\"}})`.\n   Keep the same `thread_id` to continue a conversation; use a new one for an\n   isolated run. Exact invocation and fake-model examples are in the workflow\n   reference.\n\n## Safety and selection rules\n\n- `tools_to_use=None` selects every registered tool. In this implementation,\n  an empty list is also replaced by every tool because selection uses\n  `tools_to_use or all_tools.keys()`; use a non-empty explicit list when\n  excluding model-backed tools.\n- Unknown names are silently ignored by `initialize_agent`. Compare\n  `set(requested) - set(tools_dict)` after initialization and fail closed in a\n  wrapper if any were omitted.\n- Do not select `LlavaMedTool`, `XRayPhraseGroundingTool`,\n  `ChestXRayGeneratorTool`, `XRayVQATool`, `ChestXRayReportGeneratorTool`, or\n  other weight-backed tools merely to test graph wiring. Their constructors may\n  download or load large models. The two utility tools are the safe default.\n- `Agent` binds every constructed tool through `model.bind_tools(tools)`. A\n  model that cannot bind LangChain tool schemas is not a compatible backend.\n- Use `MemorySaver()` as the in-memory checkpointer for a process-local test.\n  It is not a durable or multi-process store; do not present it as persistence.\n\n## Agent state machine and logs\n\n`Agent` stores `messages` as an append-only `AgentState` field. The compiled\nLangGraph starts at `process`, invokes the bound model, routes to `execute` if\nthe last response has tool calls, executes each call by registered name, then\nreturns to `process`. An unknown call name yields a `ToolMessage` containing\n`invalid tool, please retry`; it is not executed. A response with no tool calls\nends the graph.\n\nWith `log_tools=True` (the `initialize_agent` default), `log_dir` defaults to\n`logs`; the agent creates that directory and writes timestamped\n`tool_calls_YYYYMMDD_HHMMSS.json` files containing `tool_call_id`, `name`,\n`args`, `content`, and an ISO timestamp. Set `log_tools=False` for a no-log\nsynthetic test. Ensure `log_dir` exists or its parent is writable; avoid\nsensitive arguments in logs and treat log files as sensitive operational data.\n\nFor API details, tool registry entries, prompt parsing, and failure recovery,\nuse the linked references rather than guessing parameter names. For a\nsource-independent construction path, import `build_agent` from\n`scripts\u002Fmedrax_agent_factory.py`; importing that module alone performs no model,\ntool, or network operation. Its command-line default only prints safe help.\n",{"name":5,"license":24,"metadata":25,"description":7,"disable-model-invocation":27},"Apache 2.0",{"disco-role":26},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fagent-orchestration",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill agent-orchestration",{"tool":42,"command":43},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill agent-orchestration",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill agent-orchestration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fagent-orchestration\u002FSKILL.md",[49,55,59,63],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fapi-reference.md","REFERENCE","参考文档",6206,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fagent-orchestration\u002Freferences\u002Fapi-reference.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Ftroubleshooting.md",5906,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fagent-orchestration\u002Freferences\u002Ftroubleshooting.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fworkflows.md",6800,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fagent-orchestration\u002Freferences\u002Fworkflows.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"resources\u002Fsystem_prompts.txt",660,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fagent-orchestration\u002Fresources\u002Fsystem_prompts.txt",[68,76,81,88,95,102],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":77,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]