dynamic-resources Skill

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 ↓

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")],		};	});}