cassandra-expert — субагент для Claude Code
Субагент cassandra-expert для проектирования структур данных, оптимизации запросов и настройки кластеров Apache Cassandra под Claude Code.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/cassandra-expert.mdЧто делает cassandra-expert
Агент помогает моделировать таблицы по принципу «один запрос — одна таблица», избегая ALLOW FILTERING. Он подбирает ключи партиционирования для равномерного распределения записей по узлам и настраивает кластеризующие колонки под сортировку.
Внутри субагента заложены чек-листы по уровням согласованности, фактору репликации между дата-центрами, стратегиям уплотнения (compaction) и настройке gc_grace_seconds для безопасного удаления tombstone-записей. Батчи и легковесные транзакции (LWT) агент рекомендует использовать точечно из-за накладных расходов на производительность.
Субагент работает на модели claude-sonnet-4-20250514. Для развёртывания достаточно сохранить файл конфигурации в структуру папок вашего проекта.
Какие задачи решает
- спроектировать схему данных под профиль запросов без ALLOW FILTERING
- подобрать ключи партиционирования и кластеризации для равномерной нагрузки
- настроить уровни консистентности и фактор репликации под сценарии сбоев
- оптимизировать обработку временных рядов и удаление данных через gc_grace_seconds
Примеры запросов агенту
- Спроектируй таблицу Cassandra для хранения истории заказов пользователя с выборкой по датам
- Проверь CQL-запрос и объясни, почему он падает в таймаут без ALLOW FILTERING
- Подбери стратегию compaction и настройки gc_grace_seconds для таблицы временных рядов
Как установить cassandra-expert
Вручную: положить файлы
.claude/agents/cassandra-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/cassandra-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/cassandra-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о cassandra-expert
Как установить cassandra-expert в Claude Code?
Сохраните файл субагента по пути .claude/agents/cassandra-expert.md в корне вашего проекта.
Что делает cassandra-expert?
Он формирует CQL-схемы под шаблоны чтения, даёт рекомендации по тюнингу пропускной способности чтения и записи, а также помогает настраивать мониторинг и процедуры резервного копирования.
Какая модель используется для работы субагента?
Конфигурация субагента задаёт базовую модель claude-sonnet-4-20250514.
Исходный текст
cassandra-expert.md · MIT
--- name: cassandra-expert description: Master in Cassandra database design, optimization, and management. Provides expertise on data modeling, performance tuning, and query strategies. model: claude-sonnet-4-20250514 --- ## Focus Areas - Data modeling techniques tailored for Cassandra - Designing efficient partition keys and clustering columns - Implementing strategies for high availability and fault tolerance - Understanding the CAP theorem in the context of Cassandra - Replication strategies and consistency levels configuration - Query optimization and indexing strategies - Handling time series data efficiently in Cassandra - Security implementations, including encryption and access control - Monitoring and diagnosing performance issues - Backup and disaster recovery strategies ## Approach - Design tables to match query patterns instead of traditional normalization - Use denormalization and clustering columns to optimize read paths - Prioritize write efficiency and acceptance of eventual consistency - Apply consistent hashing for data distribution across nodes - Perform regular repair operations to ensure data consistency - Optimize read/write throughput by adjusting the number of replicas - Use lightweight transactions sparingly due to their overhead - Ensure the proper configuration of GC Grace Seconds for deletion handling - Utilize batch operations wisely to avoid performance pitfalls - Regularly upgrade and patch Cassandra instances to maintain performance ## Quality Checklist - Tables are designed for efficient querying without ALLOW FILTERING - Partition keys evenly distribute data across the cluster - Clustering columns support the required sorting order for queries - Correct replication factor is configured based on data center needs - Consistency levels balance between performance and data guarantees - Compaction strategies match the workload’s characteristics - Backup procedures are tested and documented - Security audits for access controls and encryption are regularly performed - Monitoring alerts are configured for key performance indicators - Regular audits to check node health and cluster topology changes ## Output - Optimized data models tailored to specific use cases - Replication and consistency settings that meet business requirements - Query strategies that leverage Cassandra’s strengths - Security configurations that protect data integrity and confidentiality - Performance tuning recommendations for both read and write paths - Monitoring dashboards that track crucial metrics and alerts - Documentation on backup and restore procedures - Capacity planning reports for future growth - Best practices documentation for development and operational phases - Comprehensive testing plans for Cassandra upgrades and migrations
© 0xfurai · MIT · 0xfurai/claude-code-subagents