BTR Curate
⚠️ CRITICAL: BTR ≠ ByteRover
This skill uses btr (local context tree), NOT brv (ByteRover CLI).
| Command |
Tool |
Syntax |
| ✓ CORRECT |
btr |
btr curate <domain> <topic> --content "..." |
| ✗ WRONG |
brv |
Different tool, different syntax, requires auth |
PREFER MCP tools when available:
mcp__btr__curate_context - Structured, type-safe
mcp__btr__query_context - Validated search
Only use Bash btr commands if MCP tools are unavailable.
Add or update context with intelligent metadata extraction.
Preferred Method
FIRST: Use MCP tools if available
mcp__btr__curate_context(domain="auth", topic="jwt-flow", content="...", tags=["security"])
FALLBACK: Use btr CLI via Bash
btr curate auth jwt-flow --content "..." --tags security
NEVER: Use brv (different product entirely)
Quick Start
btr curate <domain> <topic> --content "<content>" [--tags tag1,tag2]
Instructions
- Analyze the content to curate
- Suggest appropriate domain and topic
- Auto-extract relevant tags from content
- Generate a brief summary
- Run the CLI command
- Confirm successful curation
Auto-Tagging Guidelines
Extract tags based on:
- Technology names (react, typescript, postgresql)
- Patterns (singleton, middleware, decorator)
- Concepts (authentication, caching, validation)
- Categories (security, performance, best-practice)
Interactive Mode
For complex content, use interactive mode:
btr curate --interactive
This walks through domain selection, topic naming, and tag extraction step by step.
Domain Selection Guide
| Content Type |
Suggested Domain |
| Login, tokens, sessions |
auth |
| REST endpoints, GraphQL |
api |
| SQL, ORM, migrations |
database |
| Components, hooks, CSS |
frontend |
| Unit tests, integration tests |
testing |
| CI/CD, containers, monitoring |
devops |
| Design decisions, patterns |
architecture |
| Security rules, validation |
security |
| Performance tuning |
performance |
Topic Naming Conventions
Use kebab-case with descriptive names:
Good:
jwt-refresh-token-flow
postgres-connection-pool-config
react-form-validation-hook
Avoid:
jwt (too generic)
myStuff (not descriptive)
temp_notes (not permanent-sounding)
Updating Existing Context
To update an existing topic:
btr curate auth jwt-validation --content "..." --update
The --update flag merges new content with existing content.
Content Guidelines
When curating content, include:
- The What: Actual code or configuration
- The Why: Reason for this approach
- The When: When to use this pattern
- Usage Examples: How to apply it
- Caveats: Any gotchas or limitations
Example Curation Flow
User provides a code snippet for database connection pooling.
- Analyze content: PostgreSQL connection pool configuration
- Suggest domain:
database
- Suggest topic:
postgres-connection-pooling
- Extract tags:
postgresql, connection-pool, performance, configuration
- Execute:
btr curate database postgres-connection-pooling \
--content "..." \
--tags postgresql,connection-pool,performance,configuration
- Confirm: "Curated to database/postgres-connection-pooling with 4 tags"
For metadata extraction scripts, see scripts/extract-metadata.py.
1---2name: btr-curate3description: Add context to LOCAL BTR tree (NOT ByteRover/brv). Use `btr` CLI or `mcp__btr__*` MCP tools. Add or update context in the BTR tree with AI-powered metadata extraction. Use when the user wants to "add to context tree", "store this in BTR", "curate to BTR", or needs to organize knowledge with intelligent tagging.4---5
6# BTR Curate
7
8## ⚠️ CRITICAL: BTR ≠ ByteRover
9
10**This skill uses `btr` (local context tree), NOT `brv` (ByteRover CLI).**
11
12| Command | Tool | Syntax |
13|---------|------|--------|
14| ✓ CORRECT | `btr` | `btr curate <domain> <topic> --content "..."` |
15| ✗ WRONG | `brv` | Different tool, different syntax, requires auth |
16
17**PREFER MCP tools when available:**
18- `mcp__btr__curate_context` - Structured, type-safe
19- `mcp__btr__query_context` - Validated search
20
21Only use Bash `btr` commands if MCP tools are unavailable.
22
23Add or update context with intelligent metadata extraction.
24
25## Preferred Method
26
271. **FIRST**: Use MCP tools if available
28 ```
29 mcp__btr__curate_context(domain="auth", topic="jwt-flow", content="...", tags=["security"])
30 ```
31
322. **FALLBACK**: Use `btr` CLI via Bash
33 ```bash
34 btr curate auth jwt-flow --content "..." --tags security
35 ```
36
373. **NEVER**: Use `brv` (different product entirely)
38
39## Quick Start
40
41```bash
42btr curate <domain> <topic> --content "<content>" [--tags tag1,tag2]
43```
44
45## Instructions
46
471. Analyze the content to curate
482. Suggest appropriate domain and topic
493. Auto-extract relevant tags from content
504. Generate a brief summary
515. Run the CLI command
526. Confirm successful curation
53
54## Auto-Tagging Guidelines
55
56Extract tags based on:
57- Technology names (react, typescript, postgresql)
58- Patterns (singleton, middleware, decorator)
59- Concepts (authentication, caching, validation)
60- Categories (security, performance, best-practice)
61
62## Interactive Mode
63
64For complex content, use interactive mode:
65```bash
66btr curate --interactive
67```
68
69This walks through domain selection, topic naming, and tag extraction step by step.
70
71## Domain Selection Guide
72
73| Content Type | Suggested Domain |
74|--------------|-----------------|
75| Login, tokens, sessions | `auth` |
76| REST endpoints, GraphQL | `api` |
77| SQL, ORM, migrations | `database` |
78| Components, hooks, CSS | `frontend` |
79| Unit tests, integration tests | `testing` |
80| CI/CD, containers, monitoring | `devops` |
81| Design decisions, patterns | `architecture` |
82| Security rules, validation | `security` |
83| Performance tuning | `performance` |
84
85## Topic Naming Conventions
86
87Use kebab-case with descriptive names:
88
89**Good:**
90- `jwt-refresh-token-flow`
91- `postgres-connection-pool-config`
92- `react-form-validation-hook`
93
94**Avoid:**
95- `jwt` (too generic)
96- `myStuff` (not descriptive)
97- `temp_notes` (not permanent-sounding)
98
99## Updating Existing Context
100
101To update an existing topic:
102
103```bash
104btr curate auth jwt-validation --content "..." --update
105```
106
107The `--update` flag merges new content with existing content.
108
109## Content Guidelines
110
111When curating content, include:
112
1131. **The What**: Actual code or configuration
1142. **The Why**: Reason for this approach
1153. **The When**: When to use this pattern
1164. **Usage Examples**: How to apply it
1175. **Caveats**: Any gotchas or limitations
118
119## Example Curation Flow
120
121User provides a code snippet for database connection pooling.
122
1231. **Analyze content**: PostgreSQL connection pool configuration
1242. **Suggest domain**: `database`
1253. **Suggest topic**: `postgres-connection-pooling`
1264. **Extract tags**: `postgresql`, `connection-pool`, `performance`, `configuration`
1275. **Execute**:
128 ```bash
129 btr curate database postgres-connection-pooling \
130 --content "..." \
131 --tags postgresql,connection-pool,performance,configuration
132 ```
1336. **Confirm**: "Curated to database/postgres-connection-pooling with 4 tags"
134
135For metadata extraction scripts, see [scripts/extract-metadata.py](scripts/extract-metadata.py).