Files
architecture/old2/skills/examples/simple-workflow.md
2026-01-15 17:28:06 +01:00

72 lines
1.4 KiB
Markdown

# 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
```markdown
---
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