opencode-agent-generator

Generate OpenCode agent files with YAML frontmatter and system prompts.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/mdc159/LSP-Swarm --skill opencode-agent-generator-mdc159
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-agent-generator
Source: https://github.com/mdc159/LSP-Swarm/tree/main/opencode-agents/.claude/skills/opencode-agent-generator
Command: npx skills add https://github.com/mdc159/LSP-Swarm --skill opencode-agent-generator-mdc159

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of OpenCode agents in project folders by generating properly formatted YAML frontmatter and the corresponding agent files, reducing manual setup and human error.

Core Features & Use Cases

  • Generates project-local agent definitions at .opencode/agent/{name}.md with correct YAML frontmatter (description, mode, tools, permissions, and references to prompts).
  • Creates focused system prompts and swarm communication protocols for cooperative agent behavior.
  • Validates syntax and structure to ensure OpenCode serve can load agents reliably, and supports optional components such as scripts, references, and assets when present.

Quick Start

Use the opencode-agent-generator to create a new OpenCode agent by specifying its name and purpose. The skill will create the file at .opencode/agent/{name}.md with a complete, ready-to-load configuration.

Frequently Asked Questions about opencode-agent-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate OpenCode agents with YAML frontmatter in my project?

To generate OpenCode agents, specify the agent name and purpose. The tool creates a .opencode/agent/{name}.md file containing valid YAML frontmatter, system prompts, and swarm communication patterns for immediate deployment.

What is the best way to automate OpenCode agent configuration for swarm communication?

Automating OpenCode agent configuration is best handled by generating .opencode/agent/{name}.md files automatically. This ensures correct YAML syntax for swarm communication protocols and required metadata, reducing manual setup errors.

Does OpenCode serve require YAML frontmatter validation for agent files?

Yes, OpenCode serve requires YAML frontmatter validation to reliably load agents. Validating the structure and syntax of generated .opencode/agent/{name}.md files ensures the deployment loads without configuration errors.

How do I add scripts and references when I create OpenCode agents locally?

When you create OpenCode agents locally, the generator lists optional components like scripts, references, and assets if present. These are integrated into the .opencode/agent/{name}.md file alongside the core YAML metadata.

Can I define multiple OpenCode agents in project folders without manual YAML setup?

You can define multiple OpenCode agents in project folders without manual YAML setup. The generator automates creating individual .opencode/agent/{name}.md files, each with formatted frontmatter, permissions, and tools.

Why does my OpenCode agent file fail to load during serve deployment?

OpenCode agent files fail to load during serve deployment when the YAML frontmatter has structural or syntax errors. Generating files with validated metadata, system prompts, and communication protocols prevents these loading failures.