create-gsd-extension
Installation
SKILL.md
<essential_principles>
Extensions are TypeScript modules that hook into GSD's runtime (built on pi). They export a default function receiving ExtensionAPI and use it to subscribe to events, register tools/commands/shortcuts, and interact with the session.
GSD extension paths:
- Global extensions:
~/.gsd/agent/extensions/*.tsor~/.gsd/agent/extensions/*/index.ts - Project-local extensions:
.gsd/extensions/*.tsor.gsd/extensions/*/index.ts
The three primitives:
- Events — Listen and react (
pi.on("event", handler)). Can block tool calls, modify messages, inject context. - Tools — Give the LLM new abilities (
pi.registerTool()). LLM calls them autonomously. - Commands — Give users slash commands (
pi.registerCommand()). Users type/mycommand.