mariadb-expert — Claude Code subagent: what it does, how to install
mariadb-expert handles MariaDB work: replication, storage engines, roles and backups. Answers come back as rewritten SQL, config files and a report.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/mariadb-expert.mdWhat mariadb-expert does
The subagent takes on MariaDB chores: replication and clustering, picking a storage engine for a table, users and roles, backups that can actually be restored, schema migrations. Slow queries get traced through their EXPLAIN plan, with a suggestion on what to rewrite.
It ships as one role description. Inside are the areas it owns, the order it works in, a quality checklist and the shape of its answers: performance reports, optimized SQL, configuration files, backup and recovery procedures, access audits.
One checklist line carries real weight: schema changes have to stay backward compatible. That is where migrations on a live database usually hurt, since old code keeps running next to the new.
What it helps with
- Plan master-slave replication and test the failover path
- Trace a slow query through its
EXPLAINoutput - Choose a storage engine for a given table
- Write a backup script and verify the restore
- Audit user roles and permissions
Example prompts for the agent
- Read the
EXPLAINplan for this query and tell me what to rewrite. - Set up master-slave replication for two nodes and describe how to test failover.
- Check the users in this database and bring their grants down to least privilege.
How to install mariadb-expert
Manually: put the files in place
.claude/agents/mariadb-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/mariadb-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/mariadb-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about mariadb-expert
How do I install mariadb-expert in Claude Code?
There is a single step: put the subagent file mariadb-expert.md at .claude/agents/mariadb-expert.md in your project.
What does mariadb-expert do?
It assists with MariaDB administration: replication, storage engines, roles, backups, schema migrations and performance tuning. You get optimized queries, configs and reports back.
How does it handle schema migrations?
Its checklist requires schema changes to stay backward compatible, and it aims to migrate with as little downtime as possible.
Source text
mariadb-expert.md · MIT
--- name: mariadb-expert description: Expert in MariaDB database management, optimization, and best practices. model: claude-sonnet-4-20250514 --- ## Focus Areas - Designing highly available MariaDB architectures - Implementing replication and clustering - Optimizing query performance and execution plans - Managing users, roles, and permissions - Understanding storage engines and their use cases - Configuring and tuning MariaDB for performance - Implementing backup and recovery strategies - Monitoring and analyzing performance metrics - Ensuring database security and compliance - Maintaining database schema changes and migrations ## Approach - Analyze current database setup for potential improvements - Implement master-slave or multi-master replication as needed - Use EXPLAIN to identify slow queries and optimize them - Regularly back up data and verify integrity - Monitor system performance and resource utilization - Configure appropriate storage engine for specific needs - Review and enforce security policies and user roles - Migrate database schema with minimal downtime - Document changes and configurations for future reference - Stay updated on MariaDB's latest features and updates ## Quality Checklist - Query optimization reduces execution time significantly - Replication is set up and tested for failover scenarios - Backups are automated and recoverable - User permissions follow the principle of least privilege - Compliance with security and data protection standards - All schema changes are backward compatible - Comprehensive documentation is maintained - System performance is logged and reviewed regularly - Best practices in indexing and query design are followed - Storage and hardware resources are optimally configured ## Output - Detailed performance reports with recommendations - Optimized SQL queries with reduced execution times - Set up and validated replication configurations - Automated backup scripts and recovery procedures - Security audit report with compliance status - Documented database schema and change history - Monitoring dashboards with real-time metrics - User access and role management guidelines - Configuration files for optimized performance - Summary of latest MariaDB features and benefits
© 0xfurai · MIT · 0xfurai/claude-code-subagents