소스 정보
- 저장소
- BEKO2210/Firstbrain
- 최근 소스 활동
- 2026년 5월 17일 12:40
- 감지된 SKILL.md 언어
- 영어
- 스타
- 15
- 포크
- 2
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/BEKO2210/Firstbrain --skill search명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | search |
| trigger | /search |
| description | Search vault notes by meaning using semantic similarity or keyword matching |
| version | 3.0.0 |
| type | skill |
| tags | ["skill","agent","discovery","search","semantic"] |
Finds vault notes by meaning, not just keywords. Uses vector embeddings (Transformers.js + all-MiniLM-L6-v2) for semantic similarity search. Falls back to keyword search when embeddings are not available.
Supports both dedicated /search skill for explicit queries and implicit semantic search in conversation when relevant.
/search "productivity systems"
Find notes about productivity even if the exact term is not used.
/search docker container orchestration
Multi-word concept search across all vault notes.
Natural language in conversation:
"Find notes related to time management"
Claude uses /search internally to locate relevant notes.
npm install # Installs @huggingface/transformers (~23MB model downloaded on first use)
/scan # Generates embeddings for all vault notes
If npm install has not been run, /search falls back to keyword-based search using tag-index and note titles. Semantic search is available only after the embedding library is installed.
Results show: note title + relevant excerpt showing why it matched + relevance indicator (high/medium/low). Adaptive result count based on relevance threshold (not fixed N) -- could be 3 or 8 depending on match quality.
formatSearchResults reads note files for top results and uses extractExcerpt to pull a query-relevant passage.
Example output:
## Search: "productivity systems"
Found 4 results:
1. **[[Book -- Getting Things Done]]** (high confidence)
> ...a productivity methodology that organizes tasks into actionable next steps...
Type: resource | Relevance: 0.82
2. **[[Zettel -- Personal Workflow]]** (medium confidence)
> ...my daily system for managing tasks and priorities...
Type: zettel | Relevance: 0.56
_Searched via semantic similarity_
Steps Claude follows when executing /search:
Ensure fresh indexes: Call ensureFreshIndexes('.') to auto-scan if scan-state is stale (>5 min).
Check embedding availability: Call isEmbeddingAvailable().
If embeddings available (semantic mode):
a. Generate query embedding via generateEmbedding(query)
b. Open db and retrieve all embeddings via openDb(vaultRoot) then getAllEmbeddings(db)
c. Run semanticSearch(queryEmbedding, allEmbeddings) -- uses 0.3 similarity threshold, up to 20 results
d. Format results with excerpts via formatSearchResults(results, query, '.') -- reads note files for top results, extracts body text, generates query-relevant excerpts automatically
If embeddings unavailable (keyword fallback):
a. Load vault-index.json and tag-index.json from .claude/indexes/
b. Run keywordSearch(query, vaultIndex, tagIndex) -- matches tags (+2) and titles (+1)
c. Format results with excerpts via formatSearchResults(results, query, '.') -- excerpt extraction works the same way for keyword results
d. Append note: "Tip: Install @huggingface/transformers for semantic search (finds notes by meaning, not just keywords)"
Present results to user.
If user wants to navigate to a result, open the note.
When a user asks about vault content during conversation and existing index lookups yield poor results, Claude may use semantic search internally to find relevant notes. Start conservative -- do not trigger embedding search on every conversation turn. Use it when keyword/tag searches are insufficient.
const { ensureFreshIndexes, semanticSearch, keywordSearch, formatSearchResults } = require('./.agents/skills/search/search-utils.cjs');
const { generateEmbedding, isEmbeddingAvailable, openDb, getAllEmbeddings } = require('./.agents/skills/search/embedder.cjs');
const { loadJson } = require('./.agents/skills/scan/utils.cjs');
const path = require('path');
async function search(query, vaultRoot) {
// Ensure indexes are fresh
ensureFreshIndexes(vaultRoot);
const available = await isEmbeddingAvailable();
if (available) {
// Semantic search path
const queryEmbedding = await generateEmbedding(query, vaultRoot);
const db = openDb(vaultRoot);
const allEmbeddings = getAllEmbeddings(db);
db.close();
const results = semanticSearch(queryEmbedding, allEmbeddings);
return formatSearchResults(results, query, vaultRoot);
} else {
// Keyword fallback path
const indexDir = path.join(vaultRoot, '.claude', 'indexes');
const vaultIndex = loadJson(path.(indexDir, ));
tagIndex = (path.(indexDir, ));
results = (query, vaultIndex, tagIndex);
output = (results, query, vaultRoot);
output += ;
output;
}
}
.claude/embeddings.db (SQLite database, WAL mode for concurrent reads).claude/.models/ after first download (~23MB)/scan (Plan 04-03 integrates this)/memory to check embedding index status (total embeddings, latest update)00 - Inbox/, 01 - Projects/, 02 - Areas/, 03 - Resources/, 04 - Archive/05 - Templates/)06 - Atlas/)Home.md, START HERE.md, Workflow Guide.md, Tag Conventions.mdisTemplate: true/scan, search results may not reflect recent changes. The ensureFreshIndexes function auto-scans if indexes are >5 minutes old.embedder.cjs -- SQLite operations, embedding generation, text extractionsearch-utils.cjs -- Cosine similarity, search algorithms, result formatting../scan/scanner.cjs -- Vault scanning for fresh indexes../scan/utils.cjs -- loadJson for reading index files@huggingface/transformers -- Local embedding generation (optional; keyword fallback if not installed)