Skip to content

dandv/zed-skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zed Agent Skills

Two Zed agent skills for working with Zed's local agent thread history. These are designed to be installed togetherzed-thread-move depends on zed-sqlite for Zed profile autodetection.

Skills

zed-sqlite — Thread Search

Search your Zed agent thread history by keyword or regex. Handles zstd decompression so you can grep over compressed message blobs.

When to use: "What did we discuss about X?" — find old agent conversations by content (messages, tool calls, summaries).

Key features:

  • Autodetects running Zed profiles (via /proc cmdline parsing)
  • When multiple profiles are active, searches all of them
  • Handles both zstd Python module and CLI fallback
  • Safe to run while Zed is open (opens DB in read-only mode)

zed-thread-move — Thread Migration

Move or import agent threads between projects or Zed profiles without hand-writing SQL.

When to use:

  • "Move this thread to this project",
  • "Move all threads from project A to project B", or
  • "Import threads from this other Zed installation."

Key features:

  • Two-phase workflow: plan (read-only) → apply (with backup)
  • Handles all three Zed databases (threads.db, 0-dev/db.sqlite, 0-stable/db.sqlite)
  • Properly handles archived threads and cross-profile imports
  • Automatic backup before writing (zipped timestamped archive)
  • STOP_AND_ASK guard on ambiguous matches — never overwrites silently

Dependencies

zed-thread-move  ──depends on──▶  zed-sqlite
     │                                  │
     │  detect_active_profile()         │  search.py --show-profiles
     │  zed_running()                   │  search.py --running
     │                                  │
     ▼                                  ▼
  move.py           shells out to    search.py

zed-thread-move/scripts/move.py does not implement its own profile or process detection. Instead it shells out to zed-sqlite/scripts/search.py with --show-profiles and --running, resolved relative to its own path (sibling-skill layout):

~/.agents/skills/
├── zed-sqlite/
│   └── scripts/
│       └── search.py        ◀── owns canonical /proc-based detection
└── zed-thread-move/
    └── scripts/
        └── move.py          ◀── calls ../zed-sqlite/scripts/search.py

Implications for contributors

  • Do not reintroduce ps/pgrep-based detection in move.py. Fix detection bugs in search.py only.
  • The Zed binary basename set is {"zed"} (not zed-editor). The /proc cmdline parser matches on this set — avoid path regexes.
  • --show-profiles always returns a best-guess default (XDG) even when no Zed is running. move.py uses this to surface missing databases via env/apply rather than fatally erroring.

Requirements

  • Linux (reads /proc for profile detection)
  • Python ≥ 3.10
  • uv (recommended) — handles zstandard installation automatically via PEP 723 script metadata. Alternatively: pip install zstandard, or the zstd CLI on $PATH.

Installation

git clone https://github.com/dandv/zed-skills ~/.agents/skills/zed-skills

Or symlink the individual skills into ~/.agents/skills/:

ln -s /path/to/this/repo/zed-sqlite ~/.agents/skills/zed-sqlite
ln -s /path/to/this/repo/zed-thread-move ~/.agents/skills/zed-thread-move

Both skills must be present for zed-thread-move's autodetection to work. If you only need search, you can install just zed-sqlite.

License

Apache 2.0 — see LICENSE.md.

About

Agent skills for Zed: search in Zed threads, move Zed threads across workspaces

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages