dynamic-resources

Example skill loaded from resources_discover

Install
npx skills add 'https://github.com/earendil-works/pi/tree/main/packages/coding-agent/examples/extensions/dynamic-resources'
Download bundle ↓
main · 8a7b0c0Scanned 2026-09-15

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

index.ts

index.tsBrowse 4 files
View on GitHub
← Back to SKILL.md
import { dirname, join } from "node:path";import { fileURLToPath } from "node:url";import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; const baseDir = dirname(fileURLToPath(import.meta.url)); export default function (pi: ExtensionAPI) {	pi.on("resources_discover", () => {		return {			skillPaths: [join(baseDir, "SKILL.md")],			promptPaths: [join(baseDir, "dynamic.md")],			themePaths: [join(baseDir, "dynamic.json")],		};	});}