/secondbrain:secondbrain-searchfrom secondbrain
Searches your secondbrain knowledge base using semantic similarity and full-text search with filters for entity, date range, status, and tags.
Ships in secondbrain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Search your secondbrain knowledge base using semantic similarity (meaning-based) and full-text search.
qmd installed: Check with which qmd
bun install -g qmd or npm install -g qmdSearch initialized: Check for .claude/search/ directory
/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/
If qmd not installed:
qmd is not installed. Install it with:
bun install -g qmd
# or
npm install -g qmd
Then initialize search with: /secondbrain-search-init
If search not initialized:
Search not initialized for this project.
Run: /secondbrain-search-init
Extract from user input:
| Filter | Syntax | Example |
|---|---|---|
| Entity | --entity=<type> | --entity=adrs,notes |
| Recent | --recent=<period> | --recent=7d, --recent=2w, --recent=1m |
| Date from | --from=<date> | --from=2025-01-01 |
| Date to | --to=<date> | --to=2025-12-31 |
| Status | --status=<status> | --status=active, --status=!archived |
| Tag | --tag=<tag> | --tag=kubernetes |
| Limit | --limit=<n> | --limit=10 (default: 5) |
| Format | --format=<fmt> | --format=brief, --format=detailed, --format=json |
Run qmd search command:
cd <project_root>
qmd query "<user_query>" --json --limit=<limit>
Parse JSON output:
{
"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"
}
}
}
]
}
Load YAML records to add entity-specific metadata:
For each result:
docs/adrs/ → ADRs).claude/data/<entity>/records.yamlFilter results based on user criteria:
# 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"
}
}
]
}
Display helpful tips when no results found:
## 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"`
After showing results, offer refinement options:
### 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
What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/secondbrain-adrThis skill should be used when the user asks to "create ADR", "document decision",
"architecture decision", "add decision record", or mentions needing to record a
technical decision with status tracking and category organization.
/secondbrain-discussionThis skill should be used when the user asks to "document discussion", "save meeting notes",
"record conversation", "capture meeting", or mentions needing to document team discussions
with participants, decisions, and action items.
/secondbrain-entityThis skill should be used when the user asks to "add entity", "create custom entity",
"new entity type", "define entity", or mentions wanting to add a new trackable data type
to their secondbrain project beyond the predefined ADR, Note, Task, and Discussion types.
/secondbrain-freshnessThis skill should be used when the user asks for "freshness check", "freshness report",
"what needs attention", "stale items", "review backlog", or mentions wanting to see
what secondbrain content needs review or updating.
/secondbrain-initThis skill should be used when the user asks to "create a secondbrain", "scaffold knowledge base",
"init documentation portal", "set up second brain", "create TDA project", or mentions wanting to
build a personal knowledge management system with VitePress and microdatabases.
/secondbrain-noteThis skill should be used when the user asks to "create note", "capture thought",
"save this", "document idea", "write note", "jot down", "quick note", "remember this",
"capture this", or mentions wanting to save knowledge, ideas, or learnings for later
reference in their secondbrain.
npx claudepluginhub sergio-bershadsky/ai --plugin secondbrainOther plugins' skills for the same job