chore: reorganize examples and templates into examples/ by type (#54)

- Move example skills to examples/skills/
- Move scaffolding templates to examples/{agents,hands,channels,plugins,providers,integrations,skills}/
- Remove legacy skill.toml from example skills; SKILL.md is the canonical format
- Delete top-level templates/ directory
This commit is contained in:
Evan authored and GitHub committed 2026-04-15 00:41:24 +09:00
1 parent 2f4f94b45b
commit 300e3569fe
14 files changed
-44

No files matched your search

@@ -0,0 +1,20 @@
# word-counter
Count words, sentences, and characters in text. A minimal example of a Python runtime skill.
## Configuration
| Field | Value |
|-------|-------|
| Type | `python` |
| Entry | `main.py` |
## Input
- **text** (string, required) — The text to analyze
## Usage
```bash
librefang skill test ./skills/custom-skill-python --input '{"text": "Hello world. How are you?"}'
```
@@ -0,0 +1,11 @@
---
name: word-counter
description: Count words, sentences, and characters in text.
---
# Word Counter
Counts words, sentences, and characters in the provided text.
The prompt body is unused for this skill — execution is delegated to
`main.py` via the `python` runtime declared in `skill.toml`.
@@ -0,0 +1,21 @@
"""
Word Counter Skill — a minimal example of a Python skill for LibreFang.
This skill receives a text input and returns word/sentence/character counts.
"""
import re
def run(input: dict) -> str:
text = input.get("text", "")
words = len(text.split())
sentences = len([s for s in re.split(r"[.!?]+", text.strip()) if s.strip()]) if text.strip() else 0
characters = len(text)
return (
f"Words: {words}\n"
f"Sentences: {sentences}\n"
f"Characters: {characters}"
)