मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग7.4k · #13287

create-plugin

यह क्या करती है

यह स्किल OpenCode कोडिंग टूल के लिए प्लगइन बनाने में एजेंट का मार्गदर्शन करती है। यह उन डेवलपर्स के लिए है जो OpenCode में कस्टम टूल या व्यवहार जोड़ना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप OpenCode में कोई कस्टम टूल जोड़ना चाहते हैं।
  • ✓जब आप एजेंट से OpenCode के लिए प्लगइन लिखवाना या बनवाना चाहते हैं।
  • ✓जब आप OpenCode को नए व्यवहार से बढ़ाना चाहते हैं, जो उसकी घटनाओं से जुड़े।

Skill का लिंक

https://github.com/Devin-AXIS/iPolloWork/blob/main/.opencode/skills/create-plugin/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/Devin-AXIS/iPolloWork/blob/main/.opencode/skills/create-plugin/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“OpenCode के लिए एक प्लगइन बनाइए, जिसमें एक टूल हो जो मेरे प्रोजेक्ट की फ़ाइलों का आकार जाँचे।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट मानक प्लगइन ढाँचा इस्तेमाल करता है: एक async फ़ंक्शन जो टूल और hooks लौटाता है, और इनपुट के नियम zod में लिखे जाते हैं। फ़ाइल सही प्लगइन फ़ोल्डर में रखी जाती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Skill: Create an OpenCode Plugin

Scaffold a working OpenCode plugin for use in iPolloWork.

When to use

  • User asks "create a plugin that does X"
  • User asks "write a plugin" or "make a plugin"
  • User wants to extend iPolloWork/OpenCode with custom tools

Plugin API

An OpenCode plugin is an async factory function that returns a hooks object.

File location

Plugins can live in:

  • Project: .opencode/plugins/my-plugin.ts (auto-discovered)
  • Global: ~/.config/opencode/plugins/my-plugin.ts
  • npm: published as a package, referenced in opencode.json plugin array
  • URL: file: or https: path in the plugin array

Minimal shape

import { z } from "zod";

export default async () => ({
  tool: {
    my_tool_name: {
      description: "What this tool does.",
      args: z.object({
        input: z.string().describe("The input parameter."),
      }).shape,   // NOTE: .shape, not the ZodObject itself
      async execute(args: { input: string }) {
        // Your logic here. Can use fetch(), fs, child_process, etc.
        return `Result: ${args.input}`;
      },
    },
  },
});

Key rules

  1. Export default an async function that returns the hooks object.
  2. Tool args use zodSchema.shape (a ZodRawShape), not the ZodObject.
  3. execute returns a string or { output: string; metadata?: Record<string, unknown> }.
  4. Tools are declared, not registered imperatively — return them in the hooks object.
  5. fetch() works — plugins run in-process inside the OpenCode runtime.
  6. process.env is accessible — use env vars for secrets/config.

Available hooks

{
  // Modify the system prompt
  "experimental.chat.system.transform": async (input, output: { system: string[] }) => {
    output.system.push("Extra instruction for the agent.");
  },

  // Define tools the agent can call
  tool: {
    tool_name: { description, args, execute },
  },

  // Run code before/after a tool executes
  "tool.execute.before": async ({ tool, args }) => { /* ... */ },
  "tool.execute.after": async ({ tool, args, result }) => { /* ... */ },

  // React to lifecycle events
  event: async ({ event }) => { /* ... */ },
}

Registering the plugin

Add to opencode.json:

{
  "plugin": [
    ".opencode/plugins/my-plugin.ts"
  ]
}

Or install from npm:

{
  "plugin": [
    "my-published-plugin"
  ]
}

Anthropic / Claude plugin compatibility

OpenCode plugins are NOT the same as Anthropic's plugin format. Key differences:

Aspect OpenCode Plugin Anthropic Plugin
Entry point Async factory function Manifest JSON
Tool args Zod schema .shape JSON Schema
Runtime In-process (Bun/Node) Sandboxed container
Auth process.env OAuth/API key in manifest
Distribution npm / file path / URL Anthropic marketplace

