Extension development

From hugoduncan/psi · View interactive version

Extension development is an AI agent skill from the GitHub repository hugoduncan/psi. Repository-specific guidance for creating, modifying, and debugging psi extensions.

How to use this skill

Skill file

Extension development

Use this skill when creating a new psi extension, modifying an existing one, or debugging extension/runtime interactions.

What an extension is in psi

An extension adds bounded capability to psi through declared integration seams such as tools, prompts, skills, workflows, commands, lifecycle callbacks, deterministic operations, and resolvers. Treat extensions as untrusted capability providers that integrate through explicit contracts, not as peers that reach into session state arbitrarily.

Start with the authoritative docs

Read these first and prefer them over incidental examples:

Useful implementation seams:

Extension location and identity

Check whether the work is:

Use the existing installation and manifest model from doc/extensions-install.md. Stable installed extension identities use manifest-oriented provenance such as manifest:{lib}. Do not invent parallel identity schemes.

Creation guidance

When adding a new extension:

Modification guidance

When changing an existing extension:

Debugging guidance

When debugging extension behavior:

Architecture boundaries to preserve

Align with AGENTS.md and doc/architecture.md:

Verification checklist

For extension work, prove the relevant structural surfaces:

Testing stance

Prefer tests that exercise real runtime seams and observable state/output. Avoid mocks for core behavior when real local components or pure helpers can provide stronger proof.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.