skills/local-knowledge/SKILL.md
Leverage personal notes and documentation through Terraphim's role-based search. AI agents can search developer's local knowledge organized by domain (Rust, frontend, architecture) using the terraphim-agent REPL commands.
npx skillsauth add terraphim/codex-skills local-knowledgeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when you need to search the developer's personal notes, documentation, or local knowledge base for context-specific information.
Terraphim enables AI coding agents to search local knowledge through role-based haystacks. Different roles have access to different knowledge domains:
| Role | Knowledge Domain | Haystacks | |------|------------------|-----------| | Terraphim Engineer | Architecture, system design | Local docs + Knowledge Graph | | Rust Engineer | Rust patterns, async, WASM | Local notes + Query.rs API | | Frontend Engineer | JavaScript, TypeScript, React | GrepApp (GitHub code search) |
Search local knowledge when the user:
Trigger Phrases:
┌─────────────────────────────────────────────────────────────┐
│ Claude Code Agent │
│ Uses /search and /role commands via terraphim-agent REPL │
└───────────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ terraphim-agent REPL │
│ /search "query" --role rust-engineer --limit 10 │
└───────────────────────────┬─────────────────────────────────┘
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Terraphim Eng │ │ Rust Engineer │ │ Frontend Eng │
│ │ │ │ │ │
│ • Local docs │ │ • Rust notes │ │ • GrepApp JS │
│ • expanded_docs │ │ • Query.rs │ │ • GrepApp TS │
│ • Knowledge KG │ │ • Auto-gen KG │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
# Build terraphim-agent with REPL features
cd /path/to/terraphim-ai
cargo build -p terraphim_agent --features repl-full --release
# Start the REPL
./target/release/terraphim-agent
# In REPL: List available roles
/role list
# Switch to Rust Engineer role
/role select rust-engineer
# Search your notes
/search "async iterator patterns" --limit 5
Roles are defined in JSON config files at terraphim_server/default/:
{
"roles": {
"Rust Engineer": {
"relevance_function": "title-scorer",
"haystacks": [
{
"location": "/path/to/your/notes",
"service": "Ripgrep",
"extra_parameters": { "glob": "*rust*.md" }
}
]
}
}
}
~/notes/rust/)Check if terraphim-agent is available:
# Find the agent binary
if command -v terraphim-agent >/dev/null 2>&1; then
AGENT="terraphim-agent"
elif [ -x "./target/release/terraphim-agent" ]; then
AGENT="./target/release/terraphim-agent"
elif [ -x "$HOME/projects/terraphim/terraphim-ai/target/release/terraphim-agent" ]; then
AGENT="$HOME/projects/terraphim/terraphim-ai/target/release/terraphim-agent"
fi
Search Commands:
# Basic search (uses current role)
/search "query string"
# Search with specific role
/search "async patterns" --role rust-engineer
# Limit results
/search "error handling" --limit 5
# Semantic search (uses knowledge graph)
/search "error handling" --semantic
# Concept-based search
/search "error handling" --concepts
Role Commands:
# List available roles
/role list
# Select a role
/role select rust-engineer
# Show current role
/role current
Graph Commands:
# Show knowledge graph terms
/graph
# Show top K terms
/graph --top-k 20
Pattern 1: Domain-Specific Search
When the user asks about a specific domain, select the appropriate role first:
# User asks about Rust async
/role select rust-engineer
/search "async iterator" --limit 5
Pattern 2: Broad Knowledge Search
For general questions, use the Terraphim Engineer role with expanded_docs:
/role select terraphim-engineer
/search "atomic data server configuration"
Pattern 3: Code Examples
For frontend code examples, use GrepApp integration:
/role select frontend-engineer
/search "useState useEffect pattern"
Search results include:
Example output:
Results for "async iterator":
1. [rust-matching-iterators.md]
Path: /Users/alex/notes/rust-matching-iterators.md
Async iterator over AWS S3 pagination using State enum...
2. [rust-python-extension.md]
Path: /Users/alex/notes/rust-python-extension.md
PyO3/Maturin async patterns for Python extensions...
If terraphim-agent is not available or fails:
# Check if search succeeded
if ! /search "query" 2>/dev/null; then
echo "Local search unavailable, falling back to general knowledge"
fi
Knowledge graph files enable semantic term expansion:
# term_name
Optional description of the term.
synonyms:: synonym1, synonym2, synonym3
Example - Rust async terms:
# async_iterator
Async iterators in Rust using Stream trait and async/await.
synonyms:: Stream, AsyncIterator, futures::Stream, tokio::stream
{
"Rust Engineer": {
"shortname": "rust-engineer",
"relevance_function": "terraphim-graph",
"kg": {
"knowledge_graph_local": {
"input_type": "markdown",
"path": "docs/src/kg/rust_notes_kg"
}
},
"haystacks": [
{
"location": "/Users/alex/synced/expanded_docs",
"service": "Ripgrep",
"extra_parameters": { "glob": "*rust*.md" }
},
{
"location": "https://query.rs",
"service": "QueryRs"
}
]
}
}
{
"Frontend Engineer": {
"shortname": "frontend-engineer",
"relevance_function": "title-scorer",
"haystacks": [
{
"location": "https://grep.app",
"service": "GrepApp",
"extra_parameters": { "language": "JavaScript" }
},
{
"location": "https://grep.app",
"service": "GrepApp",
"extra_parameters": { "language": "TypeScript" }
}
]
}
}
| Issue | Solution |
|-------|----------|
| No results returned | Check haystack path exists and contains .md files |
| Wrong role active | Use /role select <name> to switch |
| Search too slow | Reduce --limit or use more specific queries |
| KG not loading | Verify path in config and markdown format |
| Agent not found | Build with cargo build -p terraphim_agent --features repl-full --release |
terraphim-hooks - For text replacement using knowledge graphsession-search - For searching AI coding session historyrust-development - For Rust-specific patternsdevelopment
Xero Accounting API integration skill. Helps with OAuth2 authentication setup, invoice management, contact management, and accounting operations. Provides guidance on rate limits, token refresh, and API best practices.
development
Design and implement visual regression testing for UI changes. Defines screenshot coverage, rendering stabilization, baseline management, and CI integration (e.g., Playwright screenshots, Percy/Chromatic). Use when UI/styling/layout changes need protection against regressions, or when adding screenshot-based tests to a web/WASM/desktop UI.
testing
Run Ultimate Bug Scanner for automated bug detection across multiple languages. Detects 1000+ bug patterns including null pointers, security vulnerabilities, async/await issues, and resource leaks. Integrates with quality-gate workflow.
testing
Comprehensive test writing, execution, and failure analysis. Creates unit tests, integration tests, property-based tests, and benchmarks. Analyzes test failures and improves test coverage.