Agent skill

sql

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

Stars 152
Forks 20

Install this agent skill to your Project

npx add-skill https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/sql

SKILL.md

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

bash
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

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

Query Simple History events

bash
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

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

Count records

bash
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:

Prefix Installation
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

Expand your agent's capabilities with these related and highly-rated skills.

Microck/ordinary-claude-skills

nondominium-holochain-dna-dev

Specialized skill for nondominium Holochain DNA development, focusing on zome creation, entry patterns, integrity/coordinator architecture, ValueFlows compliance, and WASM optimization. Use when creating new zomes, implementing entry types, or modifying Holochain DNA code.

152 20
Explore
Microck/ordinary-claude-skills

fluidsim

Framework for computational fluid dynamics simulations using Python. Use when running fluid dynamics simulations including Navier-Stokes equations (2D/3D), shallow water equations, stratified flows, or when analyzing turbulence, vortex dynamics, or geophysical flows. Provides pseudospectral methods with FFT, HPC support, and comprehensive output analysis.

152 20
Explore
Microck/ordinary-claude-skills

metabolomics-workbench-database

Access NIH Metabolomics Workbench via REST API (4,200+ studies). Query metabolites, RefMet nomenclature, MS/NMR data, m/z searches, study metadata, for metabolomics and biomarker discovery.

152 20
Explore
Microck/ordinary-claude-skills

run-tests

Validate code changes by intelligently selecting and running the appropriate test suites. Use this when editing code to verify changes work correctly, run tests, validate functionality, or check for regressions. Automatically discovers affected test suites, selects the minimal set of venvs needed for validation, and handles test execution with Docker services as needed.

152 20
Explore
Microck/ordinary-claude-skills

skill-navigator

The 100th skill! Your intelligent guide to all 99 other skills. Recommends the perfect skill for any task, creates skill combinations, and helps you discover capabilities you didn't know you had.

152 20
Explore
Microck/ordinary-claude-skills

AgentDB Advanced Features

Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.

152 20
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results