You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.9 KiB

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.

🧩 Claude Code Plugins (External)

Claude Code plugin system documentation (harvested from external docs).

🚀 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.