Files
architecture/legacy/old2/skills/examples/simple-workflow.md
Hugo Nijhuis cdfacbac18 Migrate from Claude Code to OpenCode structure
- Move legacy content to legacy/ folder (old, old2, docs, learnings, scripts)
- Create new .opencode/ structure with skills/, tools/, agents/ folders
- Update Makefile to symlink to ~/.config/opencode/ instead of ~/.claude/
- Update Makefile to manage skills, tools, and agents (remove settings.json)
- Simplify install/uninstall (no backup logic)
- Add README.md documenting the new structure
- Keep settings.json as historical reference
2026-05-02 13:41:59 +02:00

1.4 KiB

Example: Simple Workflow Skill

A basic skill with just a SKILL.md file - no scripts or reference files needed.

Structure

skills/list-open-prs/
└── SKILL.md

When to Use

  • Skill is simple (<300 lines)
  • No error-prone bash operations
  • No need for reference documentation
  • Straightforward workflow

Example: list-open-prs

---
name: list-open-prs
description: >
  List all open pull requests for the current repository.
  Use when user wants to see PRs or says /list-open-prs.
model: haiku
user-invocable: true
---

# List Open PRs

@~/.claude/skills/gitea/SKILL.md

Show all open pull requests in the current repository.

## Process

1. **Get repository info**
   - `git remote get-url origin`
   - Parse owner/repo from URL

2. **Fetch open PRs**
   - `tea pulls list --state open --output simple`

3. **Format results** as table

| PR # | Title | Author | Created |
|------|-------|--------|---------|
| ... | ... | ... | ... |

## Guidelines

- Show most recent PRs first
- Include link to each PR
- If no open PRs, say "No open pull requests"

Why This Works

  • Concise: Entire skill fits in ~30 lines
  • Simple commands: Just git and tea CLI
  • No error handling needed: tea handles errors gracefully
  • Structured output: Table format is clear

What Makes It Haiku-Friendly

  • ✓ Simple sequential steps
  • ✓ Clear commands with no ambiguity
  • ✓ Structured output format
  • ✓ No complex decision-making