openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Dual-Brain

Automatically generates and saves alternative perspectives from a secondary LLM for every user message to enhance reasoning and response quality.

通信与消息

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v0.1.1

统计:⭐ 2 · 1.5k · 1 current installs · 1 all-time installs

2

安装量(当前) 1

🛡 VirusTotal :可疑 · OpenClaw :可疑

Package:dannydvm/dual-brain

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :可疑

OpenClaw 评估

The skill mostly does what it claims (generate a secondary-LLM 'perspective' and write it to files), but it asks agents to unconditionally read filesystem files before replying, stores API keys in plaintext, and includes persistent daemon/service installation — these behaviors are coherent with the feature but raise privacy/abuse risks and a possible prompt-injection vector.

目的

Name/purpose (Dual-Brain: secondary-LLM perspectives) aligns with the code and SKILL.md: the daemon scans OpenClaw session files, calls secondary LLM providers, and writes 2–3 sentence perspectives to ~/.dual-brain/perspectives. However the registry metadata claims no required credentials or env vars while the implementation expects provider API keys (stored in a config file); that mismatch should be noted. Reading OpenClaw session files and o…

说明范围

SKILL.md instructs primary agents to 'Before responding to any user message, check for a dual-brain perspective' by reading a file under ~/.dual-brain/perspectives/{agent}-latest.md and to 'consider it alongside your own reasoning.' That is functionally coherent but is also a persistent instruction that influences agent behavior (a prompt-injection-like pattern). The daemon scans ~/.openclaw/agents/*/sessions/*.jsonl (i.e., other agents' sessi…

安装机制

There is no automated install spec in the registry (instruction-only), but the package includes an npm-global CLI and installer scripts (daemon/install.sh, systemd/launchd templates). Manual install commands in SKILL.md (npm install -g, dual-brain install-daemon) would install a daemon and optionally a systemd/LaunchAgent service. The package.json has no postinstall scripts, lowering automatic-install risk, but installing the service requires …

证书

Registry lists no required env vars, but the code expects API keys for moonshot/openai/groq providers and stores them in ~/.dual-brain/config.json in plaintext. BUILD-SUMMARY and config.js note API keys will be saved unencrypted and file perms are lax (documented as 0644). The daemon reads OpenClaw session JSONL files (potentially sensitive user messages) and forwards content to external LLM providers — that data flow is needed for the feature…

持久

always:false (good). The skill supports installing a long-running user or system service (launchd/systemd templates) and writes PID/log files under ~/.dual-brain. Persistent background operation is required for the described functionality but increases blast radius (continuous scanning of session files and ability to call external services). The combination of persistent daemon + reading session files + plaintext-stored API keys increases risk…

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Dual-Brain」。简介:Automatically generates and saves alternative perspectives from a secondary LLM…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/dannydvm/dual-brain/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

# Dual-Brain Skill

**What it does:** Provides cognitive diversity by automatically generating perspectives from a secondary LLM (different from your primary model) for every user message.

## For Agents

Before responding to any user message, check for a dual-brain perspective:

```bash
cat ~/.dual-brain/perspectives/{your-agent-id}-latest.md
```

If the file exists and contains a recent perspective (check timestamp in comment), consider it alongside your own reasoning. The perspective may highlight:
- Angles you might miss
- Alternative approaches
- Important things to verify

**Integration:**
- Perspectives are generated automatically by a background daemon
- No manual action required on your part
- Simply read the file before forming your response
- Synthesize both viewpoints (yours + the secondary LLM's)

**Example workflow:**
1. User sends message
2. Daemon intercepts, sends to secondary LLM (e.g., Kimi, GPT-4, Llama)
3. Secondary LLM generates 2-3 sentence perspective
4. Written to `~/.dual-brain/perspectives/{agent-id}-latest.md`
5. You (primary agent) read it before responding
6. You synthesize both perspectives into your answer

## For Humans

**Setup:**
```bash
npm install -g openclaw-dual-brain
dual-brain setup    # Interactive configuration
dual-brain start    # Start daemon
```

**Providers:**
- `ollama` - Local models (zero cost, requires Ollama)
- `moonshot` - Kimi/Moonshot API (Chinese LLM, fast)
- `openai` - GPT-4o, GPT-4-turbo, etc.
- `groq` - Fast inference with Llama models

**Commands:**
- `dual-brain setup` - Configure provider, model, API key
- `dual-brain start` - Run daemon (foreground)
- `dual-brain stop` - Stop daemon
- `dual-brain status` - Check running status
- `dual-brain logs` - View recent activity
- `dual-brain install-daemon` - Install as system service

**Config location:** `~/.dual-brain/config.json`

**Perspectives location:** `~/.dual-brain/perspectives/`

## Architecture

```
User Message → OpenClaw Session (JSONL)
                    ↓
            Dual-Brain Daemon (polling)
                    ↓
            Secondary LLM Provider
            (ollama/moonshot/openai/groq)
                    ↓
        Perspective Generated (2-3 sentences)
                    ↓
        ~/.dual-brain/perspectives/{agent}-latest.md
                    ↓
        Primary Agent reads & synthesizes
                    ↓
            Response to User
```

## Benefits

- **Cognitive diversity** - Two AI models = broader perspective
- **Bias mitigation** - Different training data/approaches
- **Quality assurance** - Second opinion catches issues
- **Zero agent overhead** - Runs in background, <1s latency
- **Provider flexibility** - Choose cost vs. quality tradeoff

## Optional: Engram Integration

If Engram (semantic memory) is running on localhost:3400, perspectives are also stored as memories for long-term recall.

---

**Source:** <https://github.com/yourusername/openclaw-dual-brain>