To adapt an Anthropic plugin for OpenCode:

  1. Rewrite the tool definitions using Zod instead of JSON Schema.
  2. Move any auth from the manifest to env vars or opencode.json provider config.
  3. Export the async factory function instead of the manifest.
  4. HTTP-based Anthropic plugins can often be wrapped as MCP servers instead.

Example: plugin with multiple tools

import { z } from "zod";

export default async () => ({
  "experimental.chat.system.transform": async (_input: unknown, output: { system: string[] }) => {
    output.system.push("You have access to a note-taking system. Use save_note and list_notes.");
  },
  tool: {
    save_note: {
      description: "Save a note with a title and body.",
      args: z.object({
        title: z.string().describe("Note title"),
        body: z.string().describe("Note content"),
      }).shape,
      async execute(args: { title: string; body: string }) {
        const fs = await import("node:fs/promises");
        const path = `.opencode/notes/${args.title.replace(/[^a-zA-Z0-9-_]/g, "_")}.md`;
        await fs.mkdir(".opencode/notes", { recursive: true });
        await fs.writeFile(path, `# ${args.title}\n\n${args.body}\n`);
        return `Saved note: ${path}`;
      },
    },
    list_notes: {
      description: "List all saved notes.",
      args: {},
      async execute() {
        const fs = await import("node:fs/promises");
        try {
          const files = await fs.readdir(".opencode/notes");
          return files.filter(f => f.endsWith(".md")
अक्सर पूछे जाने वाले सवाल

प्लगइन फ़ाइल कहाँ जाती है?

प्रोजेक्ट के plugins फ़ोल्डर में, एक ग्लोबल कॉन्फ़िग फ़ोल्डर में, या एक पैकेज के रूप में साझा करके।

क्या मुझे TypeScript आनी चाहिए?

उदाहरण TypeScript में हैं, इसलिए थोड़ी जानकारी मदद करती है। ज़्यादातर कोड एजेंट लिखता है।

टूल क्या लौटाता है?

टूल का execute चरण एक टेक्स्ट नतीजा लौटाता है, या आउटपुट और वैकल्पिक विवरण वाला एक ऑब्जेक्ट।

जानकारी

लेखक का मूल विवरण

Create an OpenCode plugin for iPolloWork. Scaffolds the plugin file with the correct API shape, tool definitions, and hook registration. Use when the user asks to 'create a plugin', 'write a plugin', or 'make a plugin that does X'.

repo: Devin-AXIS/iPolloWork

लोकप्रियता

GitHub स्टार
7.4k
रैंकिंग में स्थान
#13287
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

image-editing

7.4k

आपके एजेंट को मौजूदा इमेज के चुने हुए हिस्से को संपादित करने, बाकी तस्वीर अपरिवर्तित रखने, और नतीजा नई फ़ाइल के रूप में सहेजने देती है।

डिज़ाइनइमेज और आइकन

image-generation

7.4k

आपके एजेंट को iPolloWork इमेज सेवा के ज़रिए नई इमेज बनाने देती है, माँगी हुई तस्वीर या डिज़ाइन में सहायक विज़ुअल के लिए।

डिज़ाइनइमेज और आइकन

ipollowork-design-editorial

7.4k

आपके एजेंट को iPolloWork डिज़ाइन प्रोजेक्ट में लेख और रिपोर्ट बनाने या संपादित करने देती है, और आपकी स्टाइल टोकन व लेआउट को बनाए रखती है।

डिज़ाइनइंटरफ़ेस (UI/UX)

ipollowork-design-graphics

7.4k

आपके एजेंट को iPolloWork डिज़ाइन सेशन में पोस्टर और सोशल कार्ड की श्रृंखला बनाने या संपादित करने देती है, कार्ड की शैली एकसमान रखते हुए।

डिज़ाइनइमेज और आइकन

मिलती-जुलती skills