using-agent-brain — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited using-agent-brain (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Expert-level skill for Agent Brain document search with five modes: BM25 (keyword), Vector (semantic), Hybrid (fusion), Graph (knowledge graph), and Multi (comprehensive fusion).
| Mode | Speed | Best For | Example Query |
|---|---|---|---|
bm25 | Fast (10-50ms) | Technical terms, function names, error codes | "AuthenticationError" |
vector | Slower (800-1500ms) | Concepts, explanations, natural language | "how authentication works" |
hybrid | Slower (1000-1800ms) | Comprehensive results combining both | "OAuth implementation guide" |
graph | Medium (500-1200ms) | Relationships, dependencies, call chains | "what calls AuthService" |
multi | Slowest (1500-2500ms) | Most comprehensive with entity context | "complete auth flow with dependencies" |
| Parameter | Default | Description |
|---|---|---|
--mode | hybrid | Search mode: bm25, vector, hybrid, graph, multi |
--threshold | 0.3 | Minimum similarity (0.0-1.0) |
--top-k | 5 | Number of results |
--alpha | 0.5 | Hybrid balance (0=BM25, 1=Vector) |
Searching for exact technical terms:
agent-brain query "recursiveCharacterTextSplitter" --mode bm25
agent-brain query "ValueError: invalid token" --mode bm25
agent-brain query "def process_payment" --mode bm25Counter-example - Wrong mode choice:
# BM25 is wrong for conceptual queries
agent-brain query "how does error handling work" --mode bm25 # Wrong
agent-brain query "how does error handling work" --mode vector # CorrectSearching for concepts or natural language:
agent-brain query "best practices for error handling" --mode vector
agent-brain query "how to implement caching" --mode vectorCounter-example - Wrong mode choice:
# Vector is wrong for exact function names
agent-brain query "getUserById" --mode vector # Wrong - may miss exact match
agent-brain query "getUserById" --mode bm25 # Correct - finds exact matchNeed comprehensive results (default mode):
agent-brain query "OAuth implementation" --mode hybrid --alpha 0.6
agent-brain query "database connection pooling" --mode hybridAlpha tuning:
--alpha 0.3 - More keyword weight (technical docs)--alpha 0.7 - More semantic weight (conceptual docs)Exploring relationships and dependencies:
agent-brain query "what functions call process_payment" --mode graph
agent-brain query "classes that inherit from BaseService" --mode graph --traversal-depth 3
agent-brain query "modules that import authentication" --mode graphPrerequisite: Requires ENABLE_GRAPH_INDEX=true during server startup.
Need the most comprehensive results:
agent-brain query "complete payment flow implementation" --mode multi --include-relationshipsGraphRAG enables relationship-aware retrieval by building a knowledge graph from indexed documents.
export ENABLE_GRAPH_INDEX=true
agent-brain start| Query Pattern | Example |
|---|---|
| Function callers | "what calls process_payment" |
| Class inheritance | "classes extending BaseController" |
| Import dependencies | "modules importing auth" |
| Data flow | "where does user_id come from" |
See Graph Search Guide for detailed usage.
# Index only Python files
agent-brain index ./src --include-type python
# Index Python and documentation
agent-brain index ./project --include-type python,docs
# Index all code files
agent-brain index ./repo --include-type code
# Force full re-index (bypass incremental)
agent-brain index ./docs --forceUse agent-brain types list to see all 14 available presets.
agent-brain folders list # List indexed folders with chunk counts
agent-brain folders add ./docs # Add folder (triggers indexing)
agent-brain folders add ./src --include-type python # Add with preset filter
agent-brain folders remove ./old-docs --yes # Remove folder and evict chunksRe-indexing a folder automatically detects changes:
--force to bypass manifest and fully re-indexEnrich chunk metadata during indexing with custom Python scripts or static JSON metadata.
# Inject via Python script
agent-brain inject ./docs --script enrich.py
# Inject via static JSON metadata
agent-brain inject ./src --folder-metadata project-meta.json
# Validate script before indexing
agent-brain inject ./docs --script enrich.py --dry-runScripts export a process_chunk(chunk: dict) -> dict function:
def process_chunk(chunk: dict) -> dict:
chunk["project"] = "my-project"
chunk["team"] = "backend"
return chunkdocs/INJECTOR_PROTOCOL.md for the full specificationIndexing runs asynchronously via a job queue. Monitor and manage jobs:
agent-brain jobs # List all jobs
agent-brain jobs --watch # Live polling every 3s
agent-brain jobs <job_id> # Job details + eviction summary
agent-brain jobs <job_id> --cancel # Cancel a jobWhen re-indexing, job details show what changed:
Eviction Summary:
Files added: 3
Files changed: 2
Files deleted: 1
Files unchanged: 42
Chunks evicted: 15
Chunks created: 25This confirms incremental indexing is working efficiently.
agent-brain init # Initialize project (first time)
agent-brain start # Start server
agent-brain index ./docs # Index documents
agent-brain query "search" # Search
agent-brain stop # Stop when doneProgress Checklist:
/agent-brain:agent-brain-init succeeded/agent-brain:agent-brain-status shows healthy| Command | Description |
|---|---|
/agent-brain:agent-brain-init | Initialize project config |
/agent-brain:agent-brain-start | Start with auto-port |
/agent-brain:agent-brain-status | Show port, mode, document count |
/agent-brain:agent-brain-list | List all running instances |
/agent-brain:agent-brain-stop | Graceful shutdown |
Before querying, verify setup:
agent-brain statusExpected:
Counter-example - Querying without validation:
# Wrong - querying without checking status
agent-brain query "search term" # May fail if server not running
# Correct - validate first
agent-brain status && agent-brain query "search term"See Server Discovery Guide for multi-instance details.
The embedding cache automatically stores computed embeddings to avoid redundant API calls during reindexing. No setup is required — the cache is active by default.
agent-brain cache statusA healthy cache shows:
# Clear with confirmation prompt
agent-brain cache clear
# Clear without prompt (use in scripts)
agent-brain cache clear --yesNo configuration is required. Embeddings are cached on first compute and reused on subsequent reindexes of unchanged content (identified by SHA-256 hash). The cache complements the ManifestTracker — files that haven't changed on disk won't need to recompute embeddings.
See the API Reference for GET /index/cache and DELETE /index/cache endpoint details, including response schemas.
This skill focuses on searching and querying. Do NOT use for:
configuring-agent-brain skillconfiguring-agent-brain skillconfiguring-agent-brain skillconfiguring-agent-brain skillScope boundary: This skill assumes Agent Brain is already installed, configured, and the server is running with indexed documents.
0.3 (see Mode Parameters). Keep it for broad recall; raise toward 0.6–0.7 to tighten precision, or lower to 0.1–0.2 if results are too sparseruntime.json rather than assuming port 8000agent-brain stop when done--include-type python,docs instead of manual glob patterns--force for efficient updates--dry-run injector scripts before full indexingagent-brain jobs --watch for long-running index jobs| Guide | Description |
|---|---|
| BM25 Search | Keyword matching for technical queries |
| Vector Search | Semantic similarity for concepts |
| Hybrid Search | Combined keyword and semantic search |
| Graph Search | Knowledge graph and relationship queries |
| Server Discovery | Auto-discovery, multi-agent sharing |
| Provider Configuration | Environment variables and API keys |
| Integration Guide | Scripts, Python API, CI/CD patterns |
| API Reference | REST endpoint documentation |
| Troubleshooting | Common issues and solutions |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.