mirror of
https://github.com/ollama/ollama.git
synced 2026-04-18 00:03:27 +02:00
Add a JSON-based skills specification system that allows users to define custom tools loaded by the experimental agent loop. Skills are auto-discovered from standard locations (./ollama-skills.json, ~/.ollama/skills.json, ~/.config/ollama/skills.json). Features: - SkillSpec schema with parameters and executor configuration - Script executor that runs commands with JSON args via stdin - /skills reload command for runtime skill reloading - Comprehensive validation and error handling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
1.3 KiB
JSON
45 lines
1.3 KiB
JSON
{
|
|
"version": "1",
|
|
"skills": [
|
|
{
|
|
"name": "get_time",
|
|
"description": "Get the current date and time. Use this when the user asks about the current time or date.",
|
|
"parameters": [],
|
|
"executor": {
|
|
"type": "script",
|
|
"command": "date",
|
|
"timeout": 5
|
|
}
|
|
},
|
|
{
|
|
"name": "system_info",
|
|
"description": "Get system information including OS, hostname, and uptime.",
|
|
"parameters": [],
|
|
"executor": {
|
|
"type": "script",
|
|
"command": "sh",
|
|
"args": ["-c", "echo \"Hostname: $(hostname)\"; echo \"OS: $(uname -s)\"; echo \"Kernel: $(uname -r)\"; echo \"Uptime: $(uptime -p 2>/dev/null || uptime)\""],
|
|
"timeout": 10
|
|
}
|
|
},
|
|
{
|
|
"name": "python_eval",
|
|
"description": "Evaluate a Python expression. The expression is passed via stdin as JSON with an 'expression' field.",
|
|
"parameters": [
|
|
{
|
|
"name": "expression",
|
|
"type": "string",
|
|
"description": "The Python expression to evaluate",
|
|
"required": true
|
|
}
|
|
],
|
|
"executor": {
|
|
"type": "script",
|
|
"command": "python3",
|
|
"args": ["-c", "import sys, json; data = json.load(sys.stdin); print(eval(data.get('expression', '')))"],
|
|
"timeout": 30
|
|
}
|
|
}
|
|
]
|
|
}
|