skill-depot replaces the "dump all skill frontmatter into context" approach with selective, semantic retrieval. Agent skills are stored as Markdown files and indexed with vector embeddings — only the relevant skills are loaded when needed, keeping context lean. - Semantic Search — Find skills by meaning, not just keywords, using embedded vector search - Fully Local — No API keys, no cloud. U
Add this skill
npx mdskills install Ruhal-Doshi/skill-depotWell-architected RAG-based skill retrieval with semantic search, fully local embedding, and comprehensive CLI tools.
1# skill-depot23> RAG-based skill retrieval system for AI agents. Scalable long-term storage with semantic search via MCP.45**skill-depot** replaces the "dump all skill frontmatter into context" approach with selective, semantic retrieval. Agent skills are stored as Markdown files and indexed with vector embeddings — only the relevant skills are loaded when needed, keeping context lean.67## ✨ Features89- **🔍 Semantic Search** — Find skills by meaning, not just keywords, using embedded vector search10- **🏠 Fully Local** — No API keys, no cloud. Uses SQLite + sqlite-vec for storage and a local transformer model for embeddings11- **🤖 Agent-Agnostic** — Works with Claude Code, Codex, OpenClaw, Gemini, and any MCP-compatible agent12- **📂 Two-Scope Storage** — Global skills (`~/.skill-depot/`) available everywhere, project skills (`.skill-depot/`) synced via git13- **⚡ Auto-Discovery** — Finds existing skills from your AI agents during setup14- **🔌 MCP Protocol** — Integrates seamlessly as an MCP server with 7 tools for skill management1516## 🚀 Quick Start1718### 1. Initialize1920```bash21npx skill-depot init22```2324This will:25- Create the `~/.skill-depot/` global directory26- Scan for existing skills in Claude Code, Codex, OpenClaw directories27- Let you select which skills to import via an interactive checklist28- Download the embedding model (~80MB, one-time)29- Index all imported skills3031### 2. Configure Your Agent3233Add skill-depot to your agent's MCP configuration:3435**Claude Code** (`~/.claude/mcp.json`):36```json37{38 "mcpServers": {39 "skill-depot": {40 "command": "npx",41 "args": ["skill-depot", "serve"]42 }43 }44}45```4647**Codex / OpenClaw / Cursor**: Add the same MCP server config in your agent's settings.4849### 3. Use5051Your agent now has access to these tools:5253| Tool | Description |54|------|-------------|55| `skill_search` | Semantic search — returns metadata + snippets |56| `skill_read` | Load the full content of a skill |57| `skill_save` | Save a new skill and index it |58| `skill_update` | Update an existing skill |59| `skill_delete` | Remove a skill |60| `skill_reindex` | Rebuild the search index |61| `skill_list` | List all indexed skills |6263## 📖 How It Works6465### The Problem6667Traditional agent skill systems load **all** skill file frontmatter into the agent's context window every session. With a large skill library, this wastes precious context on irrelevant information.6869### The Solution7071skill-depot acts as a **RAG layer** for agent skills:72731. Skills are stored as Markdown files with YAML frontmatter742. Each skill is embedded into a 384-dimensional vector using a local transformer model753. When an agent needs a skill, it searches by meaning — only the most relevant skills are returned764. The agent can then load the full content of selected skills via a second tool call7778```79Agent → skill_search("deploy nextjs to vercel")80 ← [{ name: "deploy-vercel", score: 0.92, snippet: "..." }, ...]8182Agent → skill_read("deploy-vercel")83 ← Full markdown content of the skill84```8586### Storage Architecture8788```89~/.skill-depot/ # Global (all projects)90├── config.json91├── models/ # Embedding model cache92├── skills/ # Global skill files93└── index.db # SQLite + vector index9495<project>/.skill-depot/ # Project-level (git-synced)96├── skills/ # Project-specific skills97└── index.db # Project vector index (gitignored)98```99100## 🛠️ CLI Reference101102```bash103# Setup104skill-depot init # Interactive setup + agent discovery105skill-depot init --auto # Non-interactive, import everything106107# Server108skill-depot serve --project . # Start MCP server (foreground/stdio)109skill-depot start --project . # Start as background daemon110skill-depot stop # Stop daemon111skill-depot status # Check daemon status112skill-depot restart # Restart daemon113114# Skill Management115skill-depot add <file> # Add a skill file (project scope)116skill-depot add <file> --global # Add as global skill117skill-depot remove <name> # Remove a skill118skill-depot list # List all skills119skill-depot list --global # List global skills only120skill-depot search <query> # Search skills from CLI121122# Maintenance123skill-depot reindex # Rebuild all indexes124skill-depot doctor # Health check125```126127## 📝 Skill Format128129Skills use standard YAML frontmatter + Markdown — the same format used by Claude Code, Codex, and other agents:130131```markdown132---133name: deploy-to-vercel134description: How to deploy a Next.js application to Vercel135tags: [deployment, vercel, nextjs]136keywords: [vercel cli, production build, environment variables]137---138139## Steps1401411. Install the Vercel CLI: `npm i -g vercel`1422. Run `vercel` in the project root1433. Follow the prompts to link your project144...145```146147## 🏗️ Tech Stack148149| Component | Technology |150|-----------|-----------|151| Language | TypeScript (ESM) |152| Database | SQLite via `better-sqlite3` |153| Vector Search | `sqlite-vec` extension |154| Embeddings | `@xenova/transformers` (`all-MiniLM-L6-v2`) |155| Fallback | BM25 term-frequency hashing |156| Protocol | MCP via `@modelcontextprotocol/sdk` |157| CLI | `commander` + `inquirer` + `chalk` + `ora` |158159## 🤝 Contributing160161Contributions are welcome! This is an open-source project.162163```bash164# Clone and install165git clone https://github.com/your-username/skill-depot.git166cd skill-depot167pnpm install168169# Development170pnpm dev # Watch mode build171pnpm test # Run tests172pnpm lint # Type check173pnpm build # Production build174```175176## 📄 License177178MIT179
Full transparency — inspect the skill content before installing.