Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Sql

ASecurity

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

393 stars
0 votes
0 copies
27 views
Added 12/19/2025
databasesphpbashsqldockerdebuggingdatabase

Security Analysis

A100/100

Scanned 2/12/2026

$npx -y skills add Microck/ordinary-claude-skills --skill sql --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Sql
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/microck-sql/badge)](https://www.skillsdirectory.com/skills/microck-sql)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: sql
description: Run SQL queries against the WordPress development database. Use when querying database tables, inspecting Simple History events, checking WordPress data, or debugging database issues.
---

# 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

Attribution

MicrockMicrock
View sourceSee grades on GitHubMore from Microck →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Mysql Best Practices

MySQL development best practices for schema design, query optimization, and database administration

2481 votes

Jpa Patterns

Spring Boot中的JPA/Hibernate实体设计、关系、查询优化、事务、审计、索引、分页和连接池模式。

2456590 votes

Clickhouse Io

ClickHouse数据库模式、查询优化、分析和数据工程最佳实践,适用于高性能分析工作负载。

2456590 votes

Postgres Patterns

基于Supabase最佳实践的PostgreSQL数据库模式,用于查询优化、架构设计、索引和安全。

2456590 votes

Sql Pro

Master modern SQL with cloud-native databases, OLTP/OLAP

458250 votes
View all in databases →