db-mariadb-expert

db-mariadb-expert is an agent for Claude Code from andisab/swe-marketplace. It costs 37 tokens per session (2,993 once invoked), scanned C, original, MIT.

A guide to MariaDB, an open-source relational database for storing structured data and querying it with SQL. It covers database design, replication, clustering, security, backups, migrations, and query tuning.

In plain words
What is it for?
Use it to design and maintain MariaDB databases, investigate slow queries, manage permissions, set up replication or Galera clusters, back up data, and apply schema changes.
Why use it?
It helps keep MariaDB systems reliable, secure, recoverable, and responsive as their data and traffic grow.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the databases plugin — 7 agents shipped together

Good fit Use it to design and maintain MariaDB databases, investigate slow queries, manage permissions, set up replication or Galera clusters, back up data, and apply schema changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/andisab/swe-marketplace/db-mariadb-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/andisab/swe-marketplace

Made for: Claude Code.

Or install databases, the plugin that ships this one along with the rest of its 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for db-mariadb-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/andisab/swe-marketplace/db-mariadb-expert/github.svg)](https://agentmods.dev/agents/andisab/swe-marketplace/db-mariadb-expert)
Your own site
<a href="https://agentmods.dev/agents/andisab/swe-marketplace/db-mariadb-expert"><img src="https://agentmods.dev/badge/agents/andisab/swe-marketplace/db-mariadb-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for db-mariadb-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/andisab/swe-marketplace/db-mariadb-expert"><img src="https://agentmods.dev/badge/agents/andisab/swe-marketplace/db-mariadb-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,993 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.02993
Opus 5 $0.00018 $0.01496
Sonnet 5 $0.00007 $0.00599
Haiku 4.5 $0.00004 $0.00299

Measured 11d ago against content hash fb0b67cdab7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

db-mariadb-expert scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf /var/lib/mysql/*
plugins/databases/agents/db-mariadb-expert.md · 423 lines

How it starts

The opening of the file, as written. The whole thing — 423 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 (Galera) as needed
  • Use EXPLAIN to identify slow queries and optimize them
  • Regularly back up data and verify integrity (mariabackup, mysqldump)
  • Monitor system performance and resource utilization
  • Configure appropriate storage engine for specific needs (InnoDB, Aria, ColumnStore)
  • 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 (window functions, CTEs, JSON support)

SQL Optimization Examples

Advanced Query Patterns

Window Functions for Analytics
-- Ranking within groups
SELECT
    department_id,
    employee_name,
    salary,
    ROW_NUMBER() OVER (PARTITION BY department_id ORDER BY salary DESC) as salary_rank,
    DENSE_RANK() OVER (PARTITION BY department_id ORDER BY salary DESC) as dense_rank,
    PERCENT_RANK() OVER (PARTITION BY department_id ORDER BY salary DESC) as percentile,
    NTILE(4) OVER (PARTITION BY department_id ORDER BY salary DESC) as quartile
FROM employees;

-- Moving averages for time series
SELECT
    order_date,
    daily_revenue,
    AVG(daily_revenue) OVER (
        ORDER BY order_date
        ROWS BETWEEN 6 PRECEDING AND CURRENT ROW
    ) as weekly_moving_avg,
    SUM(daily_revenue) OVER (
        ORDER BY order_date
        ROWS UNBOUNDED PRECEDING
    ) as cumulative_revenue
FROM daily_sales
ORDER BY order_date;

-- Lead/Lag for comparing adjacent rows
SELECT
    product_id,
    sale_date,
    quantity,
    LAG(quantity, 1) OVER (PARTITION BY product_id ORDER BY sale_date) as prev_quantity,
    LEAD(quantity, 1) OVER (PARTITION BY product_id ORDER BY sale_date) as next_quantity,
    quantity - LAG(quantity, 1) OVER (PARTITION BY product_id ORDER BY sale_date) as quantity_change
FROM product_sales;

Read the full file on GitHub · 423 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 423 lines · 37 tokens per session scan C fb0b67cdab7b

Subscribe to this mod's changes

db-mariadb-expert is an agent published in the GitHub repository andisab/swe-marketplace (21 stars, last pushed 23d ago), licensed MIT. It adds 37 tokens to every session and 2,993 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.