Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器clawhub未标认证来源可访问clear审计通过

ghost-mode幽灵模式

Agent Skill

ghost-mode 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,258

周安装

96

GitHub Stars

公开资料未说明

下载量

791
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install ghost-mode

简介

启用隐身模式,以在停用时抑制并安全擦除所有代理内存写入和会话跟踪,不留下任何持久记录。

SKILL.md

name
ghost-mode
description
Browser-style incognito mode for your OpenClaw agent. Activate to pause all memory writes — when you deactivate, every trace of the session is securely scrubbed from logs, memory files, session transcripts, and search indexes. Like closing an incognito window: nothing persists. Any files or local outputs you independently create during the session remain untouched. Use when user says "ghost on", "ghost off", "incognito", "private mode", "privacy mode", or wants a conversation that leaves no persistent trace in agent memory.
requires
bins
optional
env
default
~/.openclaw/workspace
description
OpenClaw workspace root. Must be a subdirectory of home, not home itself.
default
~/.openclaw
description
OpenClaw home directory. Must be a subdirectory of home, not home itself.
default
main
description
OpenClaw agent name (used to locate session files).
bins
description
Secure file deletion. Falls back to rm if unavailable (with warning).
install
scripts

Ghost Mode

Incognito mode for your OpenClaw agent — like a browser's private window, but for your AI.

Activate, and the agent stops writing to memory. Deactivate, and every trace of the session — logs, memory files, session transcripts, search index entries — is securely scrubbed. Like closing an incognito browser window: the activity never happened, as far as the agent's memory is concerned.

What stays: Any files or local outputs you independently create during the session (code, documents, images, etc.) are not touched — provided OPENCLAW_WORKSPACE and OPENCLAW_HOME are correctly scoped to your OpenClaw installation (not broadly set to $HOME or a parent directory). Ghost Mode only impacts the agent's memory and session history; the scripts enforce this scope at startup and will refuse to run if the env vars point too broadly.

User-controlled, explicit, and auditable. No silent hooks, no background daemons, no automatic interception.

When to Use Ghost Mode

  • Experimental work — Trying an approach you don't want the agent to learn from or reference later. Test something wild, then close the incognito window.
  • Sensitive conversations — Discussing personal matters, credentials, or anything you don't want persisting in the agent's long-term memory.
  • Exploring bad ideas — Prototyping something you might discard. No point polluting the agent's context with abandoned directions.
  • One-off tasks — Quick operations where the agent doesn't need to remember what it did.
  • Debugging the agent itself — Testing agent behavior without creating a memory trail that could influence future sessions.
  • Shared environments — Using an agent on a machine others can access, and you want to keep certain sessions private.
  • Resetting context pressure — The agent accumulates context over time. Ghost Mode lets you have a "clean room" conversation without adding to that weight.

Example Sessions

Example 1: Quick experiment

You: ghost on
Agent: Ghost mode ON. This session will not be recorded. Memory writes are suppressed until you say "ghost off".

You: Let me try refactoring the auth module with a completely different pattern...
Agent: [works on refactoring, creates files, runs tests]

You: Actually, that didn't work. Let me scrap it.
Agent: [deletes the experimental code]

You: ghost off
Agent: Ghost mode OFF. Session data has been scrubbed. The agent has no memory of this conversation.

Result: The agent's memory is untouched. The experimental refactoring was never recorded. Any files you created or deleted during the session remain as-is.

Example 2: Sensitive discussion

You: ghost on
Agent: Ghost mode ON. This session will not be recorded.

You: I need to test the integration with the staging server using my dev credentials.
Agent: [helps with integration, runs tests against staging]

You: Thanks, that's done. ghost off
Agent: Ghost mode OFF. Session scrubbed. No record of credentials or this conversation remains in my memory.

Result: Credentials were used during the session but never written to daily logs, memory files, or session archives. The agent won't reference them later.

Example 3: Exploring a bad direction

