Store and query structured data without planning schemas upfront. Use when you need to remember information, track entities across conversations, build knowledge bases, ingest API data, store user preferences, create CRM systems, or maintain any persistent state. Automatically evolves data structure as you discover new fields. No migrations, no schema design - just store data and query it.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install kameleondb或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install kameleondb⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/kameleondb/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: kameleondb version: 0.1.5 description: Store and query structured data without planning schemas upfront. Use when you need to remember information, track entities across conversations, build knowledge bases, ingest API data, store user preferences, create CRM systems, or maintain any persistent state. Automatically evolves data structure as you discover new fields. No migrations, no schema design - just store data and query it. metadata: {"openclaw":{"emoji":"🦎","requires":{"bins":["kameleondb"],"env":["KAMELEONDB_URL"]},"primaryEnv":"KAMELEONDB_URL","homepage":"https://github.com/marcosnataqs/kameleondb"}} ---
Use KameleonDB when you need to:
No Upfront Planning: Start storing data immediately. Don't know all fields yet? Add them later when you discover them.
Learn as You Go: Found a new field in your data? Just add it. Old records won't break.
Query Like a Database: Generate SQL queries to search, filter, join, and analyze your data.
Self-Optimizing: Get hints when queries slow down, with exact commands to speed them up.
Track Your Reasoning: Every schema change records why you made it, building an audit trail.
# Install
pip install kameleondb
# Set database location (SQLite - no server needed)
export KAMELEONDB_URL="sqlite:///./kameleondb.db"
# Initialize
kameleondb admin init
# Done! Start using it.
Note: For production, use PostgreSQL instead of SQLite. Set KAMELEONDB_URL="postgresql://user:pass@localhost/dbname" and run pip install kameleondb[postgresql].
To get the most out of KameleonDB as your persistent layer, consider noting your database location and preferred usage patterns in your memory files. This helps you leverage it consistently across sessions.
Example notes you might keep:
sqlite:///path/to/your-memory.dbschema list, data insert, data list, query run# Check what exists
kameleondb --json schema list
# Returns: {"entities": []}
# Create Contact tracking
kameleondb --json schema create Contact \
--field "name:string:required" \
--field "email:string:unique"
# Store someone you met
kameleondb --json data insert Contact '{"name":"Alice Johnson","email":"[email protected]"}'
# Later: found their LinkedIn!
kameleondb --json schema alter Contact --add "linkedin_url:string" \
--reason "Found LinkedIn profiles for contacts"
# Update Alice's record
kameleondb --json data update Contact <id> '{"linkedin_url":"https://linkedin.com/in/alice"}'
# Store facts you learn
kameleondb --json schema create Fact \
--field "content:string:required" \
--field "source:string" \
--field "confidence:float"
# Add facts
kameleondb --json data insert Fact '{"content":"Python 3.11 released Oct 2022","source":"python.org","confidence":1.0}'
# Search facts (get SQL context first)
kameleondb --json schema context --entity Fact
# Use context to generate: SELECT * FROM kdb_records WHERE data->>'content' LIKE '%Python%'
# Query
kameleondb --json query run "SELECT data->>'content', data->>'source' FROM kdb_records WHERE entity_id='...' LIMIT 10"
# Create task tracker
kameleondb --json schema create Task \
--field "title:string:required" \
--field "status:string" \
--field "priority:string"
# Add tasks
kameleondb --json data insert Task '{"title":"Research OpenClaw","status":"todo","priority":"high"}'
# Mark complete
kameleondb --json data update Task <id> '{"status":"done"}'
# Get all incomplete
kameleondb --json query run \
"SELECT data->>'title', data->>'priority' FROM kdb_records WHERE entity_id='...' AND data->>'status' != 'done'"
# Store API responses
kameleondb --json schema create GitHubRepo \
--field "name:string:required" \
--field "stars:int" \
--field "url:string"
# Batch import from JSONL
kameleondb --json data insert GitHubRepo --from-file repos.jsonl --batch
# Query top repos
kameleondb --json query run \
"SELECT data->>'name', (data->>'stars')::int as stars FROM kdb_records WHERE entity_id='...' ORDER BY stars DESC LIMIT 10"
Don't know all fields upfront? No problem. Add, drop, or rename them when you discover patterns:
# Add a new field
kameleondb --json schema alter Contact --add "twitter_handle:string" \
--reason "Found Twitter profiles for 30% of contacts"
# Drop obsolete fields
kameleondb --json schema alter Contact --drop "legacy_field" --force
# Do multiple operations at once
kameleondb --json schema alter Contact --add "linkedin:string" --drop "old_social" --reason "Consolidating social fields"
Old records won't break - they just show null for new fields, and dropped fields are soft-deleted.
Queries tell you when they're slow and how to fix it:
{
"rows": [...],
"suggestions": [{
"priority": "high",
"reason": "Query took 450ms with 5000 records",
"action": "kameleondb storage materialize Contact"
}]
}
Run that command and future queries will be faster.
Every schema change records why you made it:
kameleondb --json admin changelog
# See: who added what field, when, and why
Get schema context, generate SQL, execute it:
# Get schema to understand structure
kameleondb --json schema context --entity Contact
# Generate SQL based on structure
# Execute with built-in validation
kameleondb --json query run "SELECT ... FROM ..."
Add --json to any command for machine-readable output.
Schema: list, create, describe, alter, drop, info, context Data: insert, get, update, delete, list, link, unlink, get-linked, info Query: run Storage: status, materialize, dematerialize Admin: init, info, changelog
alter Command (Schema Evolution)Instead of separate add-field and drop-field commands, use the unified alter:
# Add a field
kameleondb --json schema alter Contact --add "phone:string:indexed"
# Drop a field
kameleondb --json schema alter Contact --drop legacy_field --force
# Rename a field
kameleondb --json schema alter Contact --rename "old_name:new_name"
# Multiple operations at once
kameleondb --json schema alter Contact --add "new:string" --drop old --reason "Cleanup"
link/unlink Commands (M2M Relationships)For many-to-many relationships:
# Link a product to tags
kameleondb --json data link Product abc123 tags tag-1
kameleondb --json data link Product abc123 tags -t tag-1 -t tag-2 -t tag-3
# Unlink
kameleondb --json data unlink Product abc123 tags tag-1
kameleondb --json data unlink Product abc123 tags --all
# Get linked records
kameleondb --json data get-linked Product abc123 tags
Run kameleondb --help or kameleondb for details.
...
安装 KameleonDB 后,可以对 AI 说这些话来触发它
Help me get started with KameleonDB
Explains what KameleonDB does, walks through the setup, and runs a quick demo based on your current project
Use KameleonDB to store and query structured data without planning schemas upfront
Invokes KameleonDB with the right parameters and returns the result directly in the conversation
What can I do with KameleonDB in my developer & devops workflow?
Lists the top use cases for KameleonDB, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/kameleondb/ 目录(个人级,所有项目可用),或 .claude/skills/kameleondb/(项目级)。重启 AI 客户端后,用 /kameleondb 主动调用,或让 AI 根据上下文自动发现并使用。
KameleonDB 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
KameleonDB 可免费安装使用。请查阅仓库了解许可证信息。
Store and query structured data without planning schemas upfront. Use when you need to remember information, track entities across conversations, build knowledge bases, ingest API data, store user preferences, create CRM systems, or maintain any persistent state. Automatically evolves data structure as you discover new fields. No migrations, no schema design - just store data and query it.
KameleonDB 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using KameleonDB
Identifies repetitive steps in your workflow and sets up KameleonDB to handle them automatically