agentsclimarketplace

Sql

Skill Microck/ordinary-claude-skills/skills_all/sql

An unappealing collection of Claude Skills and resources.

Install
npx -y skills add Microck/ordinary-claude-skills --skill sql

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its author says it does

Copied from the file, not written here

Run SQL queries against the WordPress development database. Use when querying database tables, inspecting Simple History events, checking WordPress data, or debugging database issues.

SKILL.md

2.2 KB, as published. Nobody here has run it

Run SQL Queries

You are tasked with running SQL queries against the WordPress development database.

Prerequisites

  • Database credentials are stored in CLAUDE.local.md under "Database Access"
  • Docker compose services must be running
  • Commands must be run from the docker-compose project directory

Command Pattern

docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "YOUR_SQL_HERE"

Refer to CLAUDE.local.md for the actual credentials and connection details.

Examples

Show all tables

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

Query Simple History events

docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "SELECT * FROM wp_simple_history ORDER BY id DESC LIMIT 10;"

Describe a table structure

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

Count records

docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "SELECT COUNT(*) FROM wp_posts;"

Table Prefixes

The database contains multiple WordPress installations with different prefixes:

PrefixInstallation
wp_Main install (wordpress_mariadb)
wp_nightly_Nightly build
wp_6_0_ to wp_6_6_Version-specific installs
wp_multisite_Multisite install
wp_php74_PHP 7.4 install
wp_subfolder_Subfolder install

Simple History Tables

The main Simple History tables (using wp_ prefix):

  • wp_simple_history - Main events table
  • wp_simple_history_contexts - Event context/metadata

Instructions

  1. Read credentials from CLAUDE.local.md
  2. Ask the user what SQL query they want to run (if not specified)
  3. Run the query using the command pattern above
  4. Display the results
  5. Offer to run follow-up queries if needed

Notes

  • For complex queries, consider using \G at the end for vertical output
  • Be careful with UPDATE/DELETE queries - always confirm with user first

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.