跳到正文
cccskills
免费在 GitHub 公开

chromadb

Manage the ChromaDB vector database that stores the ecosystem's persistent memory. Use when user asks to check memory storage, backup memory, search stored entries, delete entries, or reset the vector database. Do NOT use for general question answering about past sessions (use the memory skill for that).

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md8.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

chromadb · Memory Storage

ChromaDB is the vector database that powers Shokunin's persistent AI memory. It stores embeddings for semantic search across sessions. Built on SQLite with an ONNX embedding model for local-first, offline-capable operation.

Workflow

Step 1: Check storage status

python ~/.shokunin/scripts/chroma-helper.py count

Output: total entries, collection count, disk size on disk, last write timestamp.

python ~/.shokunin/scripts/chroma-helper.py stats

Output: entries per type (decision, file, command, checkpoint, session_end), per project, per date range.

Step 2: Search stored entries

python ~/.shokunin/scripts/chroma-helper.py search "query text" "project-name" 10

Searches via vector similarity + BM25 keyword hybrid. Results sorted by relevance with metadata attached.

python ~/.shokunin/scripts/chroma-helper.py search "error handling" "" 20 --type decision

Filter by entry type. Leave project empty to search all projects.

Step 3: List recent entries

python ~/.shokunin/scripts/chroma-helper.py recent 10

Shows the 10 most recently inserted entries across all projects. Use for quick audit.

python ~/.shokunin/scripts/chroma-helper.py recent 50 --project myproject

Filter recent entries to a specific project.

Step 4: Backup the database

$backupDir = "$env:USERPROFILE\.shokunin\backups\chroma-$(Get-Date -Format 'yyyyMMdd-HHmmss')"
New-Item -ItemType Directory -Path $backupDir -Force | Out-Null
Compress-Archive -Path "$env:USERPROFILE\.shokunin\memory\chroma_db" -DestinationPath "$backupDir\chroma_db.zip" -Force

Also back up session logs:

Compress-Archive -Path "$env:USERPROFILE\.shokunin\memory\sessions" -DestinationPath "$backupDir\sessions.zip" -Force

Verify backup integrity:

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::OpenRead("$backupDir\chroma_db.zip").Entries.Count

Step 5: Delete entries by session prefix

python ~/.shokunin/scripts/chroma-helper.py delete "session-prefix"

Deletes all entries whose session_id starts with the given prefix. Non-reversible. Backup first.

python ~/.shokunin/scripts/chroma-helper.py delete --project "old-project"

Delete all entries for a project. Useful when archiving finished projects.

Step 6: Full reset (requires confirmation)

Remove-Item -Recurse -Force "$env:USERPROFILE\.shokunin\memory\chroma_db"
# Restart MCP server to recreate the database

The database is auto-created on next MCP server startup. All sessions, embeddings, and metadata are permanently lost. Only do this when migrating or recovering from corruption.

Storage Details

LocationPurpose
~/.shokunin/memory/chroma_db/ChromaDB persistent files (SQLite + embeddings)
~/.shokunin/memory/sessions/Per-session JSONL logs and Markdown summaries
~/.shokunin/memory/mcp-server.logMCP server log file (auto-rotated at 5MB)
~/.shokunin/backups/Timestamped backup archives
~/.shokunin/scripts/chroma-helper.pyCLI management script

Data Model

ConceptDescription
CollectionChromaDB namespace for embeddings (one per project by default)
EmbeddingVector representation of text for semantic similarity search
MetadataKey-value pairs attached to each entry (type, tags, project, session_id, timestamp)
DocumentThe raw text content stored alongside the embedding
BM25 IndexSparse retrieval index that complements vector search (keyword matching)
Result FusionMerges vector + BM25 results for higher recall (reciprocal rank fusion)
Entry Typesdecision, file, command, preference, checkpoint, session_end, general

Session Management

CommandDescription
python ~/.shokunin/scripts/chroma-helper.py session list [N]List recent sessions with metadata
python ~/.shokunin/scripts/chroma-helper.py session continue <id>Load full session context
python ~/.shokunin/scripts/chroma-helper.py session summary <id>Show session summary
python ~/.shokunin/scripts/chroma-helper.py save "<text>" "<id>" "<type>" "<tags>" "<project>"Save entry

Error Handling

ErrorCauseFix
ChromaDB not foundPackage not installedpip install chromadb
Collection emptyNo data stored yetNormal on first use. Start storing context.
Slow first queryDownloading ONNX modelFirst query downloads ~79MB. Subsequent queries are instant.
Permission deniedFile locked by another processClose other MCP server instances
Corrupted databaseUnexpected shutdown or disk fullRestore from backup or delete and let the system reinitialize
Memory usage highLarge collection over timeRun consolidate_memories to merge old entries
Embedding dimension mismatchModel was upgraded or changedDelete chroma_db/ and reindex from session logs
UUID collisionRace condition in parallel writesChromaDB handles this internally; retry the insert
SQLite disk I/O errorFilesystem full or read-onlyFree disk space (need ~2x DB size); check permissions

