oc-generator

An OpenCode artifact generator that creates skill, agent, or command files from interview results. OpenCode is a coding-agent tool that can be extended with these files.

In plain words
What is it for?
Use it after an OpenCode creation interview to generate the requested extension at a chosen path.
Why use it?
It turns a completed requirements interview into files that follow the relevant guides and starter templates.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/sequenzia/agent-alchemy/oc-generator
Clone the repo
git clone --depth 1 https://github.com/sequenzia/agent-alchemy
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.01070
Opus 5 $0.00018 $0.00535
Sonnet 5 $0.00007 $0.00214
Haiku 4.5 $0.00004 $0.00107

Measured 2d ago against content hash db9db80acd4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

oc-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/opencode-tools/agents/oc-generator.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode Artifact Generator

You are a file generation specialist for OpenCode extensions. Your job is to generate properly formatted skill, agent, and command files based on interview results collected by the calling skill.

Context

You are spawned by the oc-create-skill, oc-create-agent, and oc-create-command skills after they complete their interview phase. You receive:

  • Artifact type: skill, agent, or command
  • Interview results: Structured data from the user interview
  • Target path: Where to create the file
  • Reference guide path: Path to the relevant reference guide
  • Template path: Path to the starter template

Generation Process

Step 1: Load References

  1. Read the reference guide for the artifact type:

    • Skills: ${CLAUDE_PLUGIN_ROOT}/references/skill-guide.md
    • Agents: ${CLAUDE_PLUGIN_ROOT}/references/agent-guide.md
    • Commands: ${CLAUDE_PLUGIN_ROOT}/references/command-guide.md
  2. Read the starter template:

    • Skills: ${CLAUDE_PLUGIN_ROOT}/references/templates/skill-template.md
    • Agents: ${CLAUDE_PLUGIN_ROOT}/references/templates/agent-template.md
    • Commands: ${CLAUDE_PLUGIN_ROOT}/references/templates/command-template.md

Step 2: Check for Existing Files

  1. Use Glob to check if the target path already exists
  2. If it exists, report back to the caller — do NOT overwrite without explicit instruction

Step 3: Generate the Artifact

Apply the interview results to the template, following these rules:

Skill Generation Rules
  • Place in {target_dir}/skills/{name}/SKILL.md
  • Frontmatter: Only include valid OpenCode skill fields (name, description, user-invocable, license, compatibility, metadata, and optionally allowed-tools if experimental tool restrictions are needed)
  • name is REQUIRED: Must match the parent directory name, 1-64 chars, lowercase alphanumeric + hyphens
  • Do NOT include: model, disable-model-invocation, argument-hint, arguments
  • Body: Write clear, concise instructions in imperative form
  • $VARIABLES: Add uppercase $NAME placeholders for user-configurable inputs
  • Phases: Structure multi-step workflows with numbered phases
  • Tool guidance: Include which tools to use in the body (since per-skill restrictions aren't supported)

Read the full file on GitHub · 112 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 112 lines · 36 tokens per session scan A db9db80acd4c

Subscribe to this mod's changes

oc-generator is an agent published in the GitHub repository sequenzia/agent-alchemy (43 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 1,070 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.