S library

From xg-gh-25/SwarmAI · View interactive version

S library is an AI agent skill from the GitHub repository xg-gh-25/SwarmAI. Mount external folders (code or docs) into the Library so they can be recalled, and search it. TRIGGER: \"mount <path>\", \"add this folder to my library\", \"search my library\", \"挂载\". NOT FOR: single files (Inbox), URLs (s_learn-content), new DDDs.

How to use this skill

Skill file

Library Skill — mount, search

The Library is the agent's bookshelf: the Native store (Knowledge/, already in

recall) + mount points — references to external directories on the user's disk,

indexed in place, never copied (index-not-warehouse). This skill is the

agent-facing half of the mount engines (the +Add Folder button uses the same core

functions via the API).

Core principle: a mount stores a {path, kind} pointer + an index,

never a copy of the source. Recall lands on the pointer → you Read the LIVE

source (progressive load). An external directory is mounted; a single file

goes to the Inbox (not this skill); a URL goes to s_learn-content.

Tool

"$SWARM_BACKEND_BIN" py {SKILL_DIR}/scripts/library.py <command> [options]

All commands operate on the real library_mounts registry + the same

core.library_mounts engines the API uses — this skill does NOT reinvent them.

Commands

mount — register + index an external directory

Judge the kind from the directory (code if it holds parseable source, else docs),

register it, and index:

"$SWARM_BACKEND_BIN" py {SKILL_DIR}/scripts/library.py mount --path ~/Desktop/AI-Native/some-repo --scope SwarmAI

are now recallable.

FTS5 (same engine as Knowledge/ itself), so recall reaches it IMMEDIATELY.

Binaries are skipped. No briefing step — mounting IS indexing.

search — see what recall would retrieve

"$SWARM_BACKEND_BIN" py {SKILL_DIR}/scripts/library.py search --query "widget scoring" --scope SwarmAI

Runs the real recall path (library + codeintel domains) — the same thing the

Browse-tab search box shows.

list — show registered mounts + health

"$SWARM_BACKEND_BIN" py {SKILL_DIR}/scripts/library.py list --scope SwarmAI

Workflow — "mount <path>"

  1. Run mount --path <path> → it judges kind, registers, AND indexes in one step

(code → symbol graph; docs → text chunked into the shared Knowledge FTS5).

  1. Confirm to the user: what was mounted, its kind, and the count indexed

(symbols for code, chunks for docs) — recall reaches it immediately.

Boundaries

sends the complete content to S6; it does not copy the file. A URL the user

explicitly asks to save → s_learn-content, which submits a Reference through S1.

authorize another (the cross-project contamination guard stays intact).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.