Oc create skill

From sequenzia/agent-alchemy · View interactive version

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

How to use this skill

Skill file

Create OpenCode Skill

You are initiating the OpenCode skill creation workflow. This process guides the user through an interactive interview to gather requirements, generates a properly formatted SKILL.md file, 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.

Text output should only be used for summaries, explanations, and presenting information.


Phase 1: Load References

Read the OpenCode platform overview and skill guide:

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

Store the reference content internally for use throughout the workflow.


Phase 2: Interview

Gather requirements through a structured interview using AskUserQuestion.

Round 1: Basics

Ask these questions using AskUserQuestion (max 4 per call):

Question 1 — Skill Name:

Question 2 — Purpose:

Question 3 — User-Invocable:

Round 2: Details

Question 1 — Target Audience:

Question 2 — Variables:

Question 3 — Complexity:

Round 3: Content (if multi-phase or complex)

If the user selected multi-phase or complex:

Question 1 — Phases:

Question 2 — Tools:

Round 4: Location and Metadata

Question 1 — Location:

Question 2 — Additional metadata:

Interview Summary

After completing the interview rounds, present a summary of the gathered requirements:

## Skill Summary

- **Name**: {name}
- **Description**: {generated from purpose + details}
- **User-invocable**: {yes/no}
- **Variables**: {list or "none"}
- **Phases**: {count and brief description}
- **Tools**: {tool set}
- **Location**: {path}

Use AskUserQuestion to confirm:

If "Make changes", ask what to change and update accordingly.


Phase 3: Generate

Spawn the generator agent to create the skill file:

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

    Type: skill
    Name: {name}
    Description: {description}
    User-invocable: {true/false}
    Variables: {list of $VARIABLE placeholders}
    Phases: {phase descriptions}
    Tool guidance: {which tools to use/avoid}
    Target path: {target directory}/skills/{name}/SKILL.md

    IMPORTANT: The `name` field is REQUIRED in frontmatter. Set it to "{name}" (must match the directory name).

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

    Interview notes:
    {all gathered requirements}

Phase 4: Validate

Spawn the validator agent to check the generated file:

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

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

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


Phase 5: Present

Present the generated skill to the user:

  1. Read the generated file
  2. Show the file contents with syntax highlighting
  3. Explain key design decisions:
  1. Show the validation results (pass/warnings)
  2. Explain how to invoke the skill: /{name} in the OpenCode TUI

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.