create-plugin skill
✓ 検証済み正しいAPIの形状、ツール定義、およびフックの登録を備えた、iPolloWork用のOpenCodeプラグインの雛形を作成します。
- GitHubスター
- 7,451
- ファイル
- 1
- 最終コミット
- 2026年11月11日
- ライセンス
- —
- 許可されたツール
- —
create-plugin skillは何をしますか
create-pluginはAgent Skillsです。 正しいAPIの形状、ツール定義、およびフックの登録を備えた、iPolloWork用のOpenCodeプラグインの雛形を作成します。.
skillのSKILL.mdから生成された要約。
create-plugin skill について
このSKILLは、カスタムツールやフックを使用してランタイムを拡張したい開発者のために、iPolloWork用のOpenCodeプラグインの雛形を作成することを可能にします。エージェントがプラグインの作成または記述のリクエストを受けた際、このSKILLを使用して、非同期ファクトリ関数を含むTypeScriptファイルを生成します。この関数は、ツールの動作、システムプロンプトの変換、およびライフサイクルイベントへの反応を定義するhooksオブジェクトを生成します。
このSKILLは、ツールの引数にZodスキーマの形状を使用することや、実行関数から文字列または特定のメタデータオブジェクトを返すことなど、生成されたコードが特定の要件に従うことを保証します。プロジェクトディレクトリ、グローバル設定フォルダ、または外部のnpmパッケージに配置されるプラグインの構造的なセットアップを処理します。これらのファイルの作成を自動化し、opencode.json設定に必要な登録手順を提供することで、開発者がfetchやファイルシステムアクセスなどの標準的なNodeまたはBunの機能を使用して、プロセス内ロジックを実装するのを支援します。
エージェントができること
- 1新しいプラグインファイルの生成ローカルのプロジェクトディレクトリにTypeScriptのプラグインファイルを作成し、iPolloWorkに新しい機能を追加します。
- 2カスタムエージェントツールの定義エージェントが呼び出せるよう、特定のZod引数形状と実行ロジックを備えた新しいツールを開発します。
- 3システム指示の変更エージェントのシステムプロンプトに補足的な指示を注入するフックを実装します。
- 4設定へのプラグイン登録opencode.jsonファイルを更新し、新しく作成されたプラグインが自動的に検出されるようにします。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
create-plugin skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。Claude Codeにcreate-plugin skillをインストールする
~/.claude/skills/create-plugin/SKILL.md
$ npx degit Devin-AXIS/iPolloWork/.opencode/skills/create-plugin ~/.claude/skills/create-pluginClaude Code (project)にcreate-plugin skillをインストールする
.claude/skills/create-plugin/SKILL.md
$ npx degit Devin-AXIS/iPolloWork/.opencode/skills/create-plugin .claude/skills/create-pluginCodexにcreate-plugin skillをインストールする
~/.agents/skills/create-plugin/SKILL.md
$ npx degit Devin-AXIS/iPolloWork/.opencode/skills/create-plugin ~/.agents/skills/create-pluginGemini CLIにcreate-plugin skillをインストールする
~/.gemini/skills/create-plugin/SKILL.md
$ npx degit Devin-AXIS/iPolloWork/.opencode/skills/create-plugin ~/.gemini/skills/create-pluginClaude.aiにcreate-plugin skillをインストールする
npx degit Devin-AXIS/iPolloWork/.opencode/skills/create-plugin create-plugin && zip -r create-plugin.zip create-plugin # claude.ai → Customize → Skills → + → Create skill → Upload a skill → create-plugin.zip
自動チェック
実行日 2026年11月14日詳細レポート →自動チェックに合格しました。これはセキュリティ監査ではありません。エージェントに実行させる前にスクリプトを読んでください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能devin-axis/ipollowork/.opencode/skills/create-plugin is public and reachablegithub.com/devin-axis/ipollowork/tree/HEAD/.opencode/skills/ ↗合格
- オープンソースライセンス (OSI)No license検出事項
- 過去1年以内にコミットまたはリリースありLast commit 2026-11-11github.com/devin-axis/ipollowork/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がないNo scripts in the skill folder合格
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/devin-axis/ipollowork/blob/HEAD/.opencode/skills/ ↗合格
- 事前許可ツールが限定されているNo pre-approved tools; the agent asks before using onegithub.com/devin-axis/ipollowork/blob/HEAD/.opencode/skills/ ↗合格
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.jsonpluginarray - URL:
file:orhttps:path in thepluginarray
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
- Export default an async function that returns the hooks object.
- Tool args use
zodSchema.shape(aZodRawShape), not theZodObject. executereturns astringor{ output: string; metadata?: Record<string, unknown> }.- Tools are declared, not registered imperatively — return them in the hooks object.
fetch()works — plugins run in-process inside the OpenCode runtime.process.envis 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:
- Rewrite the tool definitions using Zod instead of JSON Schema.
- Move any auth from the manifest to env vars or
opencode.jsonprovider config. - Export the async factory function instead of the manifest.
- 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:
- Create
.opencode/plugins/<name>.tswith the plugin code. - Add it to
opencode.jsonpluginarray if not already present. - Tell the user to restart their session for the plugin to load.
このスキルのファイル
1create-plugin skillに関する質問
Claude Codeにcreate-plugin skillをインストールするには
npx degit Devin-AXIS/iPolloWork/.opencode/skills/create-plugin ~/.claude/skills/create-pluginを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
create-plugin skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
OpenCodeプラグインはAnthropicのプラグインと互換性がありますか?
いいえ、異なります。AnthropicのプラグインはManifest JSONとJSON Schemaを使用しますが、OpenCodeプラグインは非同期ファクトリ関数とZodスキーマを使用します。