ソース情報
- リポジトリ
- 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コマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
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)