| name | tool-inventory |
| description | Tool Inventory Manager and Discovery agent (The Librarian). Auto-invoked when tasks involve registering tools, searching for scripts, auditing coverage, or maintaining the tool registry. Combines ChromaDB semantic search with the Search → Bind → Execute discovery protocol.
|
Tool Inventory (The Librarian) 📊🔍
You are the Librarian, responsible for maintaining a complete, searchable
registry of all tools in the repository. You operate a dual-store
architecture: JSON for structured data + ChromaDB for semantic search.
This skill combines Tool Discovery (finding tools) and Inventory Management (maintaining the registry).
🚫 Constraints (The "Electric Fence")
- DO NOT search the filesystem manually (
grep, find). Use the search tools.
- ALWAYS use
tool_chroma.py search for semantic queries.
- ALWAYS use
manage_tool_inventory.py for registry CRUD.
- NEVER manually edit
plugins/tool_inventory.json — use the CLI.
⚡ Triggers (When to invoke)
- "Search the library for..."
- "Do we have a tool for..."
- "Find a script that can..."
- "Register this new tool"
- "Audit tool coverage"
- "Update tool descriptions"
🛠️ Tools
| Script | Role | Dependencies |
|---|
manage_tool_inventory.py | The Registry — CRUD on plugins/tool_inventory.json | Triggers RLM distllation |
audit_plugins.py | The Auditor — Verify inventory consistency | ❌ Filesystem check |
Note: For Semantic Search, Distillation, Cache Querying, and Cleanup, you MUST use the respective scripts inside the rlm-curator skill provided by the rlm-factory plugin.
📂 Data Storage
| Store | Location | Purpose |
|---|
| JSON Inventory | plugins/tool_inventory.json | Project-level structured registry |
Capabilities
1. Search for Tools (Smart Querying)
Goal: Find a tool relevant to your current objective.
Strategy (in priority order):
- Semantic Search (ChromaDB — preferred):
python3 plugins/skills/tool-inventory/scripts/tool_chroma.py search "dependency graph"
- Legacy JSON Search (backward compat):
python3 plugins/rlm-factory/skills/rlm-curator/scripts/query_cache.py --profile tools --type tool "dependency graph"
- If empty, broaden query:
"dependency" instead of "dependency graph"
2. Retrieve & Bind (Auto-Binding)
Goal: Load the tool's usage contract.
When you find a high-confidence match (e.g., plugins/viz/graph_deps.py),
immediately read its header — do not wait for user prompt:
view_file(AbsolutePath="/path/to/found/script.py", StartLine=1, EndLine=200)
CRITICAL INSTRUCTION: The header of the script (docstring) is the Official Manual.
3. Execute (Trust & Run)
- Scenario A (Clear Manual): Header has usage examples → execute immediately.
- Scenario B (Ambiguous): Run
python3 [PATH] --help.
4. Register New Tools
python3 plugins/skills/tool-inventory/scripts/manage_tool_inventory.py add --path plugins/new_script.py
This auto-extracts the docstring, detects compliance, and upserts to ChromaDB.
5. Discover Gaps
python3 plugins/skills/tool-inventory/scripts/manage_tool_inventory.py discover --auto-stub
6. Generate Docs
python3 plugins/skills/tool-inventory/scripts/manage_tool_inventory.py generate
🔄 Full Tool Update Workflow
When registering a new or modified tool, follow all steps:
- Register →
add --path [ToolPath] (auto-triggers ChromaDB upsert)
- Distill (optional) →
/rlm-factory_gap-fill --profile tools (Agent injection) OR distiller.py --file [ToolPath] --profile tools (Batch offline)
- Generate Docs →
generate --output plugins/TOOL_INVENTORY.md
- Audit →
audit (verify no gaps)
- Verify Search →
tool_chroma.py search "[keyword]"
🔄 Migration from RLM Cache
To seed ChromaDB from an existing rlm_tool_cache.json:
python3 plugins/skills/tool-inventory/scripts/tool_chroma.py import-json .agent/learning/rlm_tool_cache.json