BTR Capture
⚠️ 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.
Capture and store valuable context for future retrieval.
PROACTIVE BEHAVIOR (CRITICAL)
DO NOT wait for the user to say "save this" - you should proactively suggest saving valuable context.
Trigger Conditions
After ANY of these events, ASK the user if they want to save the context:
- User confirms code works - "That works!", "Perfect!", "It's working now"
- Bug was fixed - Successfully resolved an issue after debugging
- Architecture decision made - Discussed and decided on a design approach
- New pattern established - Created a reusable pattern, utility, or component
- Complex problem solved - Figured out a non-obvious solution
- Configuration established - Set up tooling, environment, or integration
Example Flow
User: "That fixed the authentication issue, thanks!"
Claude: "Great! The JWT refresh token rotation pattern we implemented
could be valuable for future auth work. Save to BTR?
I'd capture:
- Domain: auth
- Topic: jwt-refresh-rotation
- Key details: The rotation logic, error handling, and token invalidation"
Proactive Check-In
Every 10-15 messages during active development, consider:
- Have we established patterns worth preserving?
- Did we make decisions that should be documented?
- Is there context that would help future sessions?
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
- Identify the content to capture (code, explanation, pattern)
- Determine appropriate domain (e.g., auth, api, database, frontend, testing)
- Generate a descriptive topic name (kebab-case, e.g., jwt-validation, error-handling)
- Extract or ask for relevant tags
- Run the CLI command to save the context
- Confirm successful capture to user
Domain Suggestions
auth - Authentication, authorization, sessions
api - REST endpoints, GraphQL, rate limiting
database - Queries, migrations, connection pooling
frontend - Components, state management, styling
testing - Test patterns, mocking, fixtures
devops - Deployment, CI/CD, monitoring
architecture - Design decisions, patterns
Examples
Save a code pattern
User: "Save this JWT validation pattern"
btr curate auth jwt-validation --content "..." --tags security,tokens,middleware
Save a design decision
User: "Remember why we chose Redis for caching"
btr curate architecture caching-decision --content "..." --tags redis,decisions,performance
For more examples, see examples.md.
1---2name: btr-capture3description: Save to LOCAL BTR context tree (NOT ByteRover/brv). Capture code snippets, patterns, and context from the current conversation and store them in the BTR context tree. PROACTIVE TRIGGER: Automatically suggest saving when the user confirms something works ("That works!", "Perfect!", "It's working now", "Thanks, that fixed it!"), after fixing a bug, making an architecture decision, establishing a pattern, or solving a complex problem. Also use when the user explicitly says "save this", "remember this pattern", "capture this context", "save to BTR", "save this to BTR", or "add to BTR".4---5
6# BTR Capture
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
23Capture and store valuable context for future retrieval.
24
25## PROACTIVE BEHAVIOR (CRITICAL)
26
27**DO NOT wait for the user to say "save this"** - you should proactively suggest saving valuable context.
28
29### Trigger Conditions
30
31After ANY of these events, ASK the user if they want to save the context:
32
331. **User confirms code works** - "That works!", "Perfect!", "It's working now"
342. **Bug was fixed** - Successfully resolved an issue after debugging
353. **Architecture decision made** - Discussed and decided on a design approach
364. **New pattern established** - Created a reusable pattern, utility, or component
375. **Complex problem solved** - Figured out a non-obvious solution
386. **Configuration established** - Set up tooling, environment, or integration
39
40### Example Flow
41
42```
43User: "That fixed the authentication issue, thanks!"
44
45Claude: "Great! The JWT refresh token rotation pattern we implemented
46could be valuable for future auth work. Save to BTR?
47
48I'd capture:
49- Domain: auth
50- Topic: jwt-refresh-rotation
51- Key details: The rotation logic, error handling, and token invalidation"
52```
53
54### Proactive Check-In
55
56Every 10-15 messages during active development, consider:
57- Have we established patterns worth preserving?
58- Did we make decisions that should be documented?
59- Is there context that would help future sessions?
60
61## Preferred Method
62
631. **FIRST**: Use MCP tools if available
64 ```
65 mcp__btr__curate_context(domain="auth", topic="jwt-flow", content="...", tags=["security"])
66 ```
67
682. **FALLBACK**: Use `btr` CLI via Bash
69 ```bash
70 btr curate auth jwt-flow --content "..." --tags security
71 ```
72
733. **NEVER**: Use `brv` (different product entirely)
74
75## Quick Start
76
77```bash
78btr curate <domain> <topic> --content "<content>" [--tags tag1,tag2]
79```
80
81## Instructions
82
831. Identify the content to capture (code, explanation, pattern)
842. Determine appropriate domain (e.g., auth, api, database, frontend, testing)
853. Generate a descriptive topic name (kebab-case, e.g., jwt-validation, error-handling)
864. Extract or ask for relevant tags
875. Run the CLI command to save the context
886. Confirm successful capture to user
89
90## Domain Suggestions
91
92- `auth` - Authentication, authorization, sessions
93- `api` - REST endpoints, GraphQL, rate limiting
94- `database` - Queries, migrations, connection pooling
95- `frontend` - Components, state management, styling
96- `testing` - Test patterns, mocking, fixtures
97- `devops` - Deployment, CI/CD, monitoring
98- `architecture` - Design decisions, patterns
99
100## Examples
101
102### Save a code pattern
103User: "Save this JWT validation pattern"
104```bash
105btr curate auth jwt-validation --content "..." --tags security,tokens,middleware
106```
107
108### Save a design decision
109User: "Remember why we chose Redis for caching"
110```bash
111btr curate architecture caching-decision --content "..." --tags redis,decisions,performance
112```
113
114For more examples, see [examples.md](examples.md).