You: ghost on
Agent: Ghost mode ON.

You: What if we rewrite the entire backend in Rust?
Agent: [explores the idea, generates code, benchmarks...]

You: Okay, this is clearly not worth it right now. ghost off
Agent: Ghost mode OFF. Scrubbed. The Rust exploration never happened, as far as my memory is concerned.

Result: The agent won't later suggest Rust or reference the abandoned exploration in future sessions.

Example 4: Checking status

You: ghost status
Agent: Ghost mode: ACTIVE
         Session: ghost-1777145449
         Activated: 2026-04-25T19:30:49Z
         Registry shows 1 session in active state.

⚠️ DATA LOSS WARNING — READ BEFORE INSTALLING

This skill permanently deletes data by design.

When you run ghost off or force-cleanup-all, the skill:

  • Scrubbs entries from your daily logs, semantic memory, and episodic memory files
  • Archives then shreds session transcripts and checkpoint files using shred -u (secure overwrite, then remove)
  • Removes entries from the OpenClaw memory search index

This is irreversible. Deleted files are not recoverable — not from trash, not from backup, not from any undo mechanism. This is the entire point of the skill, not a side effect.

The following scenarios can cause unintended data loss:

  • Bugs or errors in the scrubbing logic may remove more content than intended
  • Misuse — running ghost off in the wrong session or at the wrong time
  • Environment conflicts — if your workspace layout differs from the expected OpenClaw structure, scrubbing may target the wrong files or miss files it should clean
  • Partial failures — if the pipeline crashes mid-run, some files may be scrubbed while others remain, leaving your memory in an inconsistent state
  • Stale sessions — if a ghost session spans multiple days, scrubbing will affect all entries in that time window across all files, including content from other sessions

By installing this skill, you acknowledge and accept these risks.

Recommended: enable daily OpenClaw workspace backups. A tar or rsync backup of ~/.openclaw/workspace/ and ~/.openclaw/data/ run daily ensures you can recover from unintended data loss. Example:

# Add to crontab for daily 2 AM backup
0 2 * * * tar -czf ~/openclaw-backup-$(date +\%F).tar.gz ~/.openclaw/workspace/ ~/.openclaw/data/

How It Works

  1. ghost on — writes a .ghost-mode flag file and registers the session in a local JSON registry
  2. Agent reads the flag — on session start, checks for .ghost-mode. If present, suppresses all writes to memory files, daily logs, semantic/episodic files, and MEMORY.md
  3. ghost off — removes the flag, then runs a 5-stage cleanup pipeline:

- Archive → moves session JSONL and checkpoint files to a temporary staging directory - Scrub → removes ghost-window entries from daily logs, semantic files, episodic files, and MEMORY.md - Index cleanup → removes matching entries from the OpenClaw memory index (SQLite) - Verify → 7-layer check confirms no traces remain - Shred → secure overwrite + delete of all staged files (shred -u, falls back to rm with warning)

Each stage is idempotent — re-running is safe and produces the same result.

Quick Start

# Activate (the agent will also do this when you say "ghost on")
./scripts/ghost_mode.sh on --session-key <key>

# Preview what would be deleted (no changes made)
./scripts/ghost_mode.sh off --dry-run

# Deactivate and scrub (with confirmation prompt)
./scripts/ghost_mode.sh off

# Skip confirmation prompt (for scripted/automated use)
./scripts/ghost_mode.sh off --yes

# Check status (includes config)
./scripts/ghost_mode.sh status

# Force cleanup of stale sessions older than 24 hours
./scripts/ghost_mode.sh force-cleanup-all

Safety Interlocks

Ghost Mode includes two safety mechanisms to prevent accidental data loss:

1. Confirmation Prompt

By default, ghost off and force-cleanup-all require interactive confirmation before deleting anything. You must type yes to proceed.

