dynamic-resources

Registers skills, prompt templates, and themes dynamically via the resources_discover extension event.

Updated Sep 7, 2026
One-click install
npx skills add https://github.com/deriye/.agents-work --skill dynamic-resources-deriye
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dynamic-resources
Source: https://github.com/deriye/.agents-work/tree/main/playground/knowledge/ai/agent-harness/projects/pi/packages/coding-agent/examples/extensions/dynamic-resources
Command: npx skills add https://github.com/deriye/.agents-work --skill dynamic-resources-deriye

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @earendil-works/pi-coding-agent.

What problem does it solve? Developers building extensions for the pi coding agent need a way to inject skills, prompt templates, and UI themes at runtime instead of relying on static configuration files. ## Core Features & Use Cases - Dynamic Skill Registration: Exposes a SKILL.md file to the agent through the resources_discover event hook. - Prompt Template Injection: Loads a Markdown prompt template (dynamic.md) that summarizes repository structure and build commands. - Custom Theme Delivery: Provides a JSON theme file defining colors for the interactive terminal UI. - Use Case: An extension author wants to ship a bundled skill, prompt, and theme as one package; this example shows how to return all three resource paths from a single event handler. ## Quick Start Ask the agent to summarize the current repository structure and mention any build or test commands using the dynamically loaded prompt template.

Frequently Asked Questions about dynamic-resources

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

FAQPage Schema
How do I dynamically load a skill in a pi coding agent extension?▼

Register a handler for the resources_discover event using the ExtensionAPI and return an object with a skillPaths array pointing to your SKILL.md file. The agent loads the skill from that path at discovery time.

How do I add a custom prompt template to the pi coding agent?▼

Create a Markdown file with frontmatter containing a description, then return its path in the promptPaths array of the resources_discover event result. The template becomes available as a prompt in the agent.

Can a pi extension provide a custom UI theme?▼

Yes, return a path to a JSON theme file in the themePaths array of the resources_discover result. The JSON must follow the pi theme schema, defining vars and colors for terminal UI elements.

What is the resources_discover event in pi extensions?▼

It is an ExtensionAPI event fired during resource discovery that lets extensions return skillPaths, promptPaths, and themePaths. The agent uses these paths to load skills, prompts, and themes contributed by the extension.

What are the limitations of dynamically loaded resources?▼

Dynamically loaded resources must exist as files on disk at the paths returned by the handler. The example provides only minimal skill and prompt content, so it serves as a structural demonstration rather than a functional workflow.