Skip to content

Latest commit

Β 

History

History
27 lines (21 loc) Β· 1.41 KB

File metadata and controls

27 lines (21 loc) Β· 1.41 KB

OpenCode Plugin Context Library

This library provides structured context for AI coding assistants to understand, build, and extend OpenCode plugins. Depending on your task, you can load specific parts of this library.

πŸ“š Library Map

πŸ—οΈ Architecture

Foundational concepts of how plugins are registered and executed.

  • Overview: Basic structure, registration, and context object.
  • Lifecycle: Packaging, manifest, and session lifecycle.

πŸ› οΈ Capabilities

Deep dives into specific plugin features.

  • Events: Detailed list of all 25+ hookable events.
  • Events: Skills Plugin: Practical example of event hooks in the Skills Plugin.
  • Tools: How to build and register custom tools using Zod.
  • Agents: Creating and configuring custom AI agents.

πŸ“– Reference

Guidelines and troubleshooting.

  • Best Practices: Message injection workarounds, security, and performance.

πŸš€ How to use this library

If you are asking an AI to build a new feature:

  1. For a new tool: Provide architecture/overview.md and capabilities/tools.md.
  2. For reacting to events: Provide capabilities/events.md.
  3. For overall plugin architecture: Provide architecture/overview.md and architecture/lifecycle.md.