vector-memory-hack
Fast semantic search for AI agent memory files using TF-IDF and SQLite. Enables instant context retrieval from MEMORY.md or any markdown documentation. Use when the agent needs to (1) Find relevant context before starting a task, (2) Search through large memory files efficiently, (3) Retrieve specific rules or decisions without reading entire files, (4) Enable semantic similarity search instead of keyword matching. Lightweight alternative to heavy embedding models - zero external dependencies, <10ms search time.
Why use this skill?
Boost AI agent efficiency with Vector Memory Hack. Perform lightning-fast semantic searches on local markdown files using SQLite and TF-IDF.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/mig6671/vector-memory-hackWhat This Skill Does
The vector-memory-hack skill provides an ultra-lightweight, high-performance semantic search engine for your local OpenClaw memory files. By implementing a TF-IDF vectorizer coupled with SQLite storage, it enables your AI agent to bypass the token-heavy process of reading entire documentation files. Instead of loading thousands of tokens to find a specific rule or configuration, this skill computes sparse vectors to identify the most relevant document sections in under 10 milliseconds. It operates without external dependencies, making it a robust and portable solution for any environment where privacy and performance are paramount.
Installation
To install this skill, use the integrated clawhub installer. Run the following command in your terminal:
clawhub install openclaw/skills/skills/mig6671/vector-memory-hack
Once installed, initialize your database by running the rebuild command: python3 scripts/vector_search.py --rebuild. This will parse your existing MEMORY.md file and establish the local SQLite index needed for subsequent semantic queries.
Use Cases
- Context Loading: Automatically fetch relevant guidelines before executing complex system tasks.
- Large Documentation Handling: Efficiently query sprawling knowledge bases or project logs that exceed typical context window efficiency.
- Project Navigation: Quickly find specific procedural rules or API definitions buried in long markdown documents without wasting tokens on irrelevant text.
- Offline Operations: Perfect for air-gapped environments or scenarios where calling an external embedding API is prohibited or latency is an issue.
Example Prompts
- "vsearch 'how do I handle the database migration process?'"
- "Find the specific security guidelines for SSH access in my MEMORY.md file."
- "Run a search for 'API authentication token requirements' to see if there are any existing rules I should follow."
Tips & Limitations
- Incremental Updates: Use the
--updateflag frequently if your MEMORY.md changes, as the index does not sync in real-time by default. - Multilingual Support: The custom tokenizer is language-agnostic, but performance is optimized for languages where words are space-separated. For languages like Japanese or Chinese, you may need to adjust the tokenization logic in the script.
- Scope: This tool is designed for semantic similarity, not exact substring matching. If you need precise pattern matching, pair this with standard grep tools.
- Configuration: Ensure the
MEMORY_PATHinvector_search.pypoints correctly to your primary documentation file to avoid search failures.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-mig6671-vector-memory-hack": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
polymarket-news-monitor
Monitor official Polymarket sources (The Oracle blog, API status) for important updates, security alerts, and breaking news. Automatic importance scoring with instant notifications for critical events.
stepfun-openrouter
Integrates StepFun AI models (Step-3.5 Flash, Step-3) via OpenRouter API. Free tier available. Features visible reasoning, fast responses, and multimodal capabilities.
stepfun-openrouter
Integrates StepFun AI models (Step-3.5 Flash, Step-3) via OpenRouter API. Free tier available. Features visible reasoning, fast responses, and multimodal capabilities.
minimal-test-skill
Minimal test skill for debugging ClawHub publishing
phoenix-shield
Self-healing backup and update system with intelligent rollback. Protects against failed updates by automatically monitoring system health post-update and recovering from backups when needed. Features canary deployment testing, health baselines, smart rollback, and 24/7 automated monitoring. Use when performing critical system updates, managing production deployments, or ensuring high availability of services. Prevents downtime through pre-flight checks, integrity verification, and automatic recovery workflows.