Anti-Patterns

PatternProblemFix
Deleting chroma_db/ without backupPermanent data lossAlways backup first (Step 4)
Running multiple MCP serversDatabase locked, data corruptionOnly one MCP server instance at a time
Manual SQL manipulationBreaks ChromaDB invariantsUse chroma-helper.py CLI or MCP tools only
Ignoring session_list filtersSeeing test/healthcheck entriessession_list automatically filters noise
Storing extremely large textBloating vector indexChromaDB truncates at 500 chars
Never consolidatingDatabase grows indefinitelyRun consolidate_memories periodically
Skipping backupsNo recovery from disk failureWeekly backup is configured via Task Scheduler
Using raw SQLite instead of ChromaDB APISchema and index corruptionAlways go through ChromaDB's Python client
Searching without project filter for broad queriesToo many irrelevant resultsAlways filter by project when context is known

Automation

Weekly backup every Sunday via Windows Task Scheduler (pre-configured). Manual backup via Step 4 above. Logs auto-rotate at 5MB to prevent unbounded growth. The consolidate_memories function runs automatically when entry count exceeds 10,000 per project.

Recovery Procedures

Restore from backup

$backup = Get-ChildItem "$env:USERPROFILE\.shokunin\backups" -Directory | Sort-Object LastWriteTime -Descending | Select-Object -First 1
Expand-Archive -Path "$backup\chroma_db.zip" -DestinationPath "$env:USERPROFILE\.shokunin\memory\chroma_db" -Force

Rebuild from session logs

If backups are unavailable, session JSONL logs contain all raw text. Replay them:

python ~/.shokunin/scripts/chroma-helper.py rebuild --from-sessions

Verify database health

python ~/.shokunin/scripts/chroma-helper.py verify

Checks: SQLite integrity, embedding count vs document count, orphan metadata, collection schema version.

Checklist

  • ChromaDB client initialized lazily (not at import time)
  • Collection name sanitized (alphanumeric + hyphens only)
  • Embedding dimension matches between writes and queries
  • Backups configured before destructive operations (delete/reset)
  • Search results validated — empty results handled gracefully

Sources

  • ChromaDB documentation (docs.trychroma.com)
  • OpenAI text-embedding-ada-002 (or local ONNX embedder)
  • SQLite documentation (sqlite.org)
  • DuckDB (ChromaDB's internal query engine)
  • MCP Protocol (modelcontextprotocol.io)
  • Shokunin Memory System Architecture (ARCHITECTURE.md)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Apply professional, premium UI/UX design standards when building or styling web interfaces. Use this skill when the user asks to create a website, landing page, web app, dashboard, UI component, or any visual interface — or when they ask to make something look better, more professional, or more beautiful. Covers visual hierarchy, typography, color systems, layout, spacing, motion, dark mode, responsive design, and conversion patterns. Activate even when the user doesn't say "design" — if they're building a web frontend, these standards apply.

中文简介正在准备中。当前显示原文说明。

EliasOulkadi/shokunin1122026年10月5日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

中文简介正在准备中。当前显示原文说明。

EliasOulkadi/shokunin1122026年10月5日 更新

Run 150+ AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

中文简介正在准备中。当前显示原文说明。

EliasOulkadi/shokunin1122026年10月5日 更新

api-forge

免费

Design REST/GraphQL APIs with OpenAPI 3.1, error handling, pagination, rate limiting, webhooks, and idempotency. Use when user asks to design an API, create endpoints, define REST/GraphQL schema, or generate OpenAPI spec. Do NOT use for database schema design, frontend API integration, or non-HTTP protocols (gRPC, WebSocket, MQTT).

中文简介正在准备中。当前显示原文说明。

EliasOulkadi/shokunin1122026年10月5日 更新

Implement authentication and authorization with OWASP Top 10 standards, OAuth 2.0 + OIDC, WebAuthn/Passkeys, session management, and RBAC/ABAC. Use when user asks to implement login, signup, authentication, authorization, JWT, OAuth, SSO, passkeys, MFA, or role-based access. Do NOT use for API key management (use api-forge), encryption at rest, or network-level security (firewalls, WAF).

中文简介正在准备中。当前显示原文说明。

EliasOulkadi/shokunin1122026年10月5日 更新

Generate brand guidelines, design systems with design tokens (W3C format), creative direction (SCAMPER, Design Thinking, TRIZ), and design briefs with scope and success criteria.

中文简介正在准备中。当前显示原文说明。

EliasOulkadi/shokunin1122026年10月5日 更新

查看 EliasOulkadi 的全部技能

报告此技能的问题