본문으로 건너뛰기
cccskills
무료GitHub에 공개

create-plugin

Create an OpenCode plugin for OpenWork with custom tools and hooks, which run code at specific events. The skill builds the plugin file and adds its entry to the project configuration.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Create an OpenCode plugin for OpenWork. 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'.

설치 방법 보기

이럴 때 유용합니다

  • Adding custom tools to OpenWork
  • Creating a plugin to save and list notes
  • Running custom code before or after tool execution
  • Adapting Anthropic plugin definitions for OpenCode

포함된 파일(1)

  • SKILL.md5.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Skill: Create an OpenCode Plugin

Scaffold a working OpenCode plugin for use in OpenWork.

When to use

  • User asks "create a plugin that does X"
  • User asks "write a plugin" or "make a plugin"
  • User wants to extend OpenWork/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:

AspectOpenCode PluginAnthropic Plugin
Entry pointAsync factory functionManifest JSON
Tool argsZod schema .shapeJSON Schema
RuntimeIn-process (Bun/Node)Sandboxed container
Authprocess.envOAuth/API key in manifest
Distributionnpm / file path / URLAnthropic 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")).join("\n") || "No notes yet.";
        } catch {
          return "No notes yet.";
        }
      },
    },
  },
});

Scaffold workflow

When the user describes what they want the plugin to do:

  1. Create .opencode/plugins/<name>.ts with the plugin code.
  2. Add it to opencode.json plugin array if not already present.
  3. Tell the user to restart their session for the plugin to load.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Manage OpenWork feature releases with feature flags, switches that control access to new behavior. Register features before coding, release them by organization and deployment, prepare a global shutdown option, and remove temporary flags after rollout.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Registering a feature before implementation
  • Releasing a feature to selected organizations
  • Separating cloud and self-hosted availability
different-ai/openwork2.4만2026년 10월 18일 업데이트

Connect OpenCode browser tools to a locally running OpenWork Electron app to inspect its UI, enter a task, and check the response. This skill supports exploration and debugging through CDP, Chrome's remote control protocol.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connecting browser tools to a local Electron development app
  • Inspecting screen state during debugging
  • Entering a task in the composer and running it
different-ai/openwork2.4만2026년 10월 18일 업데이트

Check added lines in a change for information identifying customers, prospects, partners, or outside individuals. Report locations and generic remediation without reproducing identities, and escalate cases where the information is already public.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Checking changes for customer and partner identities
  • Reviewing documents and test data for identifying details
  • Reporting disclosure locations without repeating identities
different-ai/openwork2.4만2026년 10월 18일 업데이트

Connects supported AI clients, including Claude Code and Codex, to OpenWork through MCP, a protocol for accessing external tools. It guides account sign-in and verifies that tools for finding and running organization capabilities are available.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connecting an AI client to OpenWork organization resources
  • Signing in and verifying available MCP tools
  • Switching organizations or troubleshooting authentication
different-ai/openwork2.4만2026년 10월 18일 업데이트

Review an outside contributor’s pull request before running its code. Identify concealed behavior, obfuscated code, risky dependencies, and build hooks, with file locations and specific checks for maintainers to follow up.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Screening an outside contributor’s pull request before execution
  • Checking encoded code and unexplained network calls
  • Reviewing dependency changes and installation scripts
different-ai/openwork2.4만2026년 10월 18일 업데이트

daytona

무료

Set up and troubleshoot Daytona sandbox environments, which provide isolated spaces for running applications. The skill covers CLI authentication, persistent desktop and server sandboxes, diagnostic logs, shared secrets storage, snapshot refreshes, and environment deletion.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Troubleshooting Daytona authentication and organization selection
  • Keeping an Electron or server sandbox available for debugging
  • Preparing shared secrets storage for sandboxes
different-ai/openwork2.4만2026년 10월 18일 업데이트

different-ai의 스킬 모두 보기

이 스킬의 문제 신고