$ ./scripts/ghost_mode.sh off
⚠️  You are about to permanently delete session data.
   This action is IRREVERSIBLE. Deleted data cannot be recovered.

  Type yes to confirm, or anything else to cancel:
  • Configurable: Set "confirm_before_delete": false in ghost-mode-config.json to disable prompts.
  • Non-interactive fallback: If no terminal is available (e.g., cron, piped input), confirmation is required unless you pass --yes / -y.
  • --yes / -y flag: Skips the confirmation prompt entirely. Use in scripts, cron jobs, or automation.

2. Dry-Run Mode

Every destructive command supports --dry-run — shows exactly what would be deleted without making any changes:

$ ./scripts/ghost_mode.sh off --dry-run
[ghost DRY-RUN] Would archive session files for: ghost-1745695449
[ghost DRY-RUN]   Would copy session JSONL + checkpoints to ~/.openclaw/ghost-archive/
[ghost DRY-RUN]   Would remove originals from sessions directory
[ghost DRY-RUN] Would scrub memory files for session: ghost-1745695449
[ghost DRY-RUN]   Would remove ghost-window entries from: memory/*.md
[ghost DRY-RUN]   Would remove ghost-window entries from: memory/semantic/*.md
[ghost DRY-RUN]   Would remove ghost-window entries from: memory/episodic/*.md
[ghost DRY-RUN]   Would remove promoted ghost entries from: MEMORY.md
[ghost DRY-RUN] Would remove index entries for session: ghost-1745695449
[ghost DRY-RUN]   Would DELETE rows from memory.db matching session ID
[ghost DRY-RUN] Would run 7-layer verification for session: ghost-1745695449
[ghost DRY-RUN] Would secure-delete 3 archived file(s)
  • Configurable default: dry_run_by_default is true by default — ghost off starts in dry-run mode. Pass --yes to execute for real. Set "dry_run_by_default": false in config to disable this safety default.

Configuration File

Create ghost-mode-config.json in your workspace root (~/.openclaw/workspace/ghost-mode-config.json):

{
  "confirm_before_delete": true,
  "dry_run_by_default": true
}
SettingDefaultDescription
confirm_before_deletetrueRequire typing yes before any destructive operation. Set false to disable prompts.
dry_run_by_defaulttrueIf true (default), ghost off and force-cleanup-all start in dry-run mode. Pass --yes to execute for real. Set false to skip dry-run by default.

What This Skill Touches

PathReadWriteDeleteWhen
memory/.ghost-modeFlag lifecycle
memory/.ghost-sessions.jsonRegistry state machine
memory/YYYY-MM-DD.md✓*Scrub ghost-window entries
memory/semantic/*.md✓*Scrub ghost-window entries
memory/episodic/*.md✓*Scrub ghost-window entries
MEMORY.md✓*Scrub promoted ghost entries
~/.openclaw/agents/<agent>/sessions/Archive then remove originals
~/.openclaw/ghost-archive/Temporary staging, shredded after verify
~/.openclaw/data/memory.dbRemove index entries for ghost sessions

\* Writes use atomic rename (.tmp → target) — never partial or corrupted files.

All deletions are user-triggered. The skill only acts when you explicitly run ghost off or force-cleanup-all. No hooks, no daemons, no passive collection.

What This Skill Does NOT Touch

  • Files you create — code, documents, images, configs, anything you explicitly write to disk during a ghost session stays exactly where you put it
  • Local outputs — command output, build artifacts, downloaded files, anything the agent creates as a file output (not a memory entry) is untouched
  • OpenClaw gateway logs — outside agent workspace scope
  • OS-level process traces — outside agent workspace scope
  • Third-party service logs — outside agent workspace scope
  • Files outside the OpenClaw workspace — never read or modified
  • Network requests — none. Entirely local, no API calls, no cloud services

The analogy: Browser incognito mode doesn't delete your downloads. Ghost Mode doesn't delete your files. It only clears the agent's memory of what happened — just like closing a private browsing window clears history but leaves your saved files alone.

File Layout

scripts/
├── ghost_mode.sh           # Main CLI entry point (dry-run, confirm, config)
├── ghost_registry.py       # Session registry + state machine
├── ghost_archive.py        # Session file archival
├── ghost_scrub.py          # Memory file scrubbing
├── ghost_verify.py          # 7-layer verification
└── ghost_index_cleanup.py  # OpenClaw memory index cleanup

references/
└── ARCHITECTURE.md         # Full state machine docs, edge cases, internals

State Machine

active → completed → archived → scrubbed → verified → (shredded)

Each transition is recorded in the registry with a timestamp. Re-running any stage is safe.

Post-Install Warning

The first time the agent detects this skill after installation, it MUST deliver this warning to the user:

⚠️ Ghost Mode is installed. This skill permanently deletes data — logs, memory files, session transcripts, and search index entries — using secure deletion (shred -u). This is irreversible. Bugs, misuse, or environment conflicts can cause unrecoverable data loss beyond what you intended. By keeping this skill installed, you accept these risks. Strongly recommended: set up daily backups of ~/.openclaw/workspace/ and ~/.openclaw/data/. Run ghost_mode.sh status to check the current state at any time.

This warning must be shown once after installation. To prevent repeated warnings, after delivering it, create the file memory/.ghost-mode-warning-shown in the workspace. On subsequent sessions, check for this file — if it exists, skip the warning.

On first install, the agent MUST also create ghost-mode-config.json in the workspace root with confirmation enforced:

{
  "confirm_before_delete": true,
  "dry_run_by_default": true
}

This ensures every new install starts with confirmation enabled. The user may change these settings later, but confirmation must never be silently disabled.

AGENTS.md Integration

After installing, add this to your AGENTS.md so the agent respects ghost mode:

## Ghost Mode

⚠️ This skill permanently deletes data by design. See the post-install warning for details.

- **"ghost on"** → run `ghost_mode.sh on` immediately
- **"ghost off"** → run `ghost_mode.sh off` immediately (requires confirmation unless `--yes`)
- **"ghost status"** → run `ghost_mode.sh status` and report back

When ghost mode is active (`.ghost-mode` flag exists):
- **ZERO memory writes** — no daily logs, semantic files, episodic files, MEMORY.md, AGENTS.md, USER.md, or SOUL.md updates
- Reading files is still allowed
- Do NOT mention ghost mode in channel messages unless the user asks

### Stale Flag Cleanup
If the `.ghost-mode` flag's `activatedAt` is older than 24 hours:

ghost_mode.sh force-cleanup-all

Remove the flag and proceed normally. Log cleanup to stderr only.

Cron Integration (Optional)

The skill works without cron — ghost off runs the full pipeline synchronously. If you want automated cleanup of stale sessions:

# Archive completed ghost sessions every 15 min (optional)
*/15 * * * * ~/.openclaw/workspace/skills/ghost-mode/scripts/ghost_mode.sh archive-completed

