This skill covers building extensions for OpenCode, an open-source AI coding assistant. OpenCode's plugin system allows customizing agents, tools, hooks, and more.
1. Plugins are the extension mechanism Everything in OpenCode is extended through plugins. A plugin is a TypeScript function that returns configuration for agents, tools, hooks, and other features. Plugins can be distributed via npm.
2. Agents define AI behaviour Agents are configured AI assistants with specific prompts, models, and tool access. OpenCode has two modes: primary (main agent) and subagent (delegated tasks). Agent prompts are full TypeScript strings, giving complete control.
قم ببناء المكونات الإضافية والوكلاء والخطافات والأدوات الخاصة بـ OpenCode. يُستخدم عند إنشاء ملحقات OpenCode أو مراجعتها أو تصحيح أخطاءها. يغطي بنية البرنامج المساعد، وتكوين الوكيل، وخطافات دورة الحياة، والأدوات المخصصة، والتوزيع. قم بالاستدعاء بشكل استباقي عندما يذكر المستخدم مكونات OpenCode الإضافية أو الوكلاء أو الخطافات أو يريد توسيع وظائف OpenCode. المصدر: mikekelly/opencode-promode.