以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。
编程
Universal Agent
试用This skill should be used when the user needs to execute tasks through a complete automated workflow: understand natural language intent, dynamically generat...
它能做什么
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.
技能文档
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 │
│ ↓ │
│ ⑧ Script reads UA_SUMMARIZE for final output │
│ → returns structured JSON result │
│ │
└─────────────────────────────────────────────────────────────┘
Environment Variable Protocol:
| Variable | When Used | Format |
|---|---|---|
UA_THINK | Step 1 — decision | JSON: {"type":"command|script","content":"...","explanation":"..."} |
UA_GENERATE_SCRIPT | If type=script and code needed | Complete Python source code |
UA_SUMMARIZE | Final step — result summary | Natural language summary text |
UA_DEBUG_AND_FIX | On error retry — fixed code | Fixed Python/shell code |
What works: Safety ✅ | Auto-retry ✅ | Memory persistence ✅ | No API Key needed (Agent provides LLM).
Who can use this: WorkBuddy, Cursor, Continue.dev, Aider, Cline, any AI IDE/tool with LLM + shell access.
Mode 3: Inline Simulation (模拟执行)
The loaded Agent reads this SKILL.md, learns the architecture pattern, and simulates the workflow using its own native capabilities without executing the script at all. The script serves as a reference/teaching example only.
- Agent uses its own LLM instead of
LLMBrain - Agent uses its own
execute_commandinstead ofUniversalExecutor - Agent does its own summarization
What works: Fastest ⚡ | No setup | Safety ❌ Retry ❌ Memory ❌ (script features unused).
Core Components
scripts/universal_agent.py — Main Program
Four core classes implementing the full agent:
| Class | Role | Key Methods |
|---|---|---|
LLMBrain | Brain — HTTP LLM interface (Mode 1) | think(), generate_script(), summarize(), debug_and_fix() |
AgentBridge | Brain — External Agent bridge (Mode 2) | think(), generate_script(), summarize(), debug_and_fix(), set_response() |
UniversalExecutor | Limbs (command execution) | execute(), _execute_command(), _execute_script(), _check_danger() |
ContextManager | Memory (state management) | add_task_record(), get_context_string(), save()/load() |
UniversalAgent | Main orchestrator | run(), chat(), batch_run() |
See references/README.md for full API documentation and examples.
Safety Mechanisms
The executor includes built-in danger detection:
| Level | Examples | Handling |
|---|---|---|
| 🔴 High | rm -rf /, format C: | Forced confirmation required |
| 🟡 Medium | pip uninstall, sudo | Warning prompt |
| 🟢 Low | ls, cat, python script.py | Direct execution |
Danger patterns are defined in HIGH_DANGER_PATTERNS and MEDIUM_DANGER_PATTERNS within the script.
Configuration
Mode 1 (Standalone) — Needs API Key
Option A — Config File:
Edit scripts/config.json and fill in your API key.
Option B — Environment Variables:
set LLM_API_KEY=your-key-here
set LLM_MODEL=gpt-4o
set LLM_BASE_URL=https://api.openai.com/v1
Option C — Local Ollama (Free):
ollama run llama3
# Then select ollama_llama3 preset when starting the script
Configuration priority: Environment variables > config.json > Interactive input.
Mode 2 (Bridge) — No API Key Needed
The external Agent provides all LLM capabilities. Configure only optional settings:
# Optional: change input source from env to file
set UA_INPUT_SOURCE=file
# Optional: skip safety confirmations (not recommended)
# Use --dangerous flag instead
Mode 3 (Simulation) — No Configuration Needed
Agent uses its own native capabilities. Nothing to configure.
Supported LLM Providers
| Provider | Models | base_url |
|---|---|---|
| OpenAI | gpt-4o, gpt-4o-mini | https://api.openai.com/v1 |
| DeepSeek | deepseek-chat, deepseek-reasoner | https://api.deepseek.com |
| Qwen | qwen-max, qwen-turbo | https://dashscope.aliyuncs.com/compatible-mode/v1 |
| Zhipu GLM | glm-4-plus | https://open.bigmodel.cn/api/paas/v4 |
| Local Ollama | llama3, qwen2, any model | http://localhost:11434/v1 |
| Groq | llama-3.1-70b-versatile | https://api.groq.com/openai/v1 |
| Any OpenAI-compatible API | any | your-url |
Platform Support
✅ Cross-platform — Windows, macOS, Linux:
| OS | Shell Backend |
|---|---|
| Windows | cmd.exe /c (with CREATE_NO_WINDOW) |
| macOS | bash (shell=True) |
| Linux | bash (shell=True) |
All file I/O uses UTF-8 encoding. Python script execution uses sys.executable for platform-agnostic invocation.
Dependencies
✅ Zero external dependencies — Python standard library only:
os,sys— System operationssubprocess— Command executionjson,re— JSON parsing and regextime/datetime— Time handlingurllib— HTTP requests (fallback)
Optional:
requestslibrary — Better HTTP support (pip install requests)
Free Options
- Ollama + local model (completely free, unlimited, private)
- DeepSeek (~¥1/million tokens, excellent cost-performance)
- Groq Cloud (free tier available, ultra-fast inference)
相关技能
在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。
把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。
从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。
编写、调试与调优 Playwright 测试,涵盖定位器策略、追踪诊断与 CI 友好的超时配置。
wangjiaocheng 的更多技能
浏览全部技能CAD制图编辑器 — 用自然语言生成工程图纸(建筑平面图/机械零件/电气布置/管道系统/结构详图)。 支持DXF文件创建、渲染预览、批量导出。触发词:画平面图、CAD、工程图、建筑图、机械图、电气图、 管道图、结构图、画线/圆/矩形/多边形、尺寸标注、DXF、AutoCAD、施工图、配筋图、齿轮、轴承、 阀门、弯...
Control Windows desktop software, hardware, and IoT devices. This skill should be used when the user wants to open/close/resize windows, start/stop/monitor p...
一人公司操作系统。核心能力:工作流重构——将任何领域的复杂工作流重构为AI辅助一人简易完成的方法(拆解人的局限补偿层→消除→基于AI能力模型重整)。执行轴为6维能力调用而非角色分工,管线为IPO基元链而非流水线传递。内容轴提供清单法与样本法的OPC适配规则,创新轴适配一人公司独特约束的突破路径。领域负载物覆盖7域...
认知执行技能 — 整合认知套件与执行框架两大能力层,并配备编排引擎。 认知层:四种思维操作码(直用/改进/迁移/构建)覆盖所有思考任务; 执行层:大语言模型 + 命令执行工具,自动化代码生成与脚本执行; 编排引擎:将所有操作统一为基元,自由组合为任意复杂度的执行链条。 此技能应用于认知与代码执行类任务。
全知全能技能 — 整合认知套件、执行框架、系统控制三大能力层,并配备编排引擎。 认知层:四种思维操作码(直用/改进/迁移/构建)覆盖所有思考任务; 执行层:大语言模型 + 命令执行工具,自动化代码生成与脚本执行; 操控层:Linux桌面软件、系统硬件、串口设备、物联网平台、图形界面自动化、蓝牙设备、GPU显卡、存...
全知全能技能 — 整合认知套件、执行框架、系统控制三大能力层,并配备编排引擎。 认知层:四种思维操作码(直用/改进/迁移/构建)覆盖所有思考任务; 执行层:大语言模型 + 命令执行工具,自动化代码生成与脚本执行; 操控层:Windows桌面软件、系统硬件、串口设备、物联网平台、图形界面自动化、蓝牙设备、GPU显卡...