Writing Queries

Component skill for systematic SQL query development in DataPeeker analysis sessions

5 stars 2 forksWriting & Content Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add tilmon-engineering/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add tilmon-engineering/claude-skills --skill writing-queries
Manual install
git clone --depth 1 https://github.com/tilmon-engineering/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/datapeeker/skills/writing-queries ~/.claude/skills/writing-queries

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Writing Queries

## Purpose

This component skill guides systematic query development for analytics. Use it when:
- Writing SQL queries for analysis tasks
- Need to ensure queries are correct, documented, and reproducible
- Referenced by process skills requiring query execution
- Struggling with how to express an analytical question in SQL

## Prerequisites

- CSV files imported to database (relational database with SQL support)
- SQL query tool available (database CLI, IDE, or query interface)
- Understanding of table schema (use `understanding-data` skill if needed)
- Clear analytical question to answer

## Query Development Process

Create a TodoWrite checklist for the 5-phase query development process:

```
Phase 1: Clarify Analytical Question
Phase 2: Design Query Logic
Phase 3: Write SQL
Phase 4: Verify Results
Phase 5: Document Query
```

Mark each phase as you complete it. Save queries in numbered markdown files.

---

## Phase 1: Clarify Analytical Question

**Goal:** Translate vague analytical question into specific, answerable query requirements.

### Ask Clarifying Questions

Before writing any SQL, ensure you can answer:

1. **What exactly are we measuring?**
   - Specific metric name and calculation method
   - Example: "Total revenue" vs "Average revenue per customer" vs "Revenue per day"

2. **What is the unit of analysis?**
   - Per transaction, per customer, per day, per product, etc.
   - Example: "Daily sales" means one row per date
Read the full skill on GitHub

Details

Skill name
writing-queries
Path
plugins/datapeeker/skills/writing-queries/SKILL.md
License
MIT
Repo updated
22 May 2026

FAQ

What does the Writing Queries skill do?

Component skill for systematic SQL query development in DataPeeker analysis sessions

How do I install the Writing Queries skill?

Claude Code plugin: /plugin marketplace add tilmon-engineering/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Writing Queries popular?

It lives in tilmon-engineering/claude-skills, which has 5 GitHub stars and 2 forks.

Related skills

Browse the most popular Claude skills, all writing & content skills, or write your own with the skills generator.