Skip to content

OpenCode Formatter

PropertyValue
TierCustom
Main outputOPENCODE.md
Dot directory.opencode/
SkillsYes (.opencode/skills/<name>/SKILL.md)
AgentsYes (.opencode/agents/<name>.md)
CommandsYes (.opencode/commands/<name>.md)
Local filesNo

Output Files

FilePathPurpose
Main instructionsOPENCODE.mdPrimary rule file
Lifecycle hooks.opencode/plugins/promptscript.tsProject hooks in multifile and full modes
Skills.opencode/skills/<name>/SKILL.mdReusable skill definitions in full mode
Commands.opencode/commands/<name>.mdSlash commands
Agents.opencode/agents/<name>.mdAgent configurations

Supported Features

FeatureSupported
Markdown OutputYes
MDC FormatNo
Code BlocksYes
Mermaid DiagramsYes
Single File OutputYes
Multiple Rule FilesYes
Workflow FilesNo
Nested Directory StructureNo
YAML FrontmatterYes
Description in FrontmatterYes
Globs in FrontmatterNo
Activation TypeNo
Glob Pattern TargetingNo
Always Apply RulesYes
Manual ActivationNo
Auto/Model ActivationNo
Structured ExamplesYes
Character Limit ValidationNo
Content Section SplittingYes
Guard DependenciesYes
Context File InclusionNo
@-MentionsNo
Tool IntegrationNo
Path-Specific RulesNo
Prompt FilesNo
Slash CommandsYes
SkillsYes
Agent InstructionsYes
Local MemoryNo
Nested MemoryNo

Limitations & Quirks

  • Main file is OPENCODE.md at project root
  • Full feature support: commands, skills, and agents
  • Commands go to .opencode/commands/<name>.md
  • Skills go to .opencode/skills/<name>/SKILL.md
  • Agents go to .opencode/agents/<name>.md
  • Three output modes: simple, multifile, full
  • @hooks compile to a generated plugin at .opencode/plugins/promptscript.ts in multifile and full modes; only pre-tool-use and post-tool-use map to tool.execute.before and tool.execute.after
  • Generated hook commands start asynchronously, use a 30-second default timeout, and escalate from SIGTERM to SIGKILL; sibling user plugins in .opencode/plugins/ are never touched
  • OpenCode tool hooks expose no model or agent context, so generated payloads omit those fields and compilation reports PS4002
  • OpenCode coverage limits: MCP tool calls and some subagent paths may not fire plugin hooks, and failed tool calls have no dedicated error event
  • OpenCode tool names are lowercase (edit, write, bash); matchers authored for Claude-style names need an opencode target override

Example Output

project-root/
├── OPENCODE.md # Main instructions
└── .opencode/
├── commands/
│ └── review.md # Command definition
├── skills/
│ └── my-skill/
│ └── SKILL.md # Skill definition
├── agents/
│ └── reviewer.md # Agent config
└── plugins/
└── promptscript.ts # Generated lifecycle hooks plugin

Official Documentation