Oc create agent

From sequenzia/agent-alchemy · View interactive version

Oc create agent is an AI agent skill from the GitHub repository sequenzia/agent-alchemy. Guides through creating a new OpenCode-compatible agent with interactive interview, permission configuration, and validation. Use when user says "create opencode agent", "new opencode agent", "build agent for opencode", or wants to create an OpenCode agent markdown file.

How to use this skill

Skill file

Create OpenCode Agent

You are initiating the OpenCode agent creation workflow. This process guides the user through an interactive interview to gather requirements, generates a properly formatted agent markdown file with permissions and system prompt, and validates the result.

Critical Rules

AskUserQuestion is MANDATORY

IMPORTANT: You MUST use the AskUserQuestion tool for ALL questions to the user. Never ask questions through regular text output.


Phase 1: Load References

Read the OpenCode platform overview and agent guide:

  1. Read ${CLAUDE_PLUGIN_ROOT}/references/platform-overview.md
  2. Read ${CLAUDE_PLUGIN_ROOT}/references/agent-guide.md

Phase 2: Interview

Gather requirements through a structured interview.

Round 1: Identity

Question 1 — Agent Name:

Question 2 — Purpose:

Question 3 — Mode:

Round 2: Model & Behavior

Question 1 — Model Tier:

Question 2 — Temperature:

Question 3 — Steps Limit:

Round 3: Permissions

Question 1 — Permission Level:

If "Custom" selected:

Question 2 — File Operations:

Question 3 — Execution:

Question 4 — Web Access:

Round 4: System Prompt

Question 1 — Prompt Focus:

Question 2 — Constraints:

Round 5: Location & Display

Question 1 — Location:

Question 2 — Display:

Interview Summary

Present a comprehensive summary:

## Agent Summary

- **Name**: {name}
- **Description**: {generated description}
- **Mode**: {primary/subagent/all}
- **Model**: {provider/model-id}
- **Temperature**: {value}
- **Steps**: {value or "default"}
- **Permissions**: {summary}
- **Focus areas**: {list}
- **Constraints**: {list}
- **Location**: {path}

Use AskUserQuestion to confirm:


Phase 3: Generate

Spawn the generator agent:

Task:
  subagent_type: "agent-alchemy-opencode-tools:oc-generator"
  prompt: |
    Generate an OpenCode agent with these specifications:

    Type: agent
    Name: {name}
    Description: {description}
    Mode: {mode}
    Model: {model}
    Temperature: {temperature}
    Steps: {steps}
    Permissions: {permission object}
    Color: {color or null}
    Hidden: {true/false}
    System prompt focus: {focus areas}
    Constraints: {constraints}
    Target path: {target directory}/agents/{name}.md

    Reference guide: ${CLAUDE_PLUGIN_ROOT}/references/agent-guide.md
    Template: ${CLAUDE_PLUGIN_ROOT}/references/templates/agent-template.md

    Interview notes:
    {all gathered requirements}

Phase 4: Validate

Spawn the validator agent:

Task:
  subagent_type: "agent-alchemy-opencode-tools:oc-validator"
  prompt: |
    Validate the following OpenCode artifact:

    Type: agent
    Path: {path to generated file}
    Reference guide: ${CLAUDE_PLUGIN_ROOT}/references/agent-guide.md

If validation fails with errors, fix the issues and re-validate.


Phase 5: Present

Present the generated agent:

  1. Read the generated file
  2. Show the file contents with syntax highlighting
  3. Explain key design decisions:
  1. Show validation results
  2. Explain how to use the agent:
  1. If applicable, explain how to configure the model in opencode.json

CRITICAL: Complete ALL 5 phases before finishing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.