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

+32
View File
@@ -0,0 +1,32 @@
name = "{{NAME}}"
version = "0.1.0"
description = "TODO: One-sentence description of what this agent does."
author = "TODO"
module = "builtin:chat"
[metadata.routing]
aliases = ["TODO: exact match phrases"]
weak_aliases = ["TODO: partial match keywords"]
[model]
provider = "default"
model = "default"
max_tokens = 4096
temperature = 0.7
system_prompt = """TODO: Write a clear system prompt that defines:
- Who the agent is and its role
- What it should and should not do
- How it should format responses
- Any domain-specific instructions
Keep it focused and under 500 words."""
[resources]
max_llm_tokens_per_hour = 100000
[capabilities]
tools = ["web_search", "web_fetch", "memory_store", "memory_recall"]
network = ["*"]
memory_read = ["*"]
memory_write = ["self.*"]
agent_spawn = false
+10
View File
@@ -0,0 +1,10 @@
id = ""
name = ""
description = ""
category = "" # one of: messaging, social, enterprise, developer, iot, email
icon = ""
protocol = "" # one of: bot-api, webhook, websocket, rest-api, imap, xmpp, irc, mqtt, matrix
[metadata]
url = ""
docs = ""
+40
View File
@@ -0,0 +1,40 @@
id = "{{NAME}}"
name = "TODO: Display Name"
description = "TODO: One-sentence description of what this hand does."
category = "productivity" # communication | content | data | development | devops | finance | productivity | research | social
icon = "TODO"
tools = [
"shell_exec",
"file_read",
"file_write",
"file_list",
"memory_store",
"memory_recall",
]
[routing]
aliases = ["TODO: activation phrases"]
weak_aliases = ["TODO: keyword hints"]
[agent]
name = "{{NAME}}-hand"
description = "TODO: Agent description"
module = "builtin:chat"
provider = "default"
model = "default"
max_tokens = 8192
temperature = 0.4
max_iterations = 30
system_prompt = """TODO: Write a detailed system prompt for the hand's agent.
Define:
- The hand's purpose and capabilities
- Step-by-step workflow it follows
- Tools it should use and how
- Output format and reporting
"""
[metadata]
frequency = "on-demand" # continuous | on-demand | scheduled
token_consumption = "medium" # low | medium | high
default_active = true
+29
View File
@@ -0,0 +1,29 @@
id = "{{NAME}}"
name = "TODO: Service Display Name"
description = "TODO: One-sentence description of this integration."
category = "devtools" # devtools | communication | storage | monitoring | data | productivity
icon = "TODO"
tags = ["TODO"]
[transport]
type = "stdio"
command = "npx"
args = ["-y", "TODO: @scope/mcp-server-package"]
[[required_env]]
name = "TODO_API_KEY"
label = "TODO: API Key"
help = "TODO: How to obtain this key"
is_secret = true
get_url = "https://example.com/settings"
[health_check]
interval_secs = 60
unhealthy_threshold = 3
setup_instructions = """
TODO: Step-by-step setup instructions.
1. Go to ...
2. Create an API key with ...
3. Paste the key above.
"""
+8
View File
@@ -0,0 +1,8 @@
name = "{{NAME}}"
version = "0.1.0"
description = "TODO: What this plugin does"
author = "TODO: your-name"
[hooks]
ingest = "hooks/ingest.py" # Called when user message is received
after_turn = "hooks/after_turn.py" # Called after each conversation turn
+22
View File
@@ -0,0 +1,22 @@
# TODO: Provider Name — https://example.com
# Models: 1
[provider]
id = "{{NAME}}"
display_name = "TODO: Provider Display Name"
api_key_env = "TODO_API_KEY"
base_url = "https://api.example.com/v1"
key_required = true
[[models]]
id = "TODO-model-id"
display_name = "TODO: Model Display Name"
tier = "balanced" # frontier | smart | balanced | fast | local
context_window = 128000
max_output_tokens = 4096
input_cost_per_m = 0.0
output_cost_per_m = 0.0
supports_tools = true
supports_vision = false
supports_streaming = true
aliases = []
@@ -0,0 +1,21 @@
# meeting-agenda
Generate a structured meeting agenda from a topic and duration. Pure prompt engineering — no code required.
## Configuration
| Field | Value |
|-------|-------|
| Type | `promptonly` |
| Entry | N/A (template-only) |
## Input
- **topic** (string, required) — The meeting topic
- **duration_minutes** (string, required) — Meeting duration in minutes
## Usage
```bash
librefang skill test ./skills/custom-skill-prompt --input '{"topic": "Q1 planning", "duration_minutes": "30"}'
```
@@ -0,0 +1,16 @@
---
name: meeting-agenda
description: Generate a structured meeting agenda from a topic and duration.
---
Create a structured meeting agenda for the following:
Topic: {{topic}}
Duration: {{duration_minutes}} minutes
Requirements:
- Include time allocations for each section
- Start with a brief intro/alignment (2-3 min)
- End with action items and next steps (3-5 min)
- Keep sections focused and actionable
- Format as a numbered list with time in brackets
@@ -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}"
)
+20
View File
@@ -0,0 +1,20 @@
[skill]
name = "{{NAME}}"
version = "0.1.0"
description = "TODO: One-sentence description of what this skill does."
author = "TODO"
tags = ["TODO"]
[runtime]
type = "promptonly"
[input]
topic = { type = "string", description = "TODO: Describe this input parameter", required = true }
[prompt]
template = """TODO: Write the prompt template for this skill.
Use {{topic}} to reference input parameters.
Be specific about the desired output format and constraints.
"""