Add skill definitions (SKILL.md + run.py) for all agent tools

This commit is contained in:
2026-04-07 20:35:56 +00:00
parent 42870c7c1f
commit 4483b585a7
8 changed files with 187 additions and 0 deletions

27
skills/run_command/run.py Normal file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env python3
import subprocess
import sys
import json
args = json.loads(sys.stdin.read())
command = args.get("command", "")
try:
result = subprocess.run(
["bash", "-c", command],
capture_output=True,
text=True,
timeout=120,
)
output = result.stdout
if result.stderr:
output += f"\n[stderr] {result.stderr}"
if result.returncode != 0:
output += f"\n[exit code: {result.returncode}]"
if len(output) > 2000:
output = output[:2000] + "\n[output truncated]"
print(output.strip() or "[no output]")
except subprocess.TimeoutExpired:
print("[command timed out after 120s]")
except Exception as e:
print(f"[error: {e}]")