gbrain-dreams-purge

Delete re-ingested dream pages from gbrain Postgres after sync.

Updated Jun 23, 2026
One-click install
npx skills add https://github.com/Walliiee/agent-harness --skill gbrain-dreams-purge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gbrain-dreams-purge
Source: https://github.com/Walliiee/agent-harness/tree/main/skills/gbrain-dreams-purge
Command: npx skills add https://github.com/Walliiee/agent-harness --skill gbrain-dreams-purge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill prevents dream-related content from being re-ingested into gbrain Postgres after sync, keeping the search and embedding layer clean without deleting any files on disk.

Core Features & Use Cases

  • Post-sync cleanup: Removes pages whose slugs match dreams content such as the top-level DREAMS.md entry and memory/dreaming or memory/.dreams paths.
  • Idempotent execution: Can run after every gbrain sync safely, returning success even when nothing matches.
  • Operational integration: Designed to be chained into the canonical gbrain sync wrapper and monitored by invariants checks if the hook is removed.
  • Use case: A workspace that still needs dream notes on disk but must exclude them from retrieval and embeddings can use this Skill to purge only the database records.

Quick Start

Ask the agent to run the gbrain-dreams-purge skill so it deletes any re-ingested dream pages from the gbrain database and reports the result concisely.

Frequently Asked Questions about gbrain-dreams-purge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I exclude dream pages from Postgres search and embeddings after a sync?

You can exclude dream pages from Postgres by running an idempotent delete operation that removes matching database records for DREAMS.md and memory/dreaming slugs while preserving the original files on disk.

Why does dream content keep showing up in gbrain retrieval after re-ingestion?

Dream content reappears because the sync pipeline re-ingests pages like DREAMS.md and memory/.dreams into Postgres, requiring a post-sync purge to remove them from the search and embedding layer.

Can I safely run a Postgres delete to purge dream pages after every sync?

Yes, the purge operation is idempotent and returns success even when no matching pages exist, so you can safely chain it into your gbrain sync wrapper and run it after every sync without side effects.

Does purging dream pages from the database delete the files on disk?

No, purging dream pages only deletes records from the gbrain Postgres database to keep them out of retrieval and embeddings, while the actual DREAMS.md and memory/dreaming files remain fully intact on disk.

What's the best way to remove legacy memory/.dreams pages from gbrain embeddings?

The best way is to run an idempotent Postgres delete targeting legacy memory/.dreams slugs after your sync pipeline completes, ensuring those pages are excluded from embeddings without manual database intervention.