소스 정보
- 저장소
- alsk1992/CloddsBot
- 최근 소스 활동
- 2026년 2월 10일 01:37
- 감지된 SKILL.md 언어
- 영어
- 스타
- 716
- 포크
- 155
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/alsk1992/CloddsBot --skill search-config명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | search-config |
| description | Search indexing configuration and full-text search management |
| emoji | 🔎 |
Configure search indexing, manage search backends, and optimize full-text search.
/search-config Show search config
/search-config status Index status
/search-config stats Search statistics
/search-config rebuild Rebuild all indexes
/search-config rebuild memories Rebuild specific index
/search-config optimize Optimize indexes
/search-config clear <index> Clear index
/search-config backend sqlite Set backend
/search-config backend elasticsearch Use Elasticsearch
/search-config mode hybrid Set search mode
/search-config boost semantic 0.7 Set semantic weight
import { createSearchService } from 'clodds/search';
const search = createSearchService({
// Backend
backend: 'sqlite', // 'sqlite' | 'elasticsearch' | 'typesense' | 'meilisearch'
// Search mode
mode: 'hybrid', // 'fulltext' | 'semantic' | 'hybrid'
// Hybrid weights
semanticWeight: 0.6,
fulltextWeight: 0.4,
// Embedding provider (for semantic)
embeddings: {
provider: 'openai',
model: 'text-embedding-3-small',
},
// Storage
dbPath: './search.db',
});
// Index single document
await search.index({
collection: 'memories',
id: 'mem-1',
content: 'User prefers conservative trading',
metadata: {
type: 'preference',
userId: 'user-123',
},
});
// Index batch
await search.indexBatch({
collection: 'documents',
documents: [
{ id: 'doc-1', content: 'First document', metadata: {} },
{ id: 'doc-2', content: 'Second document', metadata: {} },
],
});
// Full-text search
const results = await search.search({
query: 'trading strategies',
collection: 'documents',
limit: 10,
});
for (const result of results) {
console.log(`${result.id}: ${result.score}`);
console.log(` ${result.snippet}`);
}
// With filters
const results = await search.search({
query: 'bitcoin',
collection: 'news',
filters: {
date: { gte: '2024-01-01' },
source: 'reuters',
},
limit: 20,
});
// Combine full-text and semantic
const results = await search.hybridSearch({
query: 'how to manage risk in trading',
collection: 'documents',
semanticWeight: 0.7,
fulltextWeight: 0.3,
limit: 10,
});
const stats = await search.getStats();
console.log('Index Statistics:');
for (const [collection, info] of Object.entries(stats.collections)) {
console.log(`${collection}:`);
console.log(` Documents: ${info.documentCount}`);
console.log(` Size: ${info.sizeMB} MB`);
console.log(` Last indexed: ${info.lastIndexed}`);
}
console.log(`\nSearch Stats:`);
console.log(` Queries today: ${stats.queriesToday}`);
console.log(` Avg latency: ${stats.avgLatencyMs}ms`);
console.log(` Cache hit rate: ${stats.cacheHitRate}%`);
// Rebuild all indexes
await search.rebuildAll();
// Rebuild specific collection
await search.rebuild('memories');
// With progress callback
await search.rebuild('documents', {
onProgress: (progress) => {
console.log(`${progress.current}/${progress.total} (${progress.percent}%)`);
},
});
// Optimize for better performance
await search.optimize();
// Optimize specific collection
await search.optimize('documents');
// Clear specific collection
await search.clear('memories');
// Clear all
await search.clearAll();
// Switch to Elasticsearch
await search.setBackend('elasticsearch', {
url: process.env.ELASTICSEARCH_URL,
index: 'clodds',
});
// Switch to Typesense
await search.setBackend('typesense', {
url: process.env.TYPESENSE_URL,
apiKey: process.env.TYPESENSE_API_KEY,
});
| Backend | Best For | Features |
|---|---|---|
| SQLite | Development, small data | Simple, embedded |
| Elasticsearch | Production, large data | Scalable, powerful |
| Typesense | Fast search | Typo tolerance |
| Meilisearch | Instant search | Easy setup |
| Mode | Description |
|---|---|
fulltext | Traditional keyword matching |
semantic | Vector similarity search |
hybrid | Combined (best of both) |
// More emphasis on meaning
const results = await search.hybridSearch({
query: 'risk management',
semanticWeight: 0.8, // 80% semantic
fulltextWeight: 0.2, // 20% keyword
});
// More emphasis on exact matches
const results = await search.hybridSearch({
query: 'BTCUSDT',
semanticWeight: 0.2, // 20% semantic
fulltextWeight: 0.8, // 80% keyword
});