# Verify scrubbed sessions hourly (optional)
0 * * * * ~/.openclaw/workspace/skills/ghost-mode/scripts/ghost_mode.sh verify-pending

# Force cleanup stale sessions daily at 3 AM (optional)
0 3 * * * ~/.openclaw/workspace/skills/ghost-mode/scripts/ghost_mode.sh force-cleanup-all

These are optional — the primary workflow is manual ghost on / ghost off.

Requirements

  • Python 3.8+ — for registry, scrub, verify, and index cleanup scripts
  • shred — standard on Linux. macOS: brew install coreutils then use gshred
  • OpenClaw workspace — defaults to ~/.openclaw/workspace/, configurable via OPENCLAW_WORKSPACE env var
  • No external dependencies — no pip packages, no API keys, no cloud services, no network calls

Environment Variables

VariableDefaultPurpose
OPENCLAW_WORKSPACE~/.openclaw/workspacePath to the OpenClaw workspace directory. All memory and registry files are stored here.
OPENCLAW_HOME~/.openclawPath to the OpenClaw home directory. Session files and archive are stored under agents/ and ghost-archive/ here.
OPENCLAW_AGENTmainAgent directory name under OPENCLAW_HOME/agents/. Used to locate session JSONL and checkpoint files.

Security Model

Intentionally destructive. Ghost mode exists to remove data. This is the core purpose, not a side effect. Multiple safety interlocks prevent accidental deletion.

