Universal Agent
БесплатноЗапускает вложенные скриптыНе проверенThis skill should be used when the user needs to execute tasks through a complete automated workflow: understand natural language intent, dynamically generate…
от wangjiaocheng913 установок в других каталогахОб этом скилле
Universal Agent Skill
A minimal universal AI agent that automates end-to-end task execution: understand user intent in natural language, generate commands or scripts, execute them, analyze results, and self-recover from errors.
Architecture
Natural Language Input
↓
┌─────────────┐
│ LLM (Brain) │ Understand intent, generate command/Python script
└──────┬──────┘
│ Auto-generate code/command
↓
┌─────────────────┐
│ Command Executor │ Execute any command, control software & hardware
│ (Limbs) │
└───────┬─────────┘
│ Actual execution
↓
Task Complete ✅
File Structure
universal-agent/
├── SKILL.md # This file (skill definition)
├── scripts/
│ ├── universal_agent.py # Main program (complete standalone implementation)
│ └── config.json # Configuration file (fill in API key for standalone mode)
└── references/
└── README.md # Detailed usage documentation
When to Use
Use this skill when:
- User describes a task in natural language that requires automated execution
- Task needs dynamic code generation (Python script) and immediate execution
- Task involves file operations, data processing, system administration, CLI tools, API calls
- User wants end-to-end automation without manual intervention
- Keywords: "万能agent", "universal agent", "自动执行", "动态生成代码", "生成并执行", "帮我做XX"
How It Works
Automated Workflow (4 Steps)
- Think — LLM understands task, judges complexity, decides whether to generate a shell command or Python script
- Execute — Auto-write file → Run command/script → Capture output
- Fix — On error, LLM analyzes error, auto-fixes code, retries (up to 2 times)
- Summarize — Translates technical output into human-friendly language
Why It's "Universal"
| Capability | Description |
|---|---|
| Shell Commands | File ops, process management, system admin |
| Python Scripts | Data processing, web scraping, ML, image processing |
| CLI Tools | git, docker, ffmpeg, aws, any CLI |
| Hardware Control | Serial/GPIO/network-controlled physical devices |
| API Calls | Any HTTP API |
Command executor can run Python → Python can do anything → Agent can do anything
Usage Modes
This skill supports three distinct usage modes, each suited to different scenarios:
Mode 1: Standalone (独立运行)
Run the bundled script directly as an independent program. The script handles everything internally — LLM calls, command execution, safety checks, retries, memory.
# Single task mode (needs API key)
python scripts/universal_agent.py --run "task description"
# Interactive mode
python scripts/universal_agent.py
# With environment variables
set LLM_API_KEY=sk-xxx && python scripts/universal_agent.py --run "任务"
What works: Safety ✅ | Auto-retry ✅ | Memory persistence ✅ | Needs API Key.
Mode 2: Bridge Execution (桥接执行 — 推荐)
Execute the script with --backend bridge. The script's brain is provided by the external Agent that loaded this Skill, while the script itself handles execution, safety, retry, and memory. Any Agent with LLM + command execution can use this.
# Basic bridge execution
python scripts/universal_agent.py --backend bridge --run "任务描述"
# View full protocol spec
python scripts/universal_agent.py --bridge-info
How it works — the Agent drives the script through environment variables:
┌─────────────────────────────────────────────────────────────┐
│ Bridge Mode Flow │
├─────────────────────────────────────────────────────────────┤
│ │
│ ① User: "列出当前目录的文件" │
│ ↓ │
│ ② External Agent LLM → generates decision │
│ set UA_THINK={"type":"command","content":"dir /b"} │
│ ↓ │
│ ③ Agent executes: │
│ python ... --backend bridge --run "列出当前目录的文件" │
│ ↓ │
│ ④ Script reads UA_THINK → runs "dir /b" │
│ → safety check passes → captures output │
│ ↓ (if error) │
│ ⑤ Script requests fix via UA_DEBUG_AND_FIX env var │
│ ↓ │
│ ⑥ External Agent provides fixed code │
│ set UA_DEBUG_AND_FIX="fixed_command_or_script" │
│ ↓ │
│ ⑦ Script re-executes → success │
│ ↓
Установить Universal Agent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Universal Agent?
This skill should be used when the user needs to execute tasks through a complete automated workflow: understand natural language intent, dynamically generate commands or Python scripts, auto-execute them via shell, and summarize results. This is a minimal universal agent implementation based on "LLM brain + command executor limbs" architecture. Use this when users say things like "help me do X automatically", "generate code and run it", "universal agent", "execute task end-to-end", or when tasks require dynamic code generation and execution with automatic error recovery.
Как установить скилл Universal Agent?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Universal Agent запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic