btr-query
Search LOCAL BTR context tree (NOT ByteRover/brv). Use when the user asks "how did we implement", "what's our pattern for", "find context about", "query BTR", "search BTR", "find in BTR", or needs project-specific knowledge.
When & Why to Use This Skill
The btr-query skill is a specialized context retrieval tool designed to search a local BTR (Context Tree) for project-specific knowledge. It enables Claude to intelligently locate implementation patterns, architectural designs, and domain-specific logic within a codebase. By leveraging natural language queries and domain filtering, it provides the agent with the necessary context to answer complex questions about 'how' and 'why' a project is structured, ensuring high-accuracy code generation and debugging based on existing local standards.
Use Cases
- Pattern Identification: Search for existing implementation patterns, such as 'how do we handle JWT authentication', to ensure new code remains consistent with the project's established style.
- Domain-Specific Research: Use domain filters to narrow down searches to specific areas like 'api' or 'frontend' to find relevant logic or rate-limiting implementations.
- Contextual Troubleshooting: Retrieve relevant context and documentation from the BTR tree when debugging to understand the original intent and structure of specific modules.
- Knowledge Discovery: Quickly find project-specific 'how-to' information or architectural decisions without manually browsing through large directories.
| name | btr-query |
|---|---|
| description | Search LOCAL BTR context tree (NOT ByteRover/brv). Use when the user asks "how did we implement", "what's our pattern for", "find context about", "query BTR", "search BTR", "find in BTR", or needs project-specific knowledge. |
| allowed-tools | Read, Grep, Glob, Bash |
BTR Query
⚠️ CRITICAL: BTR ≠ ByteRover
This skill uses btr (local context tree), NOT brv (ByteRover CLI).
| Command | Tool | Syntax |
|---|---|---|
| ✓ CORRECT | btr |
btr query "search term" / btr list / btr stats |
| ✗ WRONG | brv |
Different tool, different syntax, requires auth |
PREFER MCP tools when available:
mcp__btr__query_context- For searchingmcp__btr__list_contexts- For browsingmcp__btr__get_stats- For statistics
Only use Bash btr commands if MCP tools are unavailable.
Find and retrieve relevant context using intelligent search.
Quick Start
btr query "<natural language query>" [--domain <domain>] [--limit <n>]
Instructions
- Understand the user's information need
- Formulate a natural language query
- Optionally filter by domain for more focused results
- Run the CLI command
- Present results with relevance context
- Offer to retrieve full content if summary shown
Examples
Find authentication patterns
btr query "how do we handle JWT authentication"
Search within a specific domain
btr query "rate limiting implementation" --domain api
Get more results
btr query "error handling" --limit 10
For advanced query patterns, see advanced-queries.md.