PropertyDetail
Deletion methodshred -u (secure overwrite, then remove). Falls back to rm with warning if shred unavailable
Registry audit trailEvery state transition is timestamped. You can inspect memory/.ghost-sessions.json at any time
7-layer verificationConfirms: flag removed, registry correct, session files gone, checkpoints gone, daily logs free of session references, semantic files free of session references, index clean
Atomic writesAll file modifications use write-to-.tmp then rename — no partial/corrupted state
Confirmation promptghost off and force-cleanup-all require interactive yes confirmation by default. Disable with config or --yes flag
Dry-run mode--dry-run shows what would be deleted without making any changes. Configurable as default via dry_run_by_default
User-triggered onlyNo automatic hooks. No passive collection. No daemons. Acts only when you run ghost on, ghost off, or force-cleanup-all
Path validationAll file operations validate paths are within OPENCLAW_WORKSPACE or OPENCLAW_HOME. Session IDs are checked for path traversal. Operations outside these boundaries are rejected
Env var safety checkAt startup, the scripts verify that OPENCLAW_WORKSPACE and OPENCLAW_HOME resolve to paths within the user's home directory. If either is misconfigured to point at a broader location (e.g. /, /tmp), the scripts abort with an error before performing any operations
Local onlyNo network calls. No API keys. No cloud services. Everything runs on your machine

What's out of scope: Gateway logs, OS process traces, third-party service logs. Ghost mode cleans what the agent controls — your workspace.

Limitations

  • Ghost mode is cooperative, not enforced at the OS level. Write suppression is implemented in the agent runtime — the agent checks for the .ghost-mode flag at session start and during the session, and skips memory writes when it is present. The scripts in this skill handle activation (writing the flag) and cleanup (scrubbing traces after deactivation); the runtime enforcement lives in your agent's AGENTS.md integration, not in these scripts. Other processes, scripts, or non-compliant agents that bypass the flag will still write to the workspace. The flag is a coordination mechanism — it works when the agent reads and respects it.
  • The OpenClaw gateway logs requests independently. Ghost mode cannot remove gateway logs.
  • If the agent crashes before ghost off, the flag persists. The next session will detect it. Run force-cleanup-all to clean up sessions stale for >24 hours.
  • Scrubbing uses timestamp and filename heuristics. The scrubber matches ghost-window entries by mtime and embedded timestamps. If your workspace layout or timestamp formats differ from standard OpenClaw conventions, the scrubber may miss some entries or — in edge cases — remove content from non-ghost sessions that falls within the same time window. Always run --dry-run first to preview what will be affected.

Disclaimer

This skill is provided as-is, with no warranties, express or implied. There is no assurance of fitness for any particular purpose, no guarantee of data safety, and no support commitment.

By installing or using this skill, you accept full responsibility for any outcomes. You use this skill entirely at your own risk. The Author is not liable in any way for any losses, damages, or consequences — direct, indirect, incidental, or otherwise — that result from using this skill. This includes, but is not limited to, data loss, corrupted files, lost sessions, or any other damage arising from the use or inability to use this skill.

You are running a tool whose stated purpose is to permanently delete data. Use it carefully. Back up your workspace.

Source & Issues

  • Repo: https://github.com/stelloxx/ghost-mode
  • Install: clawhub install ghost-mode
  • Report issues: https://github.com/stelloxx/ghost-mode/issues

License

MIT-0

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

98.07%
按下载量换算776

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills