dynamic-resources

Registers skill, prompt, and theme resources dynamically through the resources_discover extension event.

1.3k|142|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/MiniMax-AI/minimax-code --skill dynamic-resources-minimax-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dynamic-resources
Source: https://github.com/MiniMax-AI/minimax-code/tree/main/third_party/pi-mono/packages/coding-agent/examples/extensions/dynamic-resources
Command: npx skills add https://github.com/MiniMax-AI/minimax-code --skill dynamic-resources-minimax-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? It demonstrates how a coding-agent extension can supply skills, prompt templates, and UI themes at runtime instead of relying on statically installed files. ## Core Features & Use Cases - Dynamic Skill Registration: Exposes a SKILL.md file to the agent through the resources_discover event hook. - Prompt Template Delivery: Ships a dynamic.md prompt template that summarizes repository structure and build or test commands. - Custom Theme Provisioning: Provides a dynamic.json theme defining terminal colors, syntax highlighting, and message backgrounds. - Use Case: An extension author building a plugin for the pi coding agent can copy this pattern to bundle skills, prompts, and themes inside a single extension package. ## 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 register a skill dynamically in a coding agent extension?

Listen for the resources_discover event in your extension and return an object with skillPaths 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?

Return the path to a markdown file with YAML frontmatter in the promptPaths array of the resources_discover handler. The frontmatter description is used for discovery and the body becomes the prompt content.

Can an extension provide a custom UI theme for the terminal agent?

Yes, include a JSON file following the theme schema and return its path in themePaths. The theme defines colors for borders, messages, diffs, markdown rendering, and syntax highlighting.

What is the resources_discover event in the pi coding agent?

It is an extension lifecycle event fired when the agent searches for available resources. Handlers return skillPaths, promptPaths, and themePaths so the agent can load extension-provided resources.

What are the limitations of dynamically loaded skills?

Dynamically loaded skills still require a valid SKILL.md with name and description frontmatter to be discovered. The extension must be installed and its event handler registered before discovery occurs.