pi-extension-programmatic-subagent

Dispatch Pi extension subagents via JSON config and Node.js process spawning.

Updated May 15, 2026
One-click install
npx skills add https://github.com/ruskibeats/t1d --skill pi-extension-programmatic-subagent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-extension-programmatic-subagent
Source: https://github.com/ruskibeats/t1d/tree/main/.pi/skills-archive/pi-extension-programmatic-subagent
Command: npx skills add https://github.com/ruskibeats/t1d --skill pi-extension-programmatic-subagent

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pi-subagents, and includes scripts (resource) components.

What problem does it solve?

This Skill addresses the limitation of the ExtensionAPI in Pi extensions by enabling programmatic triggering of subagents without manual copy-paste.

Core Features & Use Cases

  • Programmatic Subagent Dispatch: Automates the invocation of subagents from within a Pi extension.
  • pi-subagents Mechanics: Utilizes temp JSON config, child_process.spawn, and jiti runner for execution.
  • Architectural Paths: Offers two methods for auto-dispatch: Controller-Led Assembly or Direct Spawn.
  • Hybrid Fallback: Ensures compatibility with standalone extensions by providing a fallback mechanism.

Quick Start

To dispatch a subagent programmatically, use the 'pi-extension-programmatic-subagent' skill and provide the necessary configuration.

Frequently Asked Questions about pi-extension-programmatic-subagent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate subagent dispatch in Pi extensions to bypass ExtensionAPI limitations?

Programmatic subagent dispatch uses temp JSON config and child_process.spawn with a jiti runner to execute subagents automatically, eliminating manual copy-paste and overcoming ExtensionAPI limitations.

How does programmatic subagent auto-dispatch work under the hood?

Programmatic subagent auto-dispatch works by writing a temporary JSON config, spawning a child process, and using the jiti runner to execute the subagent logic without manual intervention.

Do I need the pi-subagents package to trigger subagents programmatically in Node.js?

Yes, triggering subagents programmatically requires the pi-subagents package installed, along with an understanding of Node.js process spawning and JSON configuration to execute the dispatch correctly.

What is the best way to architect auto-dispatch for standalone Pi extensions?

The best way to architect auto-dispatch is choosing between Controller-Led Assembly or Direct Spawn paths, utilizing a hybrid fallback mechanism to ensure compatibility with standalone Pi extensions.

Why does programmatic subagent dispatch fail to trigger in my extension?

Programmatic subagent dispatch fails if the pi-subagents dependency is missing, if the JSON config is malformed, or if the Node.js child_process.spawn environment lacks the jiti runner.