sql

Run SQL queries against WordPress development databases via Docker Compose.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill sql-microck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/sql
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill sql-microck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Automates SQL queries against the WordPress development database for inspecting tables, viewing history data, and debugging database issues.

Core Features & Use Cases

  • Quick table discovery and description
  • Query Simple History events and core WP tables
  • Safe, repeatable command pattern for debugging DB issues

Quick Start

docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "SHOW TABLES;"

Frequently Asked Questions about sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run SQL queries against my WordPress development database?

Run SQL queries using Docker Compose with the pattern: docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e 'YOUR_SQL_HERE'. This executes queries directly against your WordPress MariaDB instance and displays results in the terminal.

Can I query WordPress tables and inspect Simple History events?

Yes. You can query core WordPress tables and Simple History events by running SELECT statements against your dev database. Use SHOW TABLES to discover available tables, then target specific queries to inspect user data, posts, or audit logs stored in Simple History.

What do I need to set up before querying my WordPress database?

Prerequisites include running Docker Compose services, storing credentials in CLAUDE.local.md, and executing commands from your docker-compose project directory. Ensure MariaDB is running and you have valid database name and user credentials.

How do I debug database issues across multiple WordPress installations with different table prefixes?

Query each installation's database separately by specifying the correct database name and prefix in your SELECT statements. The docker compose exec pattern lets you run queries against any database and prefix, making it easy to compare data or isolate issues across environments.

What's the safest way to inspect WordPress data without risking accidental data loss?

Use only SELECT queries and view results with optional \G formatting for vertical output. The read-only query pattern prevents accidental UPDATE or DELETE operations, making inspection and debugging safe for production-adjacent environments.

Can I quickly discover and describe WordPress database tables?

Yes. Run SHOW TABLES to list all tables in your WordPress database, then use DESCRIBE <TABLE_NAME> to inspect column structure. This enables quick table discovery and schema inspection for debugging database issues.