Skip to content
Back to skills

Doppleganger

ASecurity

Prevents duplicate subagent sessions running the same task. Saves tokens and reduces lag—no more "multiple Spidermen" doing the same work.

  • 16 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 7, 2026
ai-agentspythonbash

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned June 7, 2026

npx -y skills add modbender/skill-library-mcp --skill doppleganger --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doppleganger?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doppleganger
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-doppleganger/badge)](https://www.skillsdirectory.com/skills/modbender-doppleganger)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: doppleganger
displayName: Doppleganger
description: Prevents duplicate subagent sessions running the same task. Saves tokens and reduces lag—no more "multiple Spidermen" doing the same work.
version: 1.0.0
---

# Doppleganger

## Description

Prevents duplicate subagent sessions running the same task. Saves tokens and reduces lag—no more "multiple Spidermen" doing the same work.

# Doppleganger

**One task, one agent.** Doppleganger stops duplicate subagent sessions from running the same task. That prevents token overspend, UI lag, and the chaos of five identical "task completed" announcements.


## Usage

- The orchestrator **already runs** a duplicate check before `sessions_spawn` (see delegate rule); Doppleganger is the named skill for that behavior.
- User says: "prevent duplicate agents", "stop dopplegangers", "why are so many agents doing the same thing?"
- You want a single entry point to **check** whether a task is already running before spawning.

```bash
python3 /Users/ghost/.openclaw/workspace/skills/doppleganger/scripts/doppleganger.py check "<task string>" [--json]
python3 /Users/ghost/.openclaw/workspace/skills/doppleganger/scripts/doppleganger.py guard --task "<task>" [--json]
```

**JSON output:**

- `{"duplicate": false, "doppleganger_ok": true}` → safe to spawn.
- `{"duplicate": true, "reason": "running", "sessionId": "...", "key": "...", "doppleganger_ok": true}` → do not spawn; reply that the task is already running.

**Exit codes:** 0 = no duplicate (or check ok). 1 = error. 2 = duplicate detected.


## What it does

- **check** / **guard** — Given a task string (the same one you would pass to `sessions_spawn`), returns whether that task is already running. If yes, the orchestrator must not spawn again.
- Uses the subagent-tracker's `check-duplicate` under the hood (one source of truth for runs/sessions).


## Orchestrator

The delegate rule runs a duplicate check before every `sessions_spawn`; that check can be implemented by calling Doppleganger (or subagent-tracker `check-duplicate`) with the router's task string. If `duplicate: true`, do not call `sessions_spawn`.


## Name

"Doppleganger" = the duplicate agent doing the same thing. One Spiderman is enough.

Files in this skill

  • README.md1.9 KB
  • SKILL.md2.2 KB
  • config.json300 B
  • scripts/doppleganger.py3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.