Loading...
Loading...
This skill should be used when the user asks to "search secondbrain", "find in knowledge base", "look up documentation", "search notes/ADRs/tasks", "find related content", "semantic search", or mentions wanting to find specific content across their secondbrain using natural language.
npx skill4agent add sergio-bershadsky/ai secondbrain-searchwhich qmdbun install -g qmdnpm install -g qmd.claude/search//secondbrain-search-init/secondbrain-search "your natural language query"
/secondbrain-search --entity=adrs "database migration"
/secondbrain-search --recent=30d "authentication"
/secondbrain-search --status=active --tag=kubernetes "deployment"# Check qmd is installed
which qmd
# Check search is initialized
ls .claude/search/qmd is not installed. Install it with:
bun install -g qmd
# or
npm install -g qmd
Then initialize search with: /secondbrain-search-initSearch not initialized for this project.
Run: /secondbrain-search-init| Filter | Syntax | Example |
|---|---|---|
| Entity | | |
| Recent | | |
| Date from | | |
| Date to | | |
| Status | | |
| Tag | | |
| Limit | | |
| Format | | |
cd <project_root>
qmd query "<user_query>" --json --limit=<limit>{
"results": [
{
"id": "docs/adrs/ADR-0012-kubernetes-deployment.md",
"score": 0.92,
"title": "Kubernetes Deployment Strategy",
"excerpt": "We decided to use Blue-Green deployment for stateless services...",
"metadata": {
"frontmatter": {
"status": "implemented",
"created": "2025-12-15"
}
}
}
]
}docs/adrs/.claude/data/<entity>/records.yaml# Pseudocode
for result in results:
if entity_filter and result.entity not in entity_filter:
skip
if status_filter and result.status != status_filter:
skip
if tag_filter and tag_filter not in result.tags:
skip
if date_filter and not in_date_range(result.date, from_date, to_date):
skip## Search Results
**Query:** "kubernetes deployment"
**Results:** 4 matches
1. **[ADR-0012] Kubernetes Deployment Strategy** (0.92)
Status: implemented | Updated: 2025-12-15
2. **[Note] Kubernetes Scaling Best Practices** (0.87)
Tags: kubernetes, scaling | Created: 2025-11-20
3. **[Discussion] Platform Team - Deployment Pipeline** (0.79)
Date: 2025-10-05 | Participants: Alice, Bob
4. **[Task] Implement Canary Deployments** (0.71)
Status: in_progress | Priority: high## Search Results
**Query:** "kubernetes deployment"
**Results:** 2 matches
---
### 1. [ADR-0012] Kubernetes Deployment Strategy
**Score:** 0.92 | **Status:** implemented | **Category:** infrastructure
**File:** [ADR-0012-kubernetes-deployment.md](docs/adrs/ADR-0012-kubernetes-deployment.md)
**Excerpt:**
> We decided to use Blue-Green deployment for stateless services
> and Rolling updates for stateful workloads. This approach provides
> zero-downtime deployments while minimizing resource overhead...
**Metadata:**
- Created: 2025-12-15
- Author: sergey
- Category: infrastructure
---
### 2. [Note] Kubernetes Scaling Best Practices
**Score:** 0.87 | **Tags:** kubernetes, scaling
**File:** [2025-11-20-kubernetes-scaling.md](docs/notes/2025-11-20-kubernetes-scaling.md)
**Excerpt:**
> Key considerations for scaling Kubernetes deployments:
> 1. Horizontal Pod Autoscaler configuration
> 2. Resource requests and limits
> 3. Pod disruption budgets...
**Metadata:**
- Created: 2025-11-20
- Status: active{
"query": "kubernetes deployment",
"total": 4,
"results": [
{
"entity": "adrs",
"id": "ADR-0012",
"title": "Kubernetes Deployment Strategy",
"file": "docs/adrs/ADR-0012-kubernetes-deployment.md",
"score": 0.92,
"excerpt": "We decided to use Blue-Green deployment...",
"metadata": {
"status": "implemented",
"category": "infrastructure",
"created": "2025-12-15",
"author": "sergey"
}
}
]
}## No Results Found
**Query:** "foobar nonexistent"
### Tips
1. **Try broader terms** — Use general concepts instead of specific jargon
2. **Check spelling** — Semantic search handles typos but exact terms may miss
3. **Remove filters** — Try without --entity or --status filters first
4. **Use related concepts** — "authentication" instead of "OAuth2"
### Alternative Actions
- `/secondbrain-freshness` — See all recent content
- Run without filters: `/secondbrain-search "foobar"`### Refine Search
- `--entity=adrs` — Filter to ADRs only
- `--recent=30d` — Limit to last 30 days
- `--status=active` — Exclude archived items
- `"kubernetes AND deployment"` — Boolean operators