← 返回 Skills 市场
858
总下载
2
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install cassandra
功能描述
Design Cassandra tables, write efficient queries, and avoid distributed database pitfalls.
使用说明 (SKILL.md)
Data Modeling Mistakes
- Design tables around queries, not entities—denormalization is mandatory, not optional
- One table per query pattern—Cassandra has no JOINs; duplicate data across tables
- Partition key determines data distribution—all rows with same partition key on same node
- Wide partitions kill performance—keep under 100MB; add time bucket to partition key if growing
Primary Key Traps
PRIMARY KEY (a, b, c):ais partition key,bandcare clustering columnsPRIMARY KEY ((a, b), c):(a, b)together is partition key—compound partition key- Clustering columns define sort order within partition—query must respect this order
- Can't query by clustering column without partition key—unlike SQL indexes
Query Restrictions
WHEREmust include full partition key—partial partition key fails unlessALLOW FILTERINGALLOW FILTERINGscans all nodes—never use in production; redesign table instead- Range queries only on last clustering column used—
WHERE a = ? AND b > ?works,WHERE a = ? AND c > ?doesn't INon partition key hits multiple nodes—expensive; prefer single partition queries
Consistency Levels
QUORUMfor most operations—majority of replicas; balances consistency and availabilityLOCAL_QUORUMfor multi-datacenter—avoids cross-DC latencyONEfor pure availability—may read stale data; fine for caches, bad for critical reads- Write + read consistency must overlap for strong consistency—
QUORUM+QUORUMsafe
Tombstones (Silent Performance Killer)
- DELETE creates a tombstone, not actual deletion—tombstones persist until compaction
- Mass deletes destroy read performance—thousands of tombstones scanned per query
- TTL also creates tombstones—don't use short TTLs with high write volume
- Check with
nodetool cfstats -H table—Tombstonecolumns show problem
Batch Misuse
- UNLOGGED BATCH is not faster—use only for atomic writes to same partition
- LOGGED BATCH for multi-partition atomicity—adds coordination overhead
- Don't batch unrelated writes—hurts coordinator; send individual async writes
- Batch size limit ~50KB—larger batches fail or timeout
Anti-Patterns
- Secondary indexes on high-cardinality columns—scatter-gather query, slow
- Secondary indexes on frequently updated columns—creates tombstones
SELECT *—always list columns; schema changes break queries- UUID as partition key without time component—random distribution, hot spots during bulk loads
Lightweight Transactions
IF NOT EXISTS/IF column = ?—uses Paxos, 4x slower than normal write- Serial consistency for LWTs—
SERIALorLOCAL_SERIAL - Don't use for counters or high-frequency updates—contention kills throughput
- Returns
[applied]boolean—must check if operation succeeded
Collections and Counters
- Sets/Lists/Maps stored with row—can't exceed 64KB, no pagination
- List prepend is anti-pattern—creates tombstones; use append or Set
- Counters require dedicated table—can't mix with regular columns
- Counter increment is not idempotent—retry may double-count
Compaction Strategies
SizeTieredCompactionStrategy(default)—good for write-heavy, uses more disk spaceLeveledCompactionStrategy—better read latency, higher write amplificationTimeWindowCompactionStrategy—for time-series with TTL; reduces tombstone overhead- Wrong strategy for workload = degraded performance over time
Operations
nodetool repairregularly—inconsistencies accumulate without repairnodetool statusshows cluster health—UN (Up Normal) is good, DN is down- Schema changes propagate eventually—wait for
nodetool describeclusterto show agreement - Rolling restarts: one node at a time, wait for UN status before next
安全使用建议
This is an instruction-only skill that provides Cassandra best-practices and references cqlsh/nodetool. It does not request credentials or install code, so its footprint is small and coherent. Things to consider before enabling: 1) If you allow the agent to run commands, cqlsh/nodetool can perform operational actions (e.g., repairs) against your cluster — ensure the agent's runtime environment and network access are limited to the intended test/production clusters. 2) Confirm those binaries on PATH are the versions you expect (to avoid surprising behavior). 3) The skill itself doesn't require credentials, but if you or the agent supply cluster credentials later, those grant real access; only provide them to trusted agents. Overall low risk, but operational commands can have real impact if executed against live clusters.
功能分析
Type: OpenClaw Skill
Name: cassandra
Version: 1.0.0
The skill bundle is benign. The `_meta.json` file contains standard metadata. The `SKILL.md` file provides educational content and best practices for Cassandra, including mentions of legitimate Cassandra tools like `cqlsh` and `nodetool` within the context of operations. There is no evidence of prompt injection, malicious execution, data exfiltration, or any other harmful intent in either the code or the instructions.
能力评估
Purpose & Capability
Name/description (Cassandra table design, queries, ops) match the declared requirements (optionally use cqlsh and nodetool). No unrelated binaries, env vars, or config paths are required.
Instruction Scope
SKILL.md content is focused on Cassandra modeling, query restrictions, consistency, tombstones, compaction, and nodetool usage. It does not instruct the agent to read unrelated files, exfiltrate data, or call external endpoints beyond typical operator commands (cqlsh/nodetool).
Install Mechanism
No install spec — instruction-only. Nothing will be downloaded or written to disk by the skill itself.
Credentials
No environment variables or credentials are requested. The declared optional binaries (cqlsh, nodetool) are appropriate for the stated functionality.
Persistence & Privilege
always is false and the skill does not request persistent system presence or modification of other skills. Default autonomous invocation is allowed (platform normal) but is not combined with extra privileges here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cassandra - 安装完成后,直接呼叫该 Skill 的名称或使用
/cassandra触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
常见问题
Cassandra 是什么?
Design Cassandra tables, write efficient queries, and avoid distributed database pitfalls. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 858 次。
如何安装 Cassandra?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cassandra」即可一键安装,无需额外配置。
Cassandra 是免费的吗?
是的,Cassandra 完全免费(开源免费),可自由下载、安装和使用。
Cassandra 支持哪些平台?
Cassandra 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 Cassandra?
由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.0。
推荐 Skills