Source layout
When authoring a facet, organize your files like this:facet.yaml manifest references these files:
Installed layout
Afterfacets install, resources are materialized into the project’s .opencode/ directory:
How files are processed
Skills — verbatim copy
Skill files are copied exactly as they are from source to destination.| Source | Destination |
|---|---|
skills/<name>/SKILL.md | .opencode/skills/<name>/SKILL.md |
Agents — assembled with frontmatter
Agent files are not copied verbatim. The prompt body is read from the source file, and YAML frontmatter is prepended based on the manifest’s agent descriptor. Given this manifest:prompts/my-agent.md):
.opencode/agents/my-agent.md becomes:
descriptionfrom the agent descriptor (if present)toolsfromplatforms.opencode.tools(if present)
Commands — assembled with frontmatter
Commands follow the same pattern as agents, but the frontmatter only includesdescription:
Tools — verbatim copy
Tool TypeScript files are copied exactly as they are.| Source | Destination |
|---|---|
opencode/tools/<name>.ts | .opencode/tools/<name>.ts |
Cache layout
When a remote facet is cached (viafacets add or facets update), it’s stored at ~/.cache/facets/<name>/ with the same structure as the source layout:
$XDG_CACHE_HOME if set (defaults to ~/.cache).
Local facets
Local facets live in your project at.opencode/facets/<name>/ and follow the same source layout: