Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计提醒

universal-agent万能 Agent

Agent Skill

universal-agent 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,752

周安装

117

GitHub Stars

公开资料未说明

下载量

964
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:universal-agent(万能 Agent)
来源仓库:https://github.com/wangjiaocheng/universal-agent
安装命令:
openclaw skills install universal-agent
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install universal-agent

简介

用于理解自然语言意图并动态生成自动化工作流程。

  • 适合在 OpenClaw 中执行复杂效率相关任务时使用。
  • 通过 clawhub 安装,建议结合原始文档进一步验证功能细节。
  • 使用前应检查权限边界及是否会调用命令或访问网络资源。
  • universal-agent 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
universal-agent
author
王教成 Wang Jiaocheng (波动几何)
description
>

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)

  1. Think — LLM understands task, judges complexity, decides whether to generate a shell command or Python script
  2. Execute — Auto-write file → Run command/script → Capture output
  3. Fix — On error, LLM analyzes error, auto-fixes code, retries (up to 2 times)
  4. Summarize — Translates technical output into human-friendly language

Why It's "Universal"

CapabilityDescription
Shell CommandsFile ops, process management, system admin
Python ScriptsData processing, web scraping, ML, image processing
CLI Toolsgit, docker, ffmpeg, aws, any CLI
Hardware ControlSerial/GPIO/network-controlled physical devices
API CallsAny 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:

VariableWhen UsedFormat
UA_THINKStep 1 — decisionJSON: `{"type":"command\script","content":"...","explanation":"..."}`
UA_GENERATE_SCRIPTIf type=script and code neededComplete Python source code
UA_SUMMARIZEFinal step — result summaryNatural language summary text
UA_DEBUG_AND_FIXOn error retry — fixed codeFixed 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_command instead of UniversalExecutor
  • 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:

ClassRoleKey Methods
LLMBrainBrain — HTTP LLM interface (Mode 1)think(), generate_script(), summarize(), debug_and_fix()
AgentBridgeBrain — External Agent bridge (Mode 2)think(), generate_script(), summarize(), debug_and_fix(), set_response()
UniversalExecutorLimbs (command execution)execute(), _execute_command(), _execute_script(), _check_danger()
ContextManagerMemory (state management)add_task_record(), get_context_string(), save()/load()
UniversalAgentMain orchestratorrun(), chat(), batch_run()

See references/README.md for full API documentation and examples.

Safety Mechanisms

The executor includes built-in danger detection:

LevelExamplesHandling
🔴 Highrm -rf /, format C:Forced confirmation required
🟡 Mediumpip uninstall, sudoWarning prompt
🟢 Lowls, cat, python script.pyDirect 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

ProviderModelsbase_url
OpenAIgpt-4o, gpt-4o-minihttps://api.openai.com/v1
DeepSeekdeepseek-chat, deepseek-reasonerhttps://api.deepseek.com
Qwenqwen-max, qwen-turbohttps://dashscope.aliyuncs.com/compatible-mode/v1
Zhipu GLMglm-4-plushttps://open.bigmodel.cn/api/paas/v4
Local Ollamallama3, qwen2, any modelhttp://localhost:11434/v1
Groqllama-3.1-70b-versatilehttps://api.groq.com/openai/v1
Any OpenAI-compatible APIanyyour-url

Platform Support

Cross-platform — Windows, macOS, Linux:

OSShell Backend
Windowscmd.exe /c (with CREATE_NO_WINDOW)
macOSbash (shell=True)
Linuxbash (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 operations
  • subprocess — Command execution
  • json, re — JSON parsing and regex
  • time/datetime — Time handling
  • urllib — HTTP requests (fallback)

Optional:

  • requests library — Better HTTP support (pip install requests)

Free Options

  1. Ollama + local model (completely free, unlimited, private)
  2. DeepSeek (~¥1/million tokens, excellent cost-performance)
  3. Groq Cloud (free tier available, ultra-fast inference)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.04%
按下载量换算849

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills