From ai-eng-plugin-dev
Guides creation of extensions for Claude Code and OpenCode, covering plugins, commands, agents, skills, custom tools, format specs, best practices, and the ai-eng-system build system.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-eng-plugin-dev:plugin-devThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Creating high-quality plugins is critical to your development workflow's long-term success.** Plugins are used repeatedly by yourself and others. Design flaws, poor documentation, or broken functionality compound over time and across users. A well-designed plugin becomes a trusted tool used daily; a poorly designed plugin becomes abandoned technical debt. Invest time in architecture, testing,...
Creating high-quality plugins is critical to your development workflow's long-term success. Plugins are used repeatedly by yourself and others. Design flaws, poor documentation, or broken functionality compound over time and across users. A well-designed plugin becomes a trusted tool used daily; a poorly designed plugin becomes abandoned technical debt. Invest time in architecture, testing, and documentation—the returns multiply across all future uses.
** approach plugin development systematically.** Plugins require careful planning: understand the problem, design the API, implement incrementally, test thoroughly, and document comprehensively. Don't rush to code—clarify requirements, define interfaces, and consider edge cases first. Build iteratively, validate frequently, and refactor continuously. Every design decision impacts maintainability and extensibility.
The create a plugin that balances specificity with flexibility perfectly, but if you can:
The challenge is designing plugins that solve specific problems while staying flexible enough for future use cases. Can you create focused, opinionated tools that don't paint yourself into corners?
After completing or reviewing plugin development, rate your confidence from 0.0 to 1.0:
Identify uncertainty areas: Is the plugin's purpose clear? Are there edge cases unhandled? Will the plugin work as requirements change? What's the maintenance burden?
The ai-eng-system supports extension development for both Claude Code and OpenCode through a unified content system with automated transformation. Understanding this system enables creating well-organized, maintainable extensions that integrate seamlessly with both platforms.
| Type | Claude Code | OpenCode | Shared Format |
|---|---|---|---|
| Commands | ✅ YAML frontmatter | ✅ Table format | YAML frontmatter |
| Agents | ✅ YAML frontmatter | ✅ Table format | YAML frontmatter |
| Skills | ✅ Same format | ✅ Same format | SKILL.md |
| Hooks | ✅ hooks.json | ✅ Plugin events | Platform-specific |
| Custom Tools | ❌ (use MCP) | ✅ tool() helper | OpenCode only |
| MCP Servers | ✅ .mcp.json | ✅ Same format | Same format |
Create content in content/ directory, let build.ts transform to platform formats:
content/
├── commands/my-command.md → dist/.claude-plugin/commands/
│ → dist/.opencode/command/ai-eng/
└── agents/my-agent.md → dist/.claude-plugin/agents/
→ dist/.opencode/agent/ai-eng/
Create directly in platform directories:
.claude/commands/, .claude-plugin/.opencode/command/, .opencode/agent/| Location | Claude Code | OpenCode |
|---|---|---|
| Project | .claude/ | .opencode/ |
| Global | ~/.claude/ | ~/.config/opencode/ |
rules, skills, agents, commands, hooks, mcpServers.~/.cursor/plugins/local/<plugin-name>/.Inputs: kebab-case name, purpose, component set, single-plugin vs marketplace repo.
Steps:
~/.cursor/plugins/local/<plugin-name>/ unless user specifies otherwise)..cursor-plugin/plugin.json, README.md, LICENSE, optional CHANGELOG.md.name required; recommend version, description, author, license, keywords)..mdc, skills skills/*/SKILL.md, agents/commands markdown)..cursor-plugin/marketplace.json with relative source.Guardrails: one focused use case; concise actionable text; no references to missing files.
Before release or marketplace submission:
plugin.json, kebab-case name, coherent metadata.Canonical (content/):
---
name: my-command
description: What this command does
agent: build # Optional: which agent handles this
subtask: true # Optional: run as subtask
temperature: 0.3 # Optional: temperature
tools: # Optional: tool restrictions
read: true
write: true
---
Claude Code Output: Same format (YAML frontmatter)
OpenCode Output: YAML frontmatter with OpenCode-compatible fields
---
description: Description here
agent: build
---
Canonical (content/):
---
name: my-agent
description: Use this agent when... <example>...</example>
mode: subagent
color: cyan
temperature: 0.3
tools:
read: true
write: true
---
Claude Code Output: Same format (YAML frontmatter)
OpenCode Output: YAML frontmatter with OpenCode-compatible fields
---
description: Description here
mode: subagent
---
Both platforms use identical format:
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description)
│ └── Markdown body (1,000-3,000 words)
└── Bundled Resources (optional)
├── references/ # Detailed documentation
├── examples/ # Working code
└── scripts/ # Utility scripts
Use TypeScript with tool() helper:
import { tool } from "@opencode-ai/plugin"
export default tool({
description: "Tool description",
args: {
param: tool.schema.string().describe("Parameter description"),
},
async execute(args, context) {
// Tool implementation
return result
},
})
ai-eng-system/
├── content/
│ ├── commands/ # Add new commands here
│ └── agents/ # Add new agents here
├── skills/
│ └── plugin-dev/ # This skill
└── build.ts # Transforms to both platforms
Project-local:
.claude/commands/, .claude-plugin/.opencode/command/, .opencode/agent/Global:
~/.claude/commands/, ~/.claude-plugin/~/.config/opencode/command/, ~/.config/opencode/agent/Components:
hooks/hooks.json.mcp.jsonManifest: .claude-plugin/plugin.json
{
"name": "plugin-name",
"version": "1.0.0",
"description": "Brief description",
"commands": ["./commands/*"],
"mcpServers": "./.mcp.json"
}
Components:
Plugin: .opencode/plugin/plugin.ts
import { Plugin } from "@opencode-ai/plugin"
export default (async ({ client, project, directory, worktree, $ }) => {
return {
// Plugin hooks here
}
}) satisfies Plugin
Use plugin-dev commands:
/ai-eng/create-agent - Create new agent/ai-eng/create-command - Create new command/ai-eng/create-skill - Create new skill/ai-eng/create-tool - Create new custom toolcd ai-eng-system
bun run build # Build all platforms
bun run build --watch # Watch mode
bun run build --validate # Validate content
Claude Code:
claude plugin add https://github.com/v1truv1us/ai-eng-system
OpenCode:
# Project-local
./setup.sh
# Global
./setup-global.sh
content/references/claude-code-plugins.md - Claude Code specificsreferences/opencode-plugins.md - OpenCode specificsreferences/command-format.md - Command syntax guidereferences/agent-format.md - Agent configuration guidereferences/skill-format.md - Skills specificationreferences/opencode-tools.md - Custom tool development| Excuse | Counter |
|---|---|
| "I'll test the plugin after I finish all features" | Test incrementally. Untested plugins accumulate bugs that are hard to trace. |
| "The canonical format is optional" | Canonical format ensures cross-platform compatibility. Use it or break one platform. |
| "I don't need to document platform differences" | Platform differences are where plugins break. Document them or users will hit them. |
| "Security is not a concern for internal plugins" | Internal plugins run with the same privileges as external ones. Validate inputs always. |
| "The frontmatter fields are self-explanatory" | Missing or malformed frontmatter causes silent failures. Validate before deploying. |
Study existing components in ai-eng-system:
content/commands/plan.md - Command structurecontent/agents/architect-advisor.md - Agent structureskills/prompting/incentive-prompting/SKILL.md - Skill structurebun run build --validate to check contentThe plugin-dev system integrates seamlessly with existing ai-eng-system components:
/ai-eng/plan - Implementation planning/ai-eng/review - Code review/ai-eng/work - Task executionai-eng/architect-advisor - Architecture guidanceai-eng/frontend-reviewer - Frontend reviewai-eng/seo-specialist - SEO optimization/ai-eng/create-plugin - Full plugin development workflow/ai-eng/create-agent - Quick agent creation/ai-eng/create-command - Quick command creation/ai-eng/create-skill - Quick skill creation/ai-eng/create-tool - Quick tool creationAll use the same quality standards and research-backed prompting techniques.
npx claudepluginhub p/v1truv1us-ai-eng-plugin-dev-plugins-ai-eng-plugin-devGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Reference for writing and editing skills with predictable behavior, covering invocation models, description writing, and information hierarchy.
2plugins reuse this skill
First indexed Jul